/** * @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 clazz.isAssignableFrom(adapter.getColumnClass()); }
/** * @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 clazz.isAssignableFrom(adapter.getColumnClass()); }
/** * @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 clazz.isAssignableFrom(adapter.getColumnClass()); }
/** * @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 clazz.isAssignableFrom(adapter.getColumnClass()); }
/** * Returns the common class of all data in the current column.<p> * * This implementation delegates to getColumnClass(int) with the current * column converted to model coordinates. * * @return the common class of all data in the current column. * @see #getColumnClass(int) */ public Class<?> getColumnClass() { return getColumnClass(convertColumnIndexToModel(column)); }
/** * Returns the common class of all data in the current column.<p> * * This implementation delegates to getColumnClass(int) with the current * column converted to model coordinates. * * @return the common class of all data in the current column. * @see #getColumnClass(int) */ public Class<?> getColumnClass() { return getColumnClass(convertColumnIndexToModel(column)); }
/** * Returns the common class of all data in the current column.<p> * * This implementation delegates to getColumnClass(int) with the current * column converted to model coordinates. * * @return the common class of all data in the current column. * @see #getColumnClass(int) */ public Class<?> getColumnClass() { return getColumnClass(convertColumnIndexToModel(column)); }
/** * Returns the common class of all data in the current column.<p> * * This implementation delegates to getColumnClass(int) with the current * column converted to model coordinates. * * @return the common class of all data in the current column. * @see #getColumnClass(int) */ public Class<?> getColumnClass() { return getColumnClass(convertColumnIndexToModel(column)); }
@Override protected void applyBackground(Component renderer, ComponentAdapter adapter ) { if (adapter.getValue() == null) { super.applyBackground(renderer, adapter); } else { if (adapter.getColumnClass().equals(Boolean.class)) { final boolean value = ((boolean) adapter.getValue()); if (adapter.isSelected()) { if (value) { renderer.setBackground(COLOR_PRESENCE_SELECTED); } else { renderer.setBackground(COLOR_ABSENCE_SELECTED); } } else { if (value) { renderer.setBackground(COLOR_PRESENCE); } else { renderer.setBackground(COLOR_ABSENCE); } } } else { super.applyBackground(renderer, adapter); } } } }
@Override protected void applyBackground(Component renderer, ComponentAdapter adapter ) { int columnModel = adapter.convertColumnIndexToModel(adapter.column); if (!tableModel.isSampleColumn(columnModel)) { super.applyBackground(renderer, adapter); } else { if (adapter.getValue() == null) { super.applyBackground(renderer, adapter); } else { if (Number.class.isAssignableFrom(adapter.getColumnClass())) { final Number value = ((Number) adapter.getValue()); Color color = numberToColor.apply(value); if (adapter.isSelected()) { renderer.setBackground(getComplementaryColor(color)); } else { renderer.setBackground(color); } } else { super.applyBackground(renderer, adapter); } } } } }