Example usage for javax.swing DefaultListCellRenderer subclass-usage

List of usage examples for javax.swing DefaultListCellRenderer subclass-usage

Introduction

In this page you can find the example usage for javax.swing DefaultListCellRenderer subclass-usage.

Usage

From source file DateComboBoxRenderer.java

class DateComboBoxRenderer extends DefaultListCellRenderer {
    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");

    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
            boolean cellHasFocus) {
        Object item = value;

From source file Main.java

class FontCellRenderer extends DefaultListCellRenderer {
    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
            boolean cellHasFocus) {
        JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
        Font font = new Font((String) value, Font.PLAIN, 20);
        label.setFont(font);

From source file Main.java

class MyCellRenderer extends DefaultListCellRenderer {
    public static final String HTML_1 = "<html><body style='width: ";
    public static final String HTML_2 = "px'>";
    public static final String HTML_3 = "</html>";
    private int width;

From source file Main.java

class MyListCellRenderer extends DefaultListCellRenderer {
    @Override
    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
            boolean cellHasFocus) {
        Component component = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
        component.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);

From source file com.googlecode.commons.swing.lists.I18NListCellRenderer.java

public class I18NListCellRenderer extends DefaultListCellRenderer {

    private static final long serialVersionUID = -9179602426631835612L;

    private I18N i18n;
    private String prefix;

From source file Main.java

class TwoDecimalRenderer extends DefaultListCellRenderer {

    private ListCellRenderer defaultRenderer;

    public TwoDecimalRenderer(ListCellRenderer defaultRenderer) {
        this.defaultRenderer = defaultRenderer;

From source file picocash.renderer.list.NameAndIconListRenderer.java

/**
 *
 * @author wusel
 */
public class NameAndIconListRenderer extends DefaultListCellRenderer {

From source file Main.java

class MyListCellRenderer extends DefaultListCellRenderer {
    Hashtable<Integer, Color> table;

    public MyListCellRenderer(Hashtable<Integer, Color> table) {
        this.table = table;
        setOpaque(true);

From source file ca.phon.app.project.RecentProjectListCellRenderer.java

public class RecentProjectListCellRenderer extends DefaultListCellRenderer {

    private ImageIcon localProjectIcon;
    private ImageIcon remoteProjectIcon;

    /** Constructor */

From source file org.kineticsystem.commons.data.view.renderer.BeanListCellRenderer.java

/**
 * This is a default JTable cell renderer. It extracts a property value from
 * the underlying object and renders the result on the screen with a specified
 * format.
 * @author Giovanni Remigi
 * @version $Revision: 9 $