public class FormTableCellRenderer extends Object implements TableCellRenderer, Serializable
| Constructor and Description |
|---|
FormTableCellRenderer()
Creates a default table cell renderer.
|
FormTableCellRenderer(JComponent component)
Creates a table cell renderer.
|
| Modifier and Type | Method and Description |
|---|---|
protected Color |
getBackgroundColor(JTable table,
boolean selected,
boolean hasFocus,
boolean editable,
boolean mandatory)
Determines the background color.
|
JComponent |
getComponent()
Gets the rendering component.
|
Border |
getFocusBorder()
Gets the focus border
|
Color |
getFocusedBackground()
Gets the color for the focused background.
|
Color |
getFocusedForeground()
Gets the color for the focused foreground.
|
protected Color |
getForegroundColor(JTable table,
boolean selected,
boolean hasFocus,
boolean editable,
boolean mandatory)
Determines the foreground color.
|
Border |
getNoFocusBorder()
Gets the no focus border
|
Font |
getRenderingFont()
Gets the rendering default font.
|
Color |
getSelectedBackground()
Gets the color for the selected background.
|
Color |
getSelectedForeground()
Gets the color for the selected foreground.
|
Color |
getSelectedMandatoryBackground()
Gets the selected mandatory background.
|
Component |
getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column) |
protected String |
getText()
Gets the text content of the rendering component.
|
Color |
getUnselectedBackground()
Gets the color for the unselected background.
|
Color |
getUnselectedForeground()
Gets the color for the unselected foreground.
|
Color |
getUnselectedMandatoryBackground()
Gets the unselected mandatory background.
|
void |
setFocusBorder(Border focusBorder)
Sets the focus border.
|
void |
setFocusedBackground(Color c)
Sets the color for the focused background.
|
void |
setFocusedForeground(Color c)
Sets the color for the focused foreground.
|
protected void |
setHorizontalAlignment(int alignment) |
void |
setNoFocusBorder(Border noFocusBorder)
Sets the no focus border.
|
void |
setRenderingFont(Font font)
Sets the rendering default font.
|
void |
setSelectedBackground(Color c)
Sets the color for the selected background.
|
void |
setSelectedForeground(Color c)
Sets the color for the selected foreground.
|
void |
setSelectedMandatoryBackground(Color selectedMandatoryBackground)
Sets the selected mandatory background.
|
void |
setUnselectedBackground(Color c)
Sets the color for the unselected background.
|
void |
setUnselectedForeground(Color c)
Sets the color for the unselected foreground.
|
void |
setUnselectedMandatoryBackground(Color unselectedMandatoryBackground)
Sets the unselected mandatory background.
|
protected void |
setValue(Object value)
Sets the value of the rendering component.
|
protected void |
setVerticalAlignment(int alignment) |
public FormTableCellRenderer(JComponent component)
component - the componentpublic FormTableCellRenderer()
public JComponent getComponent()
public Color getSelectedMandatoryBackground()
public void setSelectedMandatoryBackground(Color selectedMandatoryBackground)
selectedMandatoryBackground - mandatory background if not default from tablepublic Color getUnselectedMandatoryBackground()
public void setUnselectedMandatoryBackground(Color unselectedMandatoryBackground)
unselectedMandatoryBackground - mandatory background if not default from tablepublic void setSelectedForeground(Color c)
c - the foreground colorpublic Color getSelectedForeground()
public void setSelectedBackground(Color c)
c - the background colorpublic Color getSelectedBackground()
public void setUnselectedForeground(Color c)
c - the unselected foreground colorpublic Color getUnselectedForeground()
public void setUnselectedBackground(Color c)
c - the unselected background colorpublic Color getUnselectedBackground()
public void setFocusedForeground(Color c)
c - the focused foreground colorpublic Color getFocusedForeground()
public void setFocusedBackground(Color c)
c - the focused background colorpublic Color getFocusedBackground()
public void setRenderingFont(Font font)
font - the fontpublic Font getRenderingFont()
public Border getFocusBorder()
public void setFocusBorder(Border focusBorder)
focusBorder - the focusBorder to setpublic Border getNoFocusBorder()
public void setNoFocusBorder(Border noFocusBorder)
noFocusBorder - the focusBorder to setprotected void setValue(Object value)
value - the valueprotected String getText()
protected void setHorizontalAlignment(int alignment)
protected void setVerticalAlignment(int alignment)
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
Ovewritten due to formatting.
getTableCellRendererComponent in interface TableCellRendererprotected Color getForegroundColor(JTable table, boolean selected, boolean hasFocus, boolean editable, boolean mandatory)
table - the tableselected - true if cell is selectedhasFocus - true if cell has focuseditable - true if cell is editablemandatory - true if cell is mandatoryprotected Color getBackgroundColor(JTable table, boolean selected, boolean hasFocus, boolean editable, boolean mandatory)
table - the tableselected - true if cell is selectedhasFocus - true if cell has focuseditable - true if cell is editablemandatory - true if cell is mandatoryTentackle - a domain driven enterprise framework