Package org.jdesktop.swingx.decorator
Interface HighlightPredicate
-
- All Known Implementing Classes:
HighlightPredicate.AndHighlightPredicate,HighlightPredicate.ColumnHighlightPredicate,HighlightPredicate.ColumnTypeHighlightPredicate,HighlightPredicate.DepthHighlightPredicate,HighlightPredicate.EqualsHighlightPredicate,HighlightPredicate.IdentifierHighlightPredicate,HighlightPredicate.NotHighlightPredicate,HighlightPredicate.OrHighlightPredicate,HighlightPredicate.RowGroupHighlightPredicate,HighlightPredicate.TypeHighlightPredicate,PatternPredicate,SearchPredicate
public interface HighlightPredicateA controller which decides whether or not a visual decoration should be applied to the given Component in the given ComponentAdapter state. This is a on/off decision only, the actual decoration is left to the AbstractHighlighter which typically respects this predicate.Note: implementations should be immutable because
Highlighters guarantee to notify listeners on any state change which might effect the highlight. They can't comply to that contract if predicate internal state changes under their feet. If dynamic predicate state is required, the safe alternative is to create and set a new predicate.- See Also:
AbstractHighlighter
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classHighlightPredicate.AndHighlightPredicateAnds a list of predicates.static classHighlightPredicate.ColumnHighlightPredicateA HighlightPredicate based on column index.static classHighlightPredicate.ColumnTypeHighlightPredicatePredicate testing the componentAdapter column type against a given Class.static classHighlightPredicate.DepthHighlightPredicateAHighlightPredicatebased on adapter depth.static classHighlightPredicate.EqualsHighlightPredicatePredicate testing the componentAdapter value against a fixed Object.static classHighlightPredicate.IdentifierHighlightPredicateA HighlightPredicate based on column identifier.static classHighlightPredicate.NotHighlightPredicateNegation of a HighlightPredicate.static classHighlightPredicate.OrHighlightPredicateOr's a list of predicates.static classHighlightPredicate.RowGroupHighlightPredicatestatic classHighlightPredicate.TypeHighlightPredicatePredicate testing the componentAdapter value type against a given Class.
-
Field Summary
Fields Modifier and Type Field Description static HighlightPredicateALWAYSUnconditional true.static HighlightPredicateBIG_DECIMAL_NEGATIVENegative BigDecimals.static HighlightPredicateEDITABLEIs editable.static java.lang.Integer[]EMPTY_INTEGER_ARRAYstatic java.lang.Object[]EMPTY_OBJECT_ARRAYstatic HighlightPredicate[]EMPTY_PREDICATE_ARRAYstatic HighlightPredicateEVENEven rows.static HighlightPredicateHAS_FOCUSFocus predicate.static HighlightPredicateINTEGER_NEGATIVENegative Number.static HighlightPredicateIS_FOLDERFolder predicate - convenience: same as !IS_LEAF.static HighlightPredicateIS_LEAFLeaf predicate.static HighlightPredicateIS_SELECTEDSelected predicate.static HighlightPredicateIS_TEXT_TRUNCATEDDetermines if the displayed text is truncated.static HighlightPredicateNEVERUnconditional false.static HighlightPredicateODDOdd rows.static HighlightPredicateREAD_ONLYConvenience for read-only (same as !editable).static HighlightPredicateROLLOVER_CELLRollover Cell.static HighlightPredicateROLLOVER_COLUMNRollover Column.static HighlightPredicateROLLOVER_ROWRollover Row.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisHighlighted(java.awt.Component renderer, ComponentAdapter adapter)Returns a boolean to indicate whether the component should be highlighted.
-
-
-
Field Detail
-
ALWAYS
static final HighlightPredicate ALWAYS
Unconditional true.
-
NEVER
static final HighlightPredicate NEVER
Unconditional false.
-
ROLLOVER_ROW
static final HighlightPredicate ROLLOVER_ROW
Rollover Row.
-
ROLLOVER_COLUMN
static final HighlightPredicate ROLLOVER_COLUMN
Rollover Column.
-
ROLLOVER_CELL
static final HighlightPredicate ROLLOVER_CELL
Rollover Cell.
-
EDITABLE
static final HighlightPredicate EDITABLE
Is editable.
-
READ_ONLY
static final HighlightPredicate READ_ONLY
Convenience for read-only (same as !editable).
-
IS_LEAF
static final HighlightPredicate IS_LEAF
Leaf predicate.
-
IS_FOLDER
static final HighlightPredicate IS_FOLDER
Folder predicate - convenience: same as !IS_LEAF.
-
IS_SELECTED
static final HighlightPredicate IS_SELECTED
Selected predicate.
-
IS_TEXT_TRUNCATED
static final HighlightPredicate IS_TEXT_TRUNCATED
Determines if the displayed text is truncated.
-
HAS_FOCUS
static final HighlightPredicate HAS_FOCUS
Focus predicate.
-
EVEN
static final HighlightPredicate EVEN
Even rows. PENDING: this is zero based (that is "really" even 0, 2, 4 ..), differing from the old AlternateRowHighlighter.
-
ODD
static final HighlightPredicate ODD
Odd rows. PENDING: this is zero based (that is 1, 3, 4 ..), differs from the old implementation which was one based?
-
BIG_DECIMAL_NEGATIVE
static final HighlightPredicate BIG_DECIMAL_NEGATIVE
Negative BigDecimals.
-
INTEGER_NEGATIVE
static final HighlightPredicate INTEGER_NEGATIVE
Negative Number.
-
EMPTY_PREDICATE_ARRAY
static final HighlightPredicate[] EMPTY_PREDICATE_ARRAY
-
EMPTY_OBJECT_ARRAY
static final java.lang.Object[] EMPTY_OBJECT_ARRAY
-
EMPTY_INTEGER_ARRAY
static final java.lang.Integer[] EMPTY_INTEGER_ARRAY
-
-
Method Detail
-
isHighlighted
boolean isHighlighted(java.awt.Component renderer, ComponentAdapter adapter)Returns a boolean to indicate whether the component should be highlighted.Note: both parameters should be considered strictly read-only!
- Parameters:
renderer- the cell renderer component that is to be decorated, must not be nulladapter- the ComponentAdapter for this decorate operation, most not be null- Returns:
- a boolean to indicate whether the component should be highlighted.
-
-