Package uk.ac.man.cs.mig.util.graph.controller

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


    });
  }

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

    controller1.setGraphSelectionModel(selModel);
  }
View Full Code Here

TOP

Related Classes of uk.ac.man.cs.mig.util.graph.controller.GraphSelectionModel

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.