public void intervalRemoved(ListDataEvent e) { if (e.getIndex0() != e.getIndex1()) { throw new IllegalStateException( "Unexpected behavior from Category " + d_category + ": list removals not one-by-one."); } fireTreeNodeRemoved(d_category, e.getIndex0()); }
public void intervalRemoved(ListDataEvent e) { /* Sync the SelectionModel with the DataModel. */ ListSelectionModel listSelectionModel = _list.getCheckBoxListSelectionModel(); if (listSelectionModel != null) { listSelectionModel.removeIndexInterval(e.getIndex0(), e.getIndex1()); } }
public void intervalAdded(ListDataEvent e) { int minIndex = Math.min(e.getIndex0(), e.getIndex1()); int maxIndex = Math.max(e.getIndex0(), e.getIndex1()); /* Sync the SelectionModel with the DataModel. */ ListSelectionModel listSelectionModel = _list.getCheckBoxListSelectionModel(); if (listSelectionModel != null) { listSelectionModel.insertIndexInterval(minIndex, maxIndex - minIndex + 1, true); } }
public void intervalRemoved(ListDataEvent e) { log.append("intervalRemoved: " + e.getIndex0() + ", " + e.getIndex1() + newline); log.setCaretPosition(log.getDocument().getLength()); }
public void contentsChanged(ListDataEvent e) { log.append("contentsChanged: " + e.getIndex0() + ", " + e.getIndex1() + newline); log.setCaretPosition(log.getDocument().getLength()); }
@Override public void contentsChanged(ListDataEvent e) { fireContentsChanged(this, e.getIndex0(), e.getIndex1()); }
@Override public void intervalRemoved(ListDataEvent e) { fireIntervalRemoved(this, e.getIndex0(), e.getIndex1()); }
private static void assertEvent( String description, int eventType, int index0, int index1, ListDataEvent event) { assertEquals("Type: " + description, eventType, event.getType()); assertEquals("Index0: " + description, index0, event.getIndex0()); assertEquals("Index1: " + description, index1, event.getIndex1()); }
public void intervalAdded(ListDataEvent e) { fireIntervalAdded(this, e.getIndex0(), e.getIndex1()); }