com.partnersoft.v3x.gui
Class InvalidHighlightingListCellRenderer
java.lang.Object
com.partnersoft.v3x.gui.InvalidHighlightingListCellRenderer
- All Implemented Interfaces:
- javax.swing.ListCellRenderer
public class InvalidHighlightingListCellRenderer
- extends java.lang.Object
- implements javax.swing.ListCellRenderer
A cell renderer that renders a text value in red if it fails a configurable
test.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InvalidHighlightingListCellRenderer
public InvalidHighlightingListCellRenderer()
InvalidHighlightingListCellRenderer
public InvalidHighlightingListCellRenderer(UnaryPredicate invalidTester,
UnaryPredicate newTester)
getListCellRendererComponent
public java.awt.Component getListCellRendererComponent(javax.swing.JList list,
java.lang.Object value,
int index,
boolean isSelected,
boolean hasFocus)
- Specified by:
getListCellRendererComponent in interface javax.swing.ListCellRenderer
validate
public boolean validate(java.lang.Object value)
- Feel free to either override this method or supply a UnaryPredicate as
the test property. By default, this method tries to apply the test
property, but with inline classes it might be simpler just to override
this method.
isNew
public boolean isNew(java.lang.Object value)
- Feel free to either override this method or supply a UnaryPredicate as
the test property. By default, this method tries to apply the test
property, but with inline classes it might be simpler just to override
this method.
getInvalidTester
public UnaryPredicate getInvalidTester()
setInvalidTester
public void setInvalidTester(UnaryPredicate newInvalidTester)
getNewTester
public UnaryPredicate getNewTester()
setNewTester
public void setNewTester(UnaryPredicate newNewTester)