Methods Summary |
---|
public java.awt.Component | getListCellRendererComponent(javax.swing.JList list, java.lang.Object value, int index, boolean isSelected, boolean cellHasFocus)
/**if (isSelected) {
setBackground(UIManager.getColor("ComboBox.selectionBackground"));
setForeground(UIManager.getColor("ComboBox.selectionForeground"));
} else {
setBackground(UIManager.getColor("ComboBox.background"));
setForeground(UIManager.getColor("ComboBox.foreground"));
}**/
if (isSelected) {
setBackground(list.getSelectionBackground());
setForeground(list.getSelectionForeground());
}
else {
setBackground(list.getBackground());
setForeground(list.getForeground());
}
setFont(list.getFont());
if (value instanceof Icon) {
setIcon((Icon)value);
}
else {
setText((value == null) ? "" : value.toString());
}
return this;
|
private static javax.swing.border.Border | getNoFocusBorder()
if (System.getSecurityManager() != null) {
return SAFE_NO_FOCUS_BORDER;
} else {
return noFocusBorder;
}
|
public java.awt.Dimension | getPreferredSize()
Dimension size;
if ((this.getText() == null) || (this.getText().equals( "" ))) {
setText( " " );
size = super.getPreferredSize();
setText( "" );
}
else {
size = super.getPreferredSize();
}
return size;
|