Examples of GraphSelectionModel


Examples of org.jgraph.graph.GraphSelectionModel

   *
   */
  public void setSelectionModel(GraphSelectionModel selectionModel) {
    if (selectionModel == null)
      selectionModel = EmptySelectionModel.sharedInstance();
    GraphSelectionModel oldValue = this.selectionModel;
    // Remove Redirector From Old Selection Model
    if (this.selectionModel != null && selectionRedirector != null)
      this.selectionModel
          .removeGraphSelectionListener(selectionRedirector);
    this.selectionModel = selectionModel;
View Full Code Here

Examples of org.jgraph.graph.GraphSelectionModel

    @Override
    public void valueChanged(GraphSelectionEvent e) {
      super.valueChanged(e);
      // Bomb out with a ClassCastException in case the event's source is
      // something unexpected. Not robust, but a good debugging feature :)
      GraphSelectionModel sm = (GraphSelectionModel) e.getSource();

      // New --- Bertoli Marco ---
      // Checks selection cells to enables correct toolbar elements
      boolean foundStations = false;
      boolean cannotAddBlockingRegion = false;
      boolean foundConnection = false;
      Object[] cells = sm.getSelectionCells();
      for (Object cell : cells) {
        if (cell instanceof JmtCell) {
          foundStations = true;
          // If selected station is member of a BlockingRegion, signals it
          if (((JmtCell) cell).getParent() instanceof BlockingRegion) {
View Full Code Here

Examples of org.jgraph.graph.GraphSelectionModel

   *
   */
  public void setSelectionModel(GraphSelectionModel selectionModel) {
    if (selectionModel == null)
      selectionModel = EmptySelectionModel.sharedInstance();
    GraphSelectionModel oldValue = this.selectionModel;
    // Remove Redirector From Old Selection Model
    if (this.selectionModel != null && selectionRedirector != null)
      this.selectionModel
          .removeGraphSelectionListener(selectionRedirector);
    this.selectionModel = selectionModel;
View Full Code Here

Examples of org.jgraph.graph.GraphSelectionModel

   *
   */
  public void setSelectionModel(GraphSelectionModel selectionModel) {
    if (selectionModel == null)
      selectionModel = EmptySelectionModel.sharedInstance();
    GraphSelectionModel oldValue = this.selectionModel;
    // Remove Redirector From Old Selection Model
    if (this.selectionModel != null && selectionRedirector != null)
      this.selectionModel
          .removeGraphSelectionListener(selectionRedirector);
    this.selectionModel = selectionModel;
View Full Code Here

Examples of uk.ac.man.cs.mig.util.graph.controller.GraphSelectionModel

  public void setGraphSelectionModel(GraphSelectionModel model) {
    if(model == null) {
      throw new NullPointerException("GraphSelectionModel must not be null");
    }

    GraphSelectionModel oldGraphSelectionModel = graphSelectionModel;
    graphSelectionModel = model;

    // Replace the current selection model, transfer the
    // listeners.
    Object[] selObjs = oldGraphSelectionModel.getSelectedObjects();

    Iterator it = oldGraphSelectionModel.getListeners();

    while(it.hasNext()) {
      GraphSelectionModelListener lsnr = (GraphSelectionModelListener) it.next();
      graphSelectionModel.addGraphSelectionModelListener(lsnr);
      // Remove the listener from the old selection model
View Full Code Here

Examples of uk.ac.man.cs.mig.util.graph.controller.GraphSelectionModel

    });
  }

  public void replaceSelectionModel()
  {
    GraphSelectionModel selModel = new DefaultGraphSelectionModel();

    controller1.setGraphSelectionModel(selModel);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.