Methods Summary |
---|
protected void | firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)Overridden for performance reasons.
See the Implementation Note
for more information.
// Strings get interned...
if (propertyName=="text"
|| propertyName == "labelFor"
|| propertyName == "displayedMnemonic"
|| ((propertyName == "font" || propertyName == "foreground")
&& oldValue != newValue
&& getClientProperty(javax.swing.plaf.basic.BasicHTML.propertyKey) != null)) {
super.firePropertyChange(propertyName, oldValue, newValue);
}
|
public void | firePropertyChange(java.lang.String propertyName, boolean oldValue, boolean newValue)Overridden for performance reasons.
See the Implementation Note
for more information.
|
private static javax.swing.border.Border | getNoFocusBorder()
if (System.getSecurityManager() != null) {
return SAFE_NO_FOCUS_BORDER;
} else {
return noFocusBorder;
}
|
public java.awt.Component | getTableCellRendererComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, boolean hasFocus, int row, int column)Returns the default table cell renderer.
During a printing operation, this method will be called with
isSelected and hasFocus values of
false to prevent selection and focus from appearing
in the printed output. To do other customization based on whether
or not the table is being printed, check the return value from
{@link javax.swing.JComponent#isPaintingForPrint()}.
Color fg = null;
Color bg = null;
JTable.DropLocation dropLocation = table.getDropLocation();
if (dropLocation != null
&& !dropLocation.isInsertRow()
&& !dropLocation.isInsertColumn()
&& dropLocation.getRow() == row
&& dropLocation.getColumn() == column) {
fg = UIManager.getColor("Table.dropCellForeground");
bg = UIManager.getColor("Table.dropCellBackground");
isSelected = true;
}
if (isSelected) {
super.setForeground(fg == null ? table.getSelectionForeground()
: fg);
super.setBackground(bg == null ? table.getSelectionBackground()
: bg);
} else {
super.setForeground(unselectedForeground != null
? unselectedForeground
: table.getForeground());
super.setBackground(unselectedBackground != null
? unselectedBackground
: table.getBackground());
}
setFont(table.getFont());
if (hasFocus) {
Border border = null;
if (isSelected) {
border = UIManager.getBorder("Table.focusSelectedCellHighlightBorder");
}
if (border == null) {
border = UIManager.getBorder("Table.focusCellHighlightBorder");
}
setBorder(border);
if (!isSelected && table.isCellEditable(row, column)) {
Color col;
col = UIManager.getColor("Table.focusCellForeground");
if (col != null) {
super.setForeground(col);
}
col = UIManager.getColor("Table.focusCellBackground");
if (col != null) {
super.setBackground(col);
}
}
} else {
setBorder(getNoFocusBorder());
}
setValue(value);
return this;
|
public void | invalidate()Overridden for performance reasons.
See the Implementation Note
for more information.
|
public boolean | isOpaque()Overridden for performance reasons.
See the Implementation Note
for more information.
Color back = getBackground();
Component p = getParent();
if (p != null) {
p = p.getParent();
}
// p should now be the JTable.
boolean colorMatch = (back != null) && (p != null) &&
back.equals(p.getBackground()) &&
p.isOpaque();
return !colorMatch && super.isOpaque();
|
public void | repaint(long tm, int x, int y, int width, int height)Overridden for performance reasons.
See the Implementation Note
for more information.
|
public void | repaint(java.awt.Rectangle r)Overridden for performance reasons.
See the Implementation Note
for more information.
|
public void | repaint()Overridden for performance reasons.
See the Implementation Note
for more information.
|
public void | revalidate()Overridden for performance reasons.
See the Implementation Note
for more information.
|
public void | setBackground(java.awt.Color c)Overrides JComponent.setBackground to assign
the unselected-background color to the specified color.
super.setBackground(c);
unselectedBackground = c;
|
public void | setForeground(java.awt.Color c)Overrides JComponent.setForeground to assign
the unselected-foreground color to the specified color.
super.setForeground(c);
unselectedForeground = c;
|
protected void | setValue(java.lang.Object value)Sets the String object for the cell being rendered to
value .
setText((value == null) ? "" : value.toString());
|
public void | updateUI()Notification from the UIManager that the look and feel
[L&F] has changed.
Replaces the current UI object with the latest version from the
UIManager .
super.updateUI();
setForeground(null);
setBackground(null);
|
public void | validate()Overridden for performance reasons.
See the Implementation Note
for more information.
|