Package ch.rakudave.jnetmap.view.properties

Examples of ch.rakudave.jnetmap.view.properties.DeviceProperties


              .getGraphLayout();
          graph.addVertex(newVertex);
          layout.setLocation(newVertex, vv.getRenderContext()
              .getMultiLayerTransformer().inverseTransform(
                  e.getPoint()));
          new DeviceProperties(owner, newVertex, true);
        }
      }
      vv.repaint();
    }
  }
View Full Code Here


          }
        });
        popup.add(new AbstractAction(Lang.get("device.properties"), Icons.get("properties")) {
          @Override
          public void actionPerformed(ActionEvent e) {
            new DeviceProperties(owner, vertex, false);
          }
        });
        popup.add(new AbstractAction(Lang.get("action.delete"), Icons.get("remove")) {
          public void actionPerformed(ActionEvent e) {
            graph.removeVertex(vertex);
            vv.repaint();
          }
        });
      } else if (edge != null) {
        pickedEdgeState.pick(edge, false);
        popup.add(new AbstractAction(Lang.get("connection.properties"), Icons.get("properties")) {
          @Override
          public void actionPerformed(ActionEvent e) {
            Pair<Device> p = Controller.getCurrentMap().getEndpoints(edge);
            if (p.getFirst().equals(p.getSecond())) {
              new InterfaceProperties(owner, p.getFirst().getInterfaceFor(edge));
            } else {
              new ConnectionProperties(owner, edge);
            }
          }
        });
        popup.add(new AbstractAction(Lang.get("action.delete"), Icons.get("remove")) {
          public void actionPerformed(ActionEvent e) {
            graph.removeEdge(edge);
            vv.repaint();
          }
        });
      } else {
        popup.add(new AbstractAction(Lang.get("action.add"), Icons.get("add")) {
          public void actionPerformed(ActionEvent e) {
            Device newVertex = vertexFactory.create();
            new DeviceProperties(owner, newVertex, true);
            graph.addVertex(newVertex);
            layout.setLocation(newVertex, vv.getRenderContext()
              .getMultiLayerTransformer().inverseTransform(p));
            vv.repaint();
          }
View Full Code Here

      buttons.setMaximumSize(new Dimension(2000, 30));
      prefs = new JButton(new AbstractAction(Lang.get("menu.file.properties"), Icons.get("properties")) {
        @Override
        public void actionPerformed(ActionEvent e) {
          if (current != null)
            new DeviceProperties(owner, current, false);
        }
      });
        prefs.setEnabled(false);
      ports = new JButton(new AbstractAction(Lang.getNoHTML("port.scan"), Icons.get("find")) {
        @Override
View Full Code Here

TOP

Related Classes of ch.rakudave.jnetmap.view.properties.DeviceProperties

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.