亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? workflow_graphed.java

?? 用java實(shí)現(xiàn)的工作流
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
      // Remove Groups from Model (Without Children)
      graph.getGraphLayoutCache().remove(groups.toArray());
      // Select Children
      graph.setSelectionCells(children.toArray());
    }
  }

  // Determines if a Cell is a Group
  public boolean isGroup(Object cell) {
    // Map the Cell to its View
    CellView view = graph.getGraphLayoutCache().getMapping(cell, false);
    if (view != null) {
      return!view.isLeaf();

    }
    return false;
  }

  // Brings the Specified Cells to Front
  public void toFront(Object[] c) {
    graph.getGraphLayoutCache().toFront(c);
  }

  // Sends the Specified Cells to Back
  public void toBack(Object[] c) {
    graph.getGraphLayoutCache().toBack(c);
  }

  // Undo the last Change to the Model or the View
  public void undo() {
    try {
      undoManager.undo(graph.getGraphLayoutCache());
    }
    catch (Exception ex) {
      System.err.println(ex);
    }
    finally {
      updateHistoryButtons();
    }
  }

  // Redo the last Change to the Model or the View
  public void redo() {
    try {
      undoManager.redo(graph.getGraphLayoutCache());
    }
    catch (Exception ex) {
      System.err.println(ex);
    }
    finally {
      updateHistoryButtons();
    }
  }

  // Update Undo/Redo Button State based on Undo Manager
  protected void updateHistoryButtons() {
    // The View Argument Defines the Context
    undo.setEnabled(undoManager.canUndo(graph.getGraphLayoutCache()));
    redo.setEnabled(undoManager.canRedo(graph.getGraphLayoutCache()));
  }

  //
  // Listeners
  //

  // From GraphSelectionListener Interface
  public void valueChanged(GraphSelectionEvent e) {
    // Group Button only Enabled if more than One Cell Selected
    group.setEnabled(graph.getSelectionCount() > 1);
    // Update Button States based on Current Selection
    boolean enabled = !graph.isSelectionEmpty();
    remove.setEnabled(enabled);
    ungroup.setEnabled(enabled);
    tofront.setEnabled(enabled);
    toback.setEnabled(enabled);
    copy.setEnabled(enabled);
    cut.setEnabled(enabled);
  }

  //
  // KeyListener for Delete KeyStroke
  //
  public void keyReleased(KeyEvent e) {
  }

  public void keyTyped(KeyEvent e) {
  }

  public void keyPressed(KeyEvent e) {
    // Listen for Delete Key Press
    if (e.getKeyCode() == KeyEvent.VK_DELETE) {

      // Execute Remove Action on Delete Key Press
      remove.actionPerformed(null);
    }
  }

  //
  // Custom Graph
  //

  // Defines a Graph that uses the Shift-Button (Instead of the Right
  // Mouse Button, which is Default) to add/remove point to/from an edge.
  public class MyGraph
      extends JGraph {

    // Construct the Graph using the Model as its Data Source
    public MyGraph(GraphModel model) {
      super(model);

      // Use a Custom Marquee Handler
      setMarqueeHandler(new MyMarqueeHandler());
      // Tell the Graph to Select new Cells upon Insertion
      setSelectNewCells(true);
      // Make Ports Visible by Default
      setPortsVisible(true);
      // Use the Grid (but don't make it Visible)
      setGridEnabled(true);
      // Set the Grid Size to 10 Pixel
      setGridSize(6);
      // Set the Tolerance to 2 Pixel
      setTolerance(2);
      // Accept edits if click on background
      setInvokesStopCellEditing(true);
    }

    // Override Superclass Method to Return Custom EdgeView
    protected EdgeView createEdgeView(JGraph graph, CellMapper cm, Object cell) {
      // Return Custom EdgeView
      return new EdgeView(cell, graph, cm) {

        /**
         * Returns a cell handle for the view.
         */
        public CellHandle getHandle(GraphContext context) {
          return new MyEdgeHandle(this, context);
        }

      };
    }
  }

  //
  // Custom Edge Handle
  //

  // Defines a EdgeHandle that uses the Shift-Button (Instead of the Right
  // Mouse Button, which is Default) to add/remove point to/from an edge.
  public class MyEdgeHandle
      extends EdgeView.EdgeHandle {

    /**
     * @param edge
     * @param ctx
     */
    public MyEdgeHandle(EdgeView edge, GraphContext ctx) {
      super(edge, ctx);
    }

    // Override Superclass Method
    public boolean isAddPointEvent(MouseEvent event) {
      // Points are Added using Shift-Click
      return event.isShiftDown();
    }

    // Override Superclass Method
    public boolean isRemovePointEvent(MouseEvent event) {
      // Points are Removed using Shift-Click
      return event.isShiftDown();
    }

  }

  //
  // Custom Model
  //

  // A Custom Model that does not allow Self-References
  public static class MyModel
      extends DefaultGraphModel {
    // Override Superclass Method
    public boolean acceptsSource(Object edge, Object port) {
      // Source only Valid if not Equal Target
      return ( ( (Edge) edge).getTarget() != port);
    }

    // Override Superclass Method
    public boolean acceptsTarget(Object edge, Object port) {
      // Target only Valid if not Equal Source
      return ( ( (Edge) edge).getSource() != port);
    }
  }

  //
  // Custom MarqueeHandler

  // MarqueeHandler that Connects Vertices and Displays PopupMenus
  public class MyMarqueeHandler
      extends BasicMarqueeHandler {

    // Holds the Start and the Current Point
    protected Point2D start, current;

    // Holds the First and the Current Port
    protected PortView port, firstPort;

    // Override to Gain Control (for PopupMenu and ConnectMode)
    public boolean isForceMarqueeEvent(MouseEvent e) {
      if (e.isShiftDown()) {
        return false;
      }
      // If Right Mouse Button we want to Display the PopupMenu
      if (SwingUtilities.isRightMouseButton(e)) {

        // Return Immediately
        return true;
      }
      // Find and Remember Port
      port = getSourcePortAt(e.getPoint());
      // If Port Found and in ConnectMode (=Ports Visible)
      if (port != null && graph.isPortsVisible()) {
        return true;
      }
      // Else Call Superclass
      return super.isForceMarqueeEvent(e);
    }

    // Display PopupMenu or Remember Start Location and First Port
    public void mousePressed(final MouseEvent e) {
      // If Right Mouse Button
      if (SwingUtilities.isRightMouseButton(e)) {
        // Scale From Screen to Model
        Point2D loc = graph.fromScreen( (Point2D) e.getPoint().clone());
        // Find Cell in Model Coordinates
        Object cell = graph.getFirstCellForLocation(e.getX(), e.getY());
        // Create PopupMenu for the Cell
        JPopupMenu menu = createPopupMenu(e.getPoint(), cell);
        // Display PopupMenu
        menu.show(graph, e.getX(), e.getY());
        // Else if in ConnectMode and Remembered Port is Valid
      }
      else if (port != null && graph.isPortsVisible()) {
        // Remember Start Location
        start = graph.toScreen(port.getLocation(null));
        // Remember First Port
        firstPort = port;
      }
      else {
        // Call Superclass
        super.mousePressed(e);
      }
    }

    // Find Port under Mouse and Repaint Connector
    public void mouseDragged(MouseEvent e) {
      // If remembered Start Point is Valid
      if (start != null) {
        // Fetch Graphics from Graph
        Graphics g = graph.getGraphics();
        // Xor-Paint the old Connector (Hide old Connector)
        paintConnector(Color.black, graph.getBackground(), g);
        // Reset Remembered Port
        port = getTargetPortAt(e.getPoint());
        // If Port was found then Point to Port Location
        if (port != null) {
          current = graph.toScreen(port.getLocation(null));
          // Else If no Port was found then Point to Mouse Location
        }
        else {
          current = graph.snap(e.getPoint());
          // Xor-Paint the new Connector
        }
        paintConnector(graph.getBackground(), Color.black, g);
      }
      // Call Superclass
      super.mouseDragged(e);
    }

    public PortView getSourcePortAt(Point2D point) {
      // Scale from Screen to Model
      Point2D tmp = graph.fromScreen( (Point2D) point.clone());
      // Find a Port View in Model Coordinates and Remember
      return graph.getPortViewAt(tmp.getX(), tmp.getY());
    }

    // Find a Cell at point and Return its first Port as a PortView
    protected PortView getTargetPortAt(Point2D point) {
      // Find Cell at point (No scaling needed here)
      Object cell = graph.getFirstCellForLocation(point.getX(), point.getY());
      // Loop Children to find PortView
      for (int i = 0; i < graph.getModel().getChildCount(cell); i++) {
        // Get Child from Model
        Object tmp = graph.getModel().getChild(cell, i);
        // Get View for Child using the Graph's View as a Cell Mapper
        tmp = graph.getGraphLayoutCache().getMapping(tmp, false);
        // If Child View is a Port View and not equal to First Port
        if (tmp instanceof PortView && tmp != firstPort) {

          // Return as PortView
          return (PortView) tmp;
        }
      }
      // No Port View found
      return getSourcePortAt(point);
    }

    // Connect the First Port and the Current Port in the Graph or Repaint
    public void mouseReleased(MouseEvent e) {
      // If Valid Event, Current and First Port
      if (e != null
          && port != null
          && firstPort != null
          && firstPort != port) {
        // Then Establish Connection
        connect( (Port) firstPort.getCell(), (Port) port.getCell());
        // Else Repaint the Graph
      }
      else {
        graph.repaint();
        // Reset Global Vars
      }
      firstPort = port = null;
      start = current = null;
      // Call Superclass
      super.mouseReleased(e);
    }

    // Show Special Cursor if Over Port
    public void mouseMoved(MouseEvent e) {
      // Check Mode and Find Port
      if (e != null
          && getSourcePortAt(e.getPoint()) != null
          && graph.isPortsVisible()) {
        // Set Cusor on Graph (Automatically Reset)
        graph.setCursor(new Cursor(Cursor.HAND_CURSOR));
        // Consume Event
        // Note: This is to signal the BasicGraphUI's
        // MouseHandle to stop further event processing.
        e.consume();
      }
      else {

        // Call Superclass
        super.mouseMoved(e);
      }
    }

    // Use Xor-Mode on Graphics to Paint Connector
    protected void paintConnector(Color fg, Color bg, Graphics g) {
      // Set Foreground
      g.setColor(fg);
      // Set Xor-Mode Color
      g.setXORMode(bg);
      // Highlight the Current Port
      paintPort(graph.getGraphics());
      // If Valid First Port, Start and Current Point
      if (firstPort != null && start != null && current != null) {

        // Then Draw A Line From Start to Current Point
        g.drawLine( (int) start.getX(),
                   (int) start.getY(),
                   (int) current.getX(),
                   (int) current.getY());
      }
    }

    // Use the Preview Flag to Draw a Highlighted Port
    protected void paintPort(Graphics g) {
      // If Current Port is Valid
      if (port != null) {

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品一区二区久激情瑜伽| 麻豆精品在线观看| 日韩欧美国产综合在线一区二区三区| 国产一区二区视频在线播放| 亚洲欧美乱综合| 精品欧美久久久| 欧美午夜视频网站| 国产98色在线|日韩| 五月天精品一区二区三区| 国产精品理论片在线观看| 欧美一级精品在线| 日本高清无吗v一区| 国产一区二区成人久久免费影院| 一二三四社区欧美黄| 欧美激情在线一区二区三区| 日韩欧美美女一区二区三区| 欧美性videosxxxxx| 成人av电影在线| 国产一区二区伦理| 蜜臀精品一区二区三区在线观看| 亚洲一区在线视频| 亚洲精品日韩专区silk | 亚洲视频免费在线| 久久精品视频网| 日韩欧美国产一区二区三区| 欧美日韩和欧美的一区二区| 一本久久a久久精品亚洲| 国产.欧美.日韩| 极品销魂美女一区二区三区| 日韩成人一级片| 午夜精品视频一区| 亚洲尤物视频在线| 一级做a爱片久久| 亚洲精品乱码久久久久| 日韩毛片视频在线看| 国产精品色眯眯| 欧美国产精品劲爆| 中文字幕不卡一区| 国产女人aaa级久久久级| 国产亲近乱来精品视频| 久久这里都是精品| 欧美精品一区二区三| 久久综合色婷婷| 久久色.com| 国产日韩成人精品| 国产精品国产自产拍高清av王其 | 在线免费观看不卡av| 一本一道综合狠狠老| 色综合中文字幕国产| 成人app在线| 91在线视频免费观看| 91亚洲午夜精品久久久久久| 一本色道久久加勒比精品 | 免费在线成人网| 精品中文字幕一区二区小辣椒| 精品一区二区久久| 精品一区二区三区免费观看| 国产一区二区三区在线观看免费| 国产精品自在在线| 懂色av中文字幕一区二区三区 | 91精品啪在线观看国产60岁| 欧美一区二区精品久久911| 日韩女优电影在线观看| 国产亚洲短视频| 国产精品国产自产拍高清av王其| 尤物在线观看一区| 日韩电影在线观看一区| 国产美女在线观看一区| 91网站最新地址| 欧美日韩成人一区| 精品国产伦一区二区三区观看方式| 国产视频一区在线观看| 玉米视频成人免费看| 日本女人一区二区三区| 国产精品亚洲专一区二区三区 | 久久婷婷色综合| 国产精品久久久久久一区二区三区| 亚洲人123区| 图片区日韩欧美亚洲| 国产福利一区二区三区视频在线| 91在线免费看| 欧美一二三区在线| 国产精品理论在线观看| 日韩国产一二三区| 国产sm精品调教视频网站| 91精品福利视频| 久久久影视传媒| 一区二区三区在线播放| 黄页网站大全一区二区| 欧洲色大大久久| 久久久国产精品午夜一区ai换脸| 一区二区欧美精品| 久久91精品国产91久久小草| 在线亚洲欧美专区二区| 国产亚洲短视频| 日韩国产精品久久| av一二三不卡影片| 精品日韩av一区二区| 亚洲男人的天堂网| 国产精品一二二区| 91精品午夜视频| 亚洲欧美激情小说另类| 国产高清不卡一区| 7777精品伊人久久久大香线蕉超级流畅| 久久久www成人免费毛片麻豆 | 99视频有精品| 日韩欧美电影一区| 五月天国产精品| 91年精品国产| 2023国产一二三区日本精品2022| 亚洲图片有声小说| 91麻豆自制传媒国产之光| 2020日本不卡一区二区视频| 日本中文在线一区| 欧美日韩免费电影| 亚洲激情校园春色| 成人av电影免费在线播放| ww亚洲ww在线观看国产| 人人精品人人爱| 欧美嫩在线观看| 亚洲国产日韩一区二区| 色婷婷国产精品久久包臀| 亚洲欧洲精品一区二区三区不卡| 国产精品一区二区三区99| 日韩欧美色电影| 琪琪一区二区三区| 777午夜精品免费视频| 一区二区三区四区不卡在线| 99r精品视频| 亚洲三级免费观看| 97久久精品人人做人人爽50路 | 亚洲免费在线视频| 99久久久无码国产精品| 国产精品家庭影院| 99久久精品免费看| 国产精品久久久久天堂| 国产风韵犹存在线视精品| 久久综合色播五月| 国产在线一区观看| 久久综合九色综合97_久久久| 久久超碰97中文字幕| 久久综合九色综合欧美亚洲| 精品一区二区三区免费毛片爱| 精品欧美一区二区三区精品久久| 久久av中文字幕片| 久久久精品影视| 成人污污视频在线观看| 中文字幕综合网| 91福利国产成人精品照片| 亚洲小少妇裸体bbw| 欧美日韩在线免费视频| 亚洲成人av一区二区三区| 91.com视频| 国产一区二区三区免费播放| 国产三级精品在线| av电影天堂一区二区在线观看| 专区另类欧美日韩| 欧美午夜不卡在线观看免费| 天天爽夜夜爽夜夜爽精品视频| 91麻豆精品91久久久久久清纯| 免费高清在线一区| 国产日韩欧美不卡在线| 色综合久久99| 欧美午夜在线观看| 麻豆国产一区二区| 国产精品无码永久免费888| 99视频在线精品| 视频一区二区三区中文字幕| 欧美精品一区二区三区一线天视频 | 欧美va亚洲va| 成人av电影在线播放| 亚洲精品国产精华液| 日韩欧美久久一区| 99视频一区二区| 青青草97国产精品免费观看无弹窗版 | 亚洲欧美日韩一区| 在线成人av影院| 成人自拍视频在线| 亚洲国产一二三| 久久精品免费在线观看| 色婷婷av一区二区三区gif| 日本欧美大码aⅴ在线播放| 国产精品久久久久久亚洲毛片| 欧美日韩在线一区二区| 国产91丝袜在线18| 婷婷激情综合网| 国产精品美女一区二区在线观看| 欧美情侣在线播放| av成人老司机| 久草热8精品视频在线观看| 亚洲欧美国产毛片在线| 日韩午夜激情免费电影| 日本乱码高清不卡字幕| 国产麻豆精品theporn| 欧美性xxxxx极品少妇| 国产91高潮流白浆在线麻豆 | 欧美系列一区二区| 国产成人av资源| 蜜桃久久久久久久| 夜色激情一区二区|