|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JLabel com.jidesoft.swing.StyledLabel com.jidesoft.list.StyledListCellRenderer
public class StyledListCellRenderer
A list cell renderer based on StyledLabel. To use it, you should make your cell renderer extending this one and
override customizeStyledLabel(javax.swing.JList,Object,int,boolean,boolean)
method. If your overridden
method, you can call setStyleRange() or setStyleRanges() based on the item value, if it is leaf etc information.
Nested Class Summary | |
---|---|
static class |
StyledListCellRenderer.UIResource
A subclass of DefaultListCellRenderer that implements 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 | |
---|---|
protected static Border |
noFocusBorder
|
Fields inherited from class com.jidesoft.swing.StyledLabel |
---|
PROPERTY_IGNORE_COLOR_SETTINGS, PROPERTY_STYLE_RANGE |
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 | |
---|---|
StyledListCellRenderer()
Constructs a default renderer object for an item in a list. |
Method Summary | |
---|---|
protected void |
customizeStyledLabel(JList list,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus)
Overrides this method to customize the styled label. |
void |
firePropertyChange(String propertyName,
boolean oldValue,
boolean newValue)
Overridden for performance reasons. |
void |
firePropertyChange(String propertyName,
byte oldValue,
byte newValue)
Overridden for performance reasons. |
void |
firePropertyChange(String propertyName,
char oldValue,
char newValue)
Overridden for performance reasons. |
void |
firePropertyChange(String propertyName,
double oldValue,
double newValue)
Overridden for performance reasons. |
void |
firePropertyChange(String propertyName,
float oldValue,
float newValue)
Overridden for performance reasons. |
void |
firePropertyChange(String propertyName,
int oldValue,
int newValue)
Overridden for performance reasons. |
void |
firePropertyChange(String propertyName,
long oldValue,
long newValue)
Overridden for performance reasons. |
protected void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
Overridden for performance reasons. |
void |
firePropertyChange(String propertyName,
short oldValue,
short newValue)
Overridden for performance reasons. |
Component |
getListCellRendererComponent(JList list,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus)
|
void |
invalidate()
Overridden for performance reasons. |
boolean |
isOpaque()
Overridden for performance reasons. |
void |
repaint()
Overridden for performance reasons. |
void |
repaint(long tm,
int x,
int y,
int width,
int height)
Overridden for performance reasons. |
void |
repaint(Rectangle r)
Overridden for performance reasons. |
void |
revalidate()
Overridden for performance reasons. |
void |
validate()
Overridden for performance reasons. |
Methods inherited from class com.jidesoft.swing.StyledLabel |
---|
addStyleRange, addStyleRanges, clearStyleRange, clearStyleRanges, getMaximumSize, getMaxRows, getMinimumSize, getMinRows, getPreferredWidth, getRowGap, getRows, getStyleRanges, getUIClassID, isIgnoreColorSettings, isLineWrap, isTruncated, setIgnoreColorSettings, setLineWrap, setMaxRows, setMinRows, setPreferredWidth, setRowGap, setRows, setStyleRanges, setTruncated, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static Border noFocusBorder
Constructor Detail |
---|
public StyledListCellRenderer()
Method Detail |
---|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
getListCellRendererComponent
in interface ListCellRenderer
protected void customizeStyledLabel(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
list
- value
- index
- isSelected
- cellHasFocus
- public boolean isOpaque()
isOpaque
in class JComponent
true
if the background is completely opaque and differs from the JList's background;
false
otherwisepublic void validate()
validate
in class Container
public void invalidate()
invalidate
in class Container
public void repaint()
repaint
in class Component
public void revalidate()
revalidate
in class JComponent
public void repaint(long tm, int x, int y, int width, int height)
repaint
in class JComponent
public void repaint(Rectangle r)
repaint
in class JComponent
protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)
firePropertyChange
in class Component
public void firePropertyChange(String propertyName, byte oldValue, byte newValue)
firePropertyChange
in class Component
public void firePropertyChange(String propertyName, char oldValue, char newValue)
firePropertyChange
in class JComponent
public void firePropertyChange(String propertyName, short oldValue, short newValue)
firePropertyChange
in class Component
public void firePropertyChange(String propertyName, int oldValue, int newValue)
firePropertyChange
in class JComponent
public void firePropertyChange(String propertyName, long oldValue, long newValue)
firePropertyChange
in class Component
public void firePropertyChange(String propertyName, float oldValue, float newValue)
firePropertyChange
in class Component
public void firePropertyChange(String propertyName, double oldValue, double newValue)
firePropertyChange
in class Component
public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)
firePropertyChange
in class JComponent
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |