Search in sources :

Example 1 with BorderHighlighter

use of org.jdesktop.swingx.decorator.BorderHighlighter in project com.revolsys.open by revolsys.

the class BaseJTable method addLastRowBorderPredicate.

protected void addLastRowBorderPredicate() {
    final HighlightPredicate lastPredicate = (final Component renderer, final ComponentAdapter adapter) -> {
        final int row = adapter.row;
        final int lastRowIndex = getRowCount() - 1;
        return row == lastRowIndex;
    };
    addHighlighter(new BorderHighlighter(lastPredicate, BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(191, 191, 191))));
}
Also used : Color(java.awt.Color) HighlightPredicate(org.jdesktop.swingx.decorator.HighlightPredicate) BorderHighlighter(org.jdesktop.swingx.decorator.BorderHighlighter) JComponent(javax.swing.JComponent) Component(java.awt.Component) ComponentAdapter(org.jdesktop.swingx.decorator.ComponentAdapter)

Aggregations

Color (java.awt.Color)1 Component (java.awt.Component)1 JComponent (javax.swing.JComponent)1 BorderHighlighter (org.jdesktop.swingx.decorator.BorderHighlighter)1 ComponentAdapter (org.jdesktop.swingx.decorator.ComponentAdapter)1 HighlightPredicate (org.jdesktop.swingx.decorator.HighlightPredicate)1