/** * {@inheritDoc} * * Implemented to return true if the adapter value equals the * this predicate's compare value. */ @Override public boolean isHighlighted(Component renderer, ComponentAdapter adapter) { if (compareValue == null) return adapter.getValue() == null; return compareValue.equals(adapter.getValue()); }
/** * @inheritDoc * * Implemented to return true if the adapter value equals the * this predicate's compare value. */ public boolean isHighlighted(Component renderer, ComponentAdapter adapter) { if (compareValue == null) return adapter.getValue() == null; return compareValue.equals(adapter.getValue()); }
/** * {@inheritDoc} * * Implemented to return true if the adapter value equals the * this predicate's compare value. */ @Override public boolean isHighlighted(Component renderer, ComponentAdapter adapter) { if (compareValue == null) return adapter.getValue() == null; return compareValue.equals(adapter.getValue()); }
/** * {@inheritDoc} * * Implemented to return true if the adapter value equals the * this predicate's compare value. */ @Override public boolean isHighlighted(Component renderer, ComponentAdapter adapter) { if (compareValue == null) return adapter.getValue() == null; return compareValue.equals(adapter.getValue()); }
/** * {@inheritDoc} * * Implemented to return true if the adapter value is an instance * of this predicate's class type. */ @Override public boolean isHighlighted(Component renderer, ComponentAdapter adapter) { return adapter.getValue() != null ? clazz.isAssignableFrom(adapter.getValue().getClass()) : false; }
/** * {@inheritDoc} * * Implemented to return true if the adapter value is an instance * of this predicate's class type. */ @Override public boolean isHighlighted(Component renderer, ComponentAdapter adapter) { return adapter.getValue() != null ? clazz.isAssignableFrom(adapter.getValue().getClass()) : false; }
/** * {@inheritDoc} * * Implemented to return true if the adapter value is an instance * of this predicate's class type. */ @Override public boolean isHighlighted(Component renderer, ComponentAdapter adapter) { return adapter.getValue() != null ? clazz.isAssignableFrom(adapter.getValue().getClass()) : false; }
public Icon getIcon(ComponentAdapter adapter) { AddOnWrapper aow = (AddOnWrapper) adapter.getValue(columnIndex); if (aow.isAddOnUpdateIssues()) { return ICON_ADD_ON_ISSUES; } return ICON_ADD_ON_EXTENSION_ISSUES; }
@Override public boolean isHighlighted(final Component renderer, final ComponentAdapter adapter) { AddOn.InstallationStatus status = ((AddOnWrapper) adapter.getValue(columnIndex)).getInstallationStatus(); return AddOn.InstallationStatus.UNINSTALLATION_FAILED == status || AddOn.InstallationStatus.SOFT_UNINSTALLATION_FAILED == status || AddOn.InstallationStatus.DOWNLOADING == status; } });
public Icon getIcon(ComponentAdapter adapter) { AddOnWrapper aow = (AddOnWrapper) adapter.getValue(columnIndex); if (aow.isAddOnRunningIssues()) { return ICON_ADD_ON_ISSUES; } return ICON_ADD_ON_EXTENSION_ISSUES; }
HighlightPredicate feverWarning = new HighlightPredicate() { int temperatureColumn = 10; public boolean isHighlighted(Component component, ComponentAdapter adapter) { return hasFever(adapter.getValue(temperatureColumn)); } private boolean hasFever(Object value) { if (!value instanceof Number) return false; return ((Number) value).intValue() > 37; } }; Highlighter hl = new ColorHighlighter(feverWarning, Color.RED, null); table.addHighlighter(hl);
@Override protected Component doHighlight(Component component, ComponentAdapter adapter) { ((JComponent) component).setToolTipText(getToolTip((AddOnWrapper) adapter.getValue(column))); return component; }