List of usage examples for javax.swing.event ListDataEvent ListDataEvent
public ListDataEvent(Object source, int type, int index0, int index1)
From source file:blue.automation.ParameterIdList.java
public void removeParameterId(int index) { parameters.remove(index);/* www . j a va2s .co m*/ ListDataEvent lde = new ListDataEvent(this, ListDataEvent.INTERVAL_REMOVED, index, index); fireRemoveDataEvent(lde); }
From source file:blue.mixer.EffectsChain.java
public Object removeElementAt(int index) { Object obj = effects.remove(index); if (obj instanceof Send) { ((Send) obj).removePropertyChangeListener(this); }// w ww . j a v a2 s . co m ListDataEvent lde = new ListDataEvent(this, ListDataEvent.INTERVAL_REMOVED, index, index); fireRemoveDataEvent(lde); fireAutomatableRemoved((Automatable) obj); return obj; }
From source file:blue.mixer.EffectsChain.java
public void pushUp(int index) { if (index > 0 && index < size()) { Object a = effects.remove(index - 1); effects.add(index, a);/* w ww. j ava 2s . c o m*/ ListDataEvent lde = new ListDataEvent(this, ListDataEvent.CONTENTS_CHANGED, index - 1, index); fireContentsChangedEvent(lde); } }
From source file:blue.mixer.EffectsChain.java
public void pushDown(int index) { if (index < size() - 1) { Object a = effects.remove(index + 1); effects.add(index, a);//from ww w . j av a 2s . c o m ListDataEvent lde = new ListDataEvent(this, ListDataEvent.CONTENTS_CHANGED, index - 1, index); fireContentsChangedEvent(lde); } }
From source file:blue.soundObject.jmask.Field.java
public Parameter removeParameter(int index) { Parameter retVal = (Parameter) parameters.remove(index); ListDataEvent lde = new ListDataEvent(this, ListDataEvent.INTERVAL_REMOVED, index, index); fireRemoveDataEvent(lde);/*from ww w . ja v a2 s . c om*/ return retVal; }
From source file:blue.soundObject.jmask.Field.java
public void addParameterBefore(int index, Generator gen) { Parameter param = Parameter.create(gen); parameters.add(index, param);/*www . j a va2 s . c o m*/ ListDataEvent lde = new ListDataEvent(this, ListDataEvent.INTERVAL_ADDED, index, index); fireAddDataEvent(lde); }
From source file:blue.soundObject.jmask.Field.java
public void addParameterAfter(int index, Generator gen) { Parameter param = Parameter.create(gen); parameters.add(index + 1, param);/*from ww w. jav a 2 s.c om*/ ListDataEvent lde = new ListDataEvent(this, ListDataEvent.INTERVAL_ADDED, index + 1, index + 1); fireAddDataEvent(lde); }
From source file:blue.soundObject.jmask.Field.java
public void changeParameter(int index, Generator gen) { Parameter param = Parameter.create(gen); parameters.remove(index);//from w w w . ja v a2 s . com parameters.add(index, param); ListDataEvent lde = new ListDataEvent(this, ListDataEvent.CONTENTS_CHANGED, index, index); fireContentsChangedEvent(lde); }
From source file:blue.mixer.EffectsChain.java
public void propertyChange(PropertyChangeEvent evt) { if (evt.getPropertyName().equals("sendChannel")) { Object obj = evt.getSource(); int index = ListUtil.indexOfByRef(effects, obj); if (index >= 0) { ListDataEvent lde = new ListDataEvent(this, ListDataEvent.CONTENTS_CHANGED, index, index); fireContentsChangedEvent(lde); }/* w ww .j a v a 2 s . co m*/ } }
From source file:net.pandoragames.far.ui.swing.FindFilePanel.java
public void addElement(Object item) { if (!itemList.contains(item)) { itemList.add(item);/*from www .j a va2 s . c om*/ ListDataEvent eve = new ListDataEvent(this, ListDataEvent.INTERVAL_ADDED, itemList.size() - 1, itemList.size() - 1); for (ListDataListener listener : listenerList) { listener.intervalAdded(eve); } } }