use of com.revolsys.swing.map.layer.record.LayerRecord in project com.revolsys.open by revolsys.
the class RecordLayerTablePanel method mouseClicked.
@Override
public void mouseClicked(final MouseEvent e) {
super.mouseClicked(e);
if (e.getClickCount() == 2 && SwingUtilities.isLeftMouseButton(e)) {
if (isEditing()) {
final JTable table = getTable();
final TableCellEditor cellEditor = table.getCellEditor();
cellEditor.stopCellEditing();
}
final LayerRecord record = RecordRowTable.getEventRecord();
this.layer.showForm(record);
}
}
use of com.revolsys.swing.map.layer.record.LayerRecord in project com.revolsys.open by revolsys.
the class RecordLayerHighlightedListSelectionModel method removeSelectionInterval.
@Override
public void removeSelectionInterval(final int index0, final int index1) {
super.removeSelectionInterval(convertRowIndexToModel(index0), convertRowIndexToModel(index1));
final List<LayerRecord> records = getObjects(index0, index1);
final AbstractRecordLayer layer = this.model.getLayer();
layer.unHighlightRecords(records);
}
use of com.revolsys.swing.map.layer.record.LayerRecord in project com.revolsys.open by revolsys.
the class RecordLayerHighlightedListSelectionModel method isSelectedIndex.
@Override
public boolean isSelectedIndex(final int index) {
final int rowIndex = convertRowIndexToModel(index);
final LayerRecord record = this.model.getRecord(rowIndex);
if (record != null) {
final AbstractRecordLayer layer = this.model.getLayer();
return layer.isHighlighted(record);
}
return false;
}
use of com.revolsys.swing.map.layer.record.LayerRecord in project com.revolsys.open by revolsys.
the class RecordLayerHighlightedListSelectionModel method getObjects.
protected List<LayerRecord> getObjects(final int index0, final int index1) {
final List<LayerRecord> records = new ArrayList<>();
for (int i = index0; i <= index1; i++) {
final int rowIndex = convertRowIndexToModel(i);
final LayerRecord record = this.model.getRecord(rowIndex);
records.add(record);
}
return records;
}
use of com.revolsys.swing.map.layer.record.LayerRecord in project com.revolsys.open by revolsys.
the class RecordLayerHighlightedListSelectionModel method setSelectionInterval.
@Override
public void setSelectionInterval(final int index0, final int index1) {
final List<LayerRecord> records = getObjects(index0, index1);
final AbstractRecordLayer layer = this.model.getLayer();
layer.setHighlightedRecords(records);
super.setSelectionInterval(convertRowIndexToModel(index0), convertRowIndexToModel(index1));
}
Aggregations