Package edu.indiana.extreme.xbaya.graph

Examples of edu.indiana.extreme.xbaya.graph.GraphPiece


    /*
     * If there is multi-selected and a click on a node, switch to that node
     * or deselect node if it is already selected
     */
    Point point = event.getPoint();
    GraphPiece clicked = this.graph.getGUI().getGraphPieceAt(point);
    if ((clicked instanceof Node) && this.multipleSelectedNodes != null) {
      Node node = (Node) clicked;
      if (!this.crtlPressed) {
        selectNode(node);
      }
View Full Code Here


    // Get focus to handle key board events
    this.panel.requestFocusInWindow();

    // Get select item
    GraphPiece selected = this.graph.getGUI().getGraphPieceAt(point);

    /*
     * Doing Nothing if pressed is on the selected node
     */
    if (this.multipleSelectedNodes != null) {
View Full Code Here

      this.draggedNode = null;

    }

    if (this.draggedPort != null) {
      GraphPiece graphPiece = this.graph.getGUI().getGraphPieceAt(point);
      if (graphPiece instanceof DynamicNode) {
        if (this.draggedPort.getKind() == Kind.DATA_OUT
            && draggedPort instanceof DataPort) {
          this.panel.setCursor(SwingUtil.CROSSHAIR_CURSOR);
          DynamicNode dynamicNode = (DynamicNode) graphPiece;
View Full Code Here

      this.panel.repaint();
      event.consume();
    }

    if (this.draggedPort != null) {
      GraphPiece piece = this.graph.getGUI().getGraphPieceAt(point);
      if (piece instanceof Port) {
        Port port = (Port) piece;
        // Display the information of port that is close to the mouse
        // pointer.
        if (this.draggedPort.getKind() == Kind.DATA_IN
View Full Code Here

  }

  private void mouseMoved(MouseEvent event) {
    Point point = event.getPoint();
    GraphPiece graphPiece = this.graph.getGUI().getGraphPieceAt(point);
    if (graphPiece instanceof Node) {
      Node node = (Node) graphPiece;
      if (node.getGUI().isInConfig(point)) {
        this.panel.setCursor(SwingUtil.HAND_CURSOR);
      } else {
View Full Code Here

    this.edgePopup.add(deleteItem);
  }

  private void maybeShowPopup(MouseEvent event) {
    if (event.isPopupTrigger()) {
      GraphPiece piece = this.graph.getGUI().getGraphPieceAt(
          event.getPoint());
      if (piece instanceof Node) {
        prepareNodePopupMenu((Node) piece);
        this.nodePopup.show(event.getComponent(), event.getX(),
            event.getY());
View Full Code Here

TOP

Related Classes of edu.indiana.extreme.xbaya.graph.GraphPiece

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.