Package org.freeplane.plugin.workspace.model

Examples of org.freeplane.plugin.workspace.model.WorkspaceModelEvent


  }

  protected void fireTreeNodesChanged(Object source, TreePath path, int[] childIndices, Object[] children) {
    // Guaranteed to return a non-null array
    Object[] listeners = listenerList.getListenerList();
    WorkspaceModelEvent e = null;
    // Process the listeners last to first, notifying
    // those that are interested in this event
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
      if (listeners[i] == IProjectModelListener.class) {
        // Lazily create the event:
        if (e == null) e = new WorkspaceModelEvent(getProject(), source, path, childIndices, children);
        ((IProjectModelListener) listeners[i + 1]).treeNodesChanged(e);
      }
    }
  }
View Full Code Here


  }
 
  protected void fireTreeNodeChanged(Object source, TreePath path, int childIndex, Object children, Object oldValue, Object newValue) {
    // Guaranteed to return a non-null array
    Object[] listeners = listenerList.getListenerList();
    WorkspaceModelEvent e = new WorkspaceModelEvent(getProject(), source, path, WorkspaceModelEventType.DEFAULT, oldValue, newValue);
    // Process the listeners last to first, notifying
    // those that are interested in this event
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
      if (listeners[i] == IProjectModelListener.class) {
        ((IProjectModelListener) listeners[i + 1]).treeNodesChanged(e);
View Full Code Here

  }

  protected void fireTreeNodesInserted(Object source, TreePath path, int[] childIndices, Object[] children) {
    // Guaranteed to return a non-null array
    Object[] listeners = listenerList.getListenerList();
    WorkspaceModelEvent e = null;
    // Process the listeners last to first, notifying
    // those that are interested in this event
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
      if (listeners[i] == IProjectModelListener.class) {
        // Lazily create the event:
        if (e == null) e = new WorkspaceModelEvent(getProject(), source, path, childIndices, children);
        ((IProjectModelListener) listeners[i + 1]).treeNodesInserted(e);
      }
    }
  }
View Full Code Here

  }

  protected void fireTreeNodesRemoved(Object source, TreePath path, int[] childIndices, Object[] children) {
    // Guaranteed to return a non-null array
    Object[] listeners = listenerList.getListenerList();
    WorkspaceModelEvent e = null;
    // Process the listeners last to first, notifying
    // those that are interested in this event
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
      if (listeners[i] == IProjectModelListener.class) {
        // Lazily create the event:
        if (e == null) e = new WorkspaceModelEvent(getProject(), source, path, childIndices, children);
        ((IProjectModelListener) listeners[i + 1]).treeNodesRemoved(e);
      }
    }
  }
View Full Code Here

  }

  protected void fireTreeNodesRemoved(Object source, TreePath path, Object from, Object to) {
    // Guaranteed to return a non-null array
    Object[] listeners = listenerList.getListenerList();
    WorkspaceModelEvent e = null;
    // Process the listeners last to first, notifying
    // those that are interested in this event
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
      if (listeners[i] == IProjectModelListener.class) {
        // Lazily create the event:
        if (e == null) e = new WorkspaceModelEvent(getProject(), source, path, WorkspaceModelEventType.DELETED, from, to);
        ((IProjectModelListener) listeners[i + 1]).treeNodesRemoved(e);
      }
    }
  }
View Full Code Here

  }

  protected void fireTreeStructureChanged(Object source, TreePath path, int[] childIndices, Object[] children) {
    // Guaranteed to return a non-null array
    Object[] listeners = listenerList.getListenerList();
    WorkspaceModelEvent e = null;
    // Process the listeners last to first, notifying
    // those that are interested in this event
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
      if (listeners[i] == IProjectModelListener.class) {
        // Lazily create the event:
        if (e == null) e = new WorkspaceModelEvent(getProject(), source, path, childIndices, children);
        ((IProjectModelListener) listeners[i + 1]).treeStructureChanged(e);
      }
    }
  }
View Full Code Here

  }

  protected void fireTreeStructureChanged(Object source, TreePath path) {
    // Guaranteed to return a non-null array
    Object[] listeners = listenerList.getListenerList();
    WorkspaceModelEvent e = null;
    // Process the listeners last to first, notifying
    // those that are interested in this event
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
      if (listeners[i] == IProjectModelListener.class) {
        // Lazily create the event:
        if (e == null) e = new WorkspaceModelEvent(getProject(), source, path);
        ((IProjectModelListener) listeners[i + 1]).treeStructureChanged(e);
      }
    }
  }
View Full Code Here

  }

  protected void fireTreeStructureMoved(Object source, TreePath path, Object from, Object to) {
    // Guaranteed to return a non-null array
    Object[] listeners = listenerList.getListenerList();
    WorkspaceModelEvent e = null;
    // Process the listeners last to first, notifying
    // those that are interested in this event
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
      if (listeners[i] == IProjectModelListener.class) {
        // Lazily create the event:
        if (e == null) e = new WorkspaceModelEvent(getProject(), source, path, WorkspaceModelEventType.MOVED, from, to);
        ((IProjectModelListener) listeners[i + 1]).treeStructureChanged(e);
      }
    }
  }
View Full Code Here

  }

  protected void fireTreeNodeRenamed(Object source, TreePath path, Object from, Object to) {
    // Guaranteed to return a non-null array
    Object[] listeners = listenerList.getListenerList();
    WorkspaceModelEvent e = null;
    // Process the listeners last to first, notifying
    // those that are interested in this event
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
      if (listeners[i] == IProjectModelListener.class) {
        // Lazily create the event:
        if (e == null) e = new WorkspaceModelEvent(getProject(), source, path, WorkspaceModelEventType.RENAMED, from, to);
        ((IProjectModelListener) listeners[i + 1]).treeNodesChanged(e);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.freeplane.plugin.workspace.model.WorkspaceModelEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.