Package org.jgraph.graph

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


    @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

   *
   */
  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

   *
   */
  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

TOP

Related Classes of org.jgraph.graph.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.