|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLabel
javax.swing.table.DefaultTableCellRenderer
com.antelmann.util.table.StyledCellRenderer
public class StyledCellRenderer
allows to easily customize an already given renderer by applying any given style
| Nested Class Summary | |
|---|---|
static interface |
StyledCellRenderer.Styler
|
| Nested classes/interfaces inherited from class javax.swing.table.DefaultTableCellRenderer |
|---|
DefaultTableCellRenderer.UIResource |
| Nested classes/interfaces inherited from class javax.swing.JLabel |
|---|
JLabel.AccessibleJLabel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.table.DefaultTableCellRenderer |
|---|
noFocusBorder |
| Fields inherited from class javax.swing.JLabel |
|---|
labelFor |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
StyledCellRenderer(StyledCellRenderer.Styler customizer)
uses the superclass for its component generation |
|
StyledCellRenderer(StyledCellRenderer.Styler customizer,
TableCellRenderer renderer)
uses the given renderer to obtain the component and the given customizer to apply the format |
|
| Method Summary | |
|---|---|
static StyledCellRenderer.Styler |
getBackgroundColorStyler(Color color)
|
static StyledCellRenderer.Styler |
getColorStyler(Color color)
|
static StyledCellRenderer.Styler |
getColorStyler(Color color,
Color background)
|
static StyledCellRenderer.Styler |
getFontSizeStyler(float size)
|
static StyledCellRenderer.Styler |
getFontStyler(Font font)
|
static StyledCellRenderer.Styler |
getFontStyleStyler(int style)
|
Component |
getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
|
| Methods inherited from class javax.swing.table.DefaultTableCellRenderer |
|---|
firePropertyChange, firePropertyChange, invalidate, isOpaque, repaint, repaint, repaint, revalidate, setBackground, setForeground, setValue, updateUI, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StyledCellRenderer(StyledCellRenderer.Styler customizer)
public StyledCellRenderer(StyledCellRenderer.Styler customizer,
TableCellRenderer renderer)
| Method Detail |
|---|
public static StyledCellRenderer.Styler getColorStyler(Color color)
public static StyledCellRenderer.Styler getColorStyler(Color color,
Color background)
public static StyledCellRenderer.Styler getBackgroundColorStyler(Color color)
public static StyledCellRenderer.Styler getFontSizeStyler(float size)
public static StyledCellRenderer.Styler getFontStyleStyler(int style)
public static StyledCellRenderer.Styler getFontStyler(Font font)
public Component getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
getTableCellRendererComponent in interface TableCellRenderergetTableCellRendererComponent in class DefaultTableCellRenderer
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||