Search in sources :

Example 1 with LayerRecordTableModel

use of com.revolsys.swing.map.layer.record.table.model.LayerRecordTableModel in project com.revolsys.open by revolsys.

the class FormAllFieldsModifiedPredicate method add.

public static void add(final LayerRecordForm form, final BaseJTable table) {
    final LayerRecordTableModel model = table.getTableModel();
    final FormAllFieldsModifiedPredicate predicate = new FormAllFieldsModifiedPredicate(form, model);
    table.addHighlighter(new ColorHighlighter(new AndHighlightPredicate(predicate, HighlightPredicate.EVEN), WebColors.newAlpha(WebColors.YellowGreen, 127), WebColors.Black, WebColors.LimeGreen, Color.WHITE));
    table.addHighlighter(new ColorHighlighter(new AndHighlightPredicate(predicate, HighlightPredicate.ODD), WebColors.YellowGreen, WebColors.Black, WebColors.Green, Color.WHITE));
}
Also used : LayerRecordTableModel(com.revolsys.swing.map.layer.record.table.model.LayerRecordTableModel) ColorHighlighter(org.jdesktop.swingx.decorator.ColorHighlighter)

Example 2 with LayerRecordTableModel

use of com.revolsys.swing.map.layer.record.table.model.LayerRecordTableModel in project com.revolsys.open by revolsys.

the class FormAllFieldsErrorPredicate method add.

public static void add(final LayerRecordForm form, final BaseJTable table) {
    final LayerRecordTableModel model = table.getTableModel();
    final FormAllFieldsErrorPredicate predicate = new FormAllFieldsErrorPredicate(form, model);
    addErrorHighlighters(table, predicate);
}
Also used : LayerRecordTableModel(com.revolsys.swing.map.layer.record.table.model.LayerRecordTableModel)

Aggregations

LayerRecordTableModel (com.revolsys.swing.map.layer.record.table.model.LayerRecordTableModel)2 ColorHighlighter (org.jdesktop.swingx.decorator.ColorHighlighter)1