/** * Instantiates a Highlighter with the given * HighlightPredicate.<p> * * @param predicate the HighlightPredicate to use. * * @see #setHighlightPredicate(HighlightPredicate) */ public AbstractHighlighter(HighlightPredicate predicate) { setHighlightPredicate(predicate); }
/** * Set the HighlightPredicate used to decide whether a cell should * be highlighted. If null, sets the predicate to HighlightPredicate.ALWAYS. * * The default value is HighlightPredicate.ALWAYS. * * @param predicate the HighlightPredicate to use. */ public void setHighlightPredicate(HighlightPredicate predicate) { if (predicate == null) { predicate = HighlightPredicate.ALWAYS; } if (areEqual(predicate, getHighlightPredicate())) return; this.predicate = predicate; fireStateChanged(); }
/** * {@inheritDoc} <p> * * Overridden to set/reset the flag indicating whether or not * painter's property changes should be passed on to the * Highlighter's listener. */ @Override public Component highlight(Component component, ComponentAdapter adapter) { isAdjusting = true; Component stamp = super.highlight(component, adapter); isAdjusting = false; return stamp; }
/** * {@inheritDoc} * * This calls doHighlight to apply the decoration if both HighlightPredicate * isHighlighted and canHighlight return true. Returns the undecorated component otherwise. * * @param component the cell renderer component that is to be decorated * @param adapter the ComponentAdapter for this decorate operation * * @see #canHighlight(Component, ComponentAdapter) * @see #doHighlight(Component, ComponentAdapter) * @see #getHighlightPredicate() */ @Override public Component highlight(Component component, ComponentAdapter adapter) { if (canHighlight(component, adapter) && getHighlightPredicate().isHighlighted(component, adapter)) { component = doHighlight(component, adapter); } return component; }
/** * {@inheritDoc} * * This calls doHighlight to apply the decoration if both HighlightPredicate * isHighlighted and canHighlight return true. Returns the undecorated component otherwise. * * @param component the cell renderer component that is to be decorated * @param adapter the ComponentAdapter for this decorate operation * * @see #canHighlight(Component, ComponentAdapter) * @see #doHighlight(Component, ComponentAdapter) * @see #getHighlightPredicate() */ @Override public Component highlight(Component component, ComponentAdapter adapter) { if (canHighlight(component, adapter) && getHighlightPredicate().isHighlighted(component, adapter)) { component = doHighlight(component, adapter); } return component; }
/** * Set the HighlightPredicate used to decide whether a cell should * be highlighted. If null, sets the predicate to HighlightPredicate.ALWAYS. * * The default value is HighlightPredicate.ALWAYS. * * @param predicate the HighlightPredicate to use. */ public void setHighlightPredicate(HighlightPredicate predicate) { if (predicate == null) { predicate = HighlightPredicate.ALWAYS; } if (areEqual(predicate, getHighlightPredicate())) return; this.predicate = predicate; fireStateChanged(); }
/** * {@inheritDoc} * * This calls doHighlight to apply the decoration if both HighlightPredicate * isHighlighted and canHighlight return true. Returns the undecorated component otherwise. * * @param component the cell renderer component that is to be decorated * @param adapter the ComponentAdapter for this decorate operation * * @see #canHighlight(Component, ComponentAdapter) * @see #doHighlight(Component, ComponentAdapter) * @see #getHighlightPredicate() */ @Override public Component highlight(Component component, ComponentAdapter adapter) { if (canHighlight(component, adapter) && getHighlightPredicate().isHighlighted(component, adapter)) { component = doHighlight(component, adapter); } return component; }
/** * Instantiates a Highlighter with the given * HighlightPredicate.<p> * * @param predicate the HighlightPredicate to use. * * @see #setHighlightPredicate(HighlightPredicate) */ public AbstractHighlighter(HighlightPredicate predicate) { setHighlightPredicate(predicate); }
/** * {@inheritDoc} <p> * * Overridden to set/reset the flag indicating whether or not * painter's property changes should be passed on to the * Highlighter's listener. */ @Override public Component highlight(Component component, ComponentAdapter adapter) { isAdjusting = true; Component stamp = super.highlight(component, adapter); isAdjusting = false; return stamp; }
/** * Set the HighlightPredicate used to decide whether a cell should * be highlighted. If null, sets the predicate to HighlightPredicate.ALWAYS. * * The default value is HighlightPredicate.ALWAYS. * * @param predicate the HighlightPredicate to use. */ public void setHighlightPredicate(HighlightPredicate predicate) { if (predicate == null) { predicate = HighlightPredicate.ALWAYS; } if (areEqual(predicate, getHighlightPredicate())) return; this.predicate = predicate; fireStateChanged(); }
/** * {@inheritDoc} * * This calls doHighlight to apply the decoration if both HighlightPredicate * isHighlighted and canHighlight return true. Returns the undecorated component otherwise. * * @param component the cell renderer component that is to be decorated * @param adapter the ComponentAdapter for this decorate operation * * @see #canHighlight(Component, ComponentAdapter) * @see #doHighlight(Component, ComponentAdapter) * @see #getHighlightPredicate() */ public Component highlight(Component component, ComponentAdapter adapter) { if (canHighlight(component, adapter) && getHighlightPredicate().isHighlighted(component, adapter)) { component = doHighlight(component, adapter); } return component; }
/** * Instantiates a Highlighter with the given * HighlightPredicate.<p> * * @param predicate the HighlightPredicate to use. * * @see #setHighlightPredicate(HighlightPredicate) */ public AbstractHighlighter(HighlightPredicate predicate) { setHighlightPredicate(predicate); }
/** * {@inheritDoc} <p> * * Overridden to set/reset the flag indicating whether or not * painter's property changes should be passed on to the * Highlighter's listener. */ @Override public Component highlight(Component component, ComponentAdapter adapter) { isAdjusting = true; Component stamp = super.highlight(component, adapter); isAdjusting = false; return stamp; }
/** * Set the HighlightPredicate used to decide whether a cell should * be highlighted. If null, sets the predicate to HighlightPredicate.ALWAYS. * * The default value is HighlightPredicate.ALWAYS. * * @param predicate the HighlightPredicate to use. */ public void setHighlightPredicate(HighlightPredicate predicate) { if (predicate == null) { predicate = HighlightPredicate.ALWAYS; } if (areEqual(predicate, getHighlightPredicate())) return; this.predicate = predicate; fireStateChanged(); }
/** * {@inheritDoc} * * This calls doHighlight to apply the decoration if both HighlightPredicate * isHighlighted and canHighlight return true. Returns the undecorated component otherwise. * * @param component the cell renderer component that is to be decorated * @param adapter the ComponentAdapter for this decorate operation * * @see #canHighlight(Component, ComponentAdapter) * @see #doHighlight(Component, ComponentAdapter) * @see #getHighlightPredicate() */ @Override public Component highlight(Component component, ComponentAdapter adapter) { if (canHighlight(component, adapter) && getHighlightPredicate().isHighlighted(component, adapter)) { component = doHighlight(component, adapter); } return component; }
/** * Instantiates a Highlighter with the given * HighlightPredicate.<p> * * @param predicate the HighlightPredicate to use. * * @see #setHighlightPredicate(HighlightPredicate) */ public AbstractHighlighter(HighlightPredicate predicate) { setHighlightPredicate(predicate); }
/** * {@inheritDoc} <p> * * Overridden to set/reset the flag indicating whether or not * painter's property changes should be passed on to the * Highlighter's listener. */ @Override public Component highlight(Component component, ComponentAdapter adapter) { isAdjusting = true; Component stamp = super.highlight(component, adapter); isAdjusting = false; return stamp; }
/** * Set the HighlightPredicate used to decide whether a cell should * be highlighted. If null, sets the predicate to HighlightPredicate.ALWAYS. * * The default value is HighlightPredicate.ALWAYS. * * @param predicate the HighlightPredicate to use. */ public void setHighlightPredicate(HighlightPredicate predicate) { if (predicate == null) { predicate = HighlightPredicate.ALWAYS; } if (areEqual(predicate, getHighlightPredicate())) return; this.predicate = predicate; fireStateChanged(); }
/** * Instantiates a Highlighter with the given * HighlightPredicate.<p> * * @param predicate the HighlightPredicate to use. * * @see #setHighlightPredicate(HighlightPredicate) */ public AbstractHighlighter(HighlightPredicate predicate) { setHighlightPredicate(predicate); }
/** * {@inheritDoc} <p> * * Overridden to set/reset the flag indicating whether or not * painter's property changes should be passed on to the * Highlighter's listener. */ @Override public Component highlight(Component component, ComponentAdapter adapter) { isAdjusting = true; Component stamp = super.highlight(component, adapter); isAdjusting = false; return stamp; }