/** * Fires a change event to all registered listeners. */ public void fireChange() { if (listeners.isEmpty()) { return; } fireChange(new ChangeEvent(source)); }
/** Fires change event */ final void fireChangeEvent() { cs.fireChange(); }
public synchronized void setStatusText(String text) { if (text.equals(this.text)) { return; } this.text = text; if (text.length() > 0) { System.err.println("(" + text + ")"); // NOI18N } cs.fireChange(); }
@Override public void discardAllEdits() { Enumeration cursor = edits.elements(); while (cursor.hasMoreElements()) { UndoableEdit e = (UndoableEdit)cursor.nextElement(); e.die(); } edits = new Vector<UndoableEdit>(); indexOfNextAdd = 0; cs.fireChange(); }
/** Consume an undoable edit. * Delegates to superclass and notifies listeners. * @param ue the edit */ @Override public void undoableEditHappened(final UndoableEditEvent ue) { addEdit(ue.getEdit()); cs.fireChange(); }
@Override public void undo() throws CannotUndoException { if (inProgress) { UndoableEdit edit = editToBeUndone(); if (edit == null) { throw new CannotUndoException(); } undoTo(edit); } else { if (!canUndo()) { throw new CannotUndoException(); } int i = edits.size() - 1; try { for (; i >= 0; i--) { edits.get(i).undo(); // may throw CannotUndoException } hasBeenDone = false; } finally { if (i != -1) { // i-th edit's undo failed => redo the ones above int size = edits.size(); while (++i < size) { edits.get(i).redo(); } } } } cs.fireChange(); }
@Override public void redo() throws CannotRedoException { if (inProgress) { UndoableEdit edit = editToBeRedone(); if (edit == null) { throw new CannotRedoException(); } redoTo(edit); } else { if (!canRedo()) { throw new CannotRedoException(); } int i = 0; int size = edits.size(); try { for (; i < size; i++) { edits.get(i).redo(); // may throw CannotRedoException } hasBeenDone = true; } finally { if (i != size) { // i-th edit's redo failed => undo the ones below while (--i >= 0) { edits.get(i).undo(); } } } } cs.fireChange(); }
/** Notifies all registered listeners about the event. */ void fireChange() { if (cs != null) { cs.fireChange(); } // else in constructor }
@Override public void stateChanged(ChangeEvent event) { listeners.fireChange(); } }
void setValid(boolean v) { if (v == valid) return; valid = v; cs.fireChange(); }
@Override public void run() { changeSupport.fireChange(); } });
public void run() { computeLibraries(); cs.fireChange(); } });
@Override public void stateChanged(ChangeEvent e) { if (callBack != null) { callBack.run(); } this.changeSupport.fireChange(); } }
public void propertyChange(PropertyChangeEvent e) { if (SourceGroup.PROP_CONTAINERSHIP.equals(e.getPropertyName())) { cs.fireChange(); } }
public void propertyChange (PropertyChangeEvent event) { if (ScalaPlatform.PROP_SOURCE_FOLDER.equals(event.getPropertyName())) { cs.fireChange(); } }
public void propertyChange (PropertyChangeEvent event) { if (Library.PROP_CONTENT.equals(event.getPropertyName())) { synchronized (this) { this.cache = null; } cs.fireChange(); } }
public void propertyChange (PropertyChangeEvent event) { if (Library.PROP_CONTENT.equals(event.getPropertyName())) { synchronized (this) { this.cache = null; } cs.fireChange(); } }
public void addLibrary (LibraryImplementation impl) { synchronized (this) { addedLibraries.add(impl); actualLibraries.add(impl); } cs.fireChange(); }
void readSettings(WizardDescriptor wiz) { settings = wiz; String loc = (String) wiz.getProperty(SharableLibrariesUtils.PROP_LOCATION); helper = (AntProjectHelper) wiz.getProperty(SharableLibrariesUtils.PROP_HELPER); if (loc == null) { loc = "." + File.separator + "lib"; //NOI18N } else { loc = loc.substring(0, loc.length() - SharableLibrariesUtils.DEFAULT_LIBRARIES_FILENAME.length()); } setLibraryLocation(loc); support.fireChange(); }
public void instanceRemoved(String serverInstanceID) { InstanceProperties props = InstanceProperties.getInstanceProperties(serverInstanceID); if (server.handlesUri(serverInstanceID) && (props == null || isRegisteredWithUI(props))) { changeSupport.fireChange(); } }