|
||||||||||
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.DefaultListCellRenderer
com.silvermindsoftware.hitch.validation.response.DefaultValidatingComboBoxRenderer
public class DefaultValidatingComboBoxRenderer
A validating cell renderer for comboboxes.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.DefaultListCellRenderer |
---|
DefaultListCellRenderer.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 Color |
m_invalidColor
Color to mark value as invalid. |
protected String |
m_property
The property to render. |
protected boolean |
m_validate
Should invalid property values marked with different color? |
Fields inherited from class javax.swing.DefaultListCellRenderer |
---|
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 | |
---|---|
DefaultValidatingComboBoxRenderer()
The default contructor reading the invalidColor from Spring config. |
|
DefaultValidatingComboBoxRenderer(Color color,
String property,
boolean validate)
|
|
DefaultValidatingComboBoxRenderer(String property,
boolean validate)
|
Method Summary | |
---|---|
Component |
getListCellRendererComponent(JList list,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus)
|
void |
setProperty(String property)
|
void |
setValidate(boolean validate)
|
Methods inherited from class javax.swing.DefaultListCellRenderer |
---|
firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, invalidate, isOpaque, repaint, repaint, repaint, revalidate, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final Color m_invalidColor
protected String m_property
protected boolean m_validate
Constructor Detail |
---|
public DefaultValidatingComboBoxRenderer()
public DefaultValidatingComboBoxRenderer(String property, boolean validate)
property
- the property to rendervalidate
- validate property value?public DefaultValidatingComboBoxRenderer(Color color, String property, boolean validate)
color
- the color to mark value as invalidproperty
- the property to rendervalidate
- validate property value?Method Detail |
---|
public void setProperty(String property)
setProperty
in interface ComboBoxRenderer
property
- the property to renderpublic void setValidate(boolean validate)
validate
- validate property value?public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
getListCellRendererComponent
in interface ListCellRenderer
getListCellRendererComponent
in class DefaultListCellRenderer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |