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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? workflow_graphed.java

?? 本人的工作流模型管理器與算法控制程序包
?? 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) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
奇米综合一区二区三区精品视频| 一本到不卡免费一区二区| 色偷偷久久一区二区三区| 宅男在线国产精品| 一区二区三区小说| 99久久精品国产导航| 国产午夜亚洲精品理论片色戒| 亚洲成av人片在www色猫咪| 高清在线观看日韩| 精品国产电影一区二区| 九色综合国产一区二区三区| 欧美日韩免费一区二区三区| 亚洲图片一区二区| 欧美体内she精高潮| 中文字幕亚洲一区二区av在线| 成人免费观看视频| 亚洲a一区二区| 国产成人综合精品三级| www.视频一区| 一区二区三区欧美日韩| 91啦中文在线观看| 亚洲自拍偷拍图区| 91精品国产免费久久综合| 久久精品国产精品亚洲精品| 日韩三级视频在线观看| 国产+成+人+亚洲欧洲自线| 国产亚洲制服色| 日本道精品一区二区三区| 日韩av一二三| 国产日韩欧美不卡| 色综合中文字幕国产| 亚洲线精品一区二区三区八戒| 欧美精品粉嫩高潮一区二区| 黄页视频在线91| 一区二区三区精品视频| 欧美成人一区二区| 91蝌蚪porny九色| 视频一区欧美精品| 日韩欧美国产一区二区三区| 久久国产视频网| 亚洲一区在线观看网站| 久久久综合九色合综国产精品| 欧美又粗又大又爽| 成人免费看的视频| 国产制服丝袜一区| 午夜精品福利一区二区三区av| 中文av一区二区| 国产日韩欧美一区二区三区乱码 | av不卡免费在线观看| 亚洲色图欧洲色图| 国产欧美精品一区二区色综合朱莉| 色中色一区二区| 色综合夜色一区| 成人精品gif动图一区| 国模无码大尺度一区二区三区| 亚洲成人免费影院| 亚洲精品免费播放| 一区二区三区四区中文字幕| 亚洲欧美成人一区二区三区| 国产精品久久久一本精品| 国产欧美精品一区二区三区四区 | 国产精品羞羞答答xxdd| 精品一区二区三区免费播放| 奇米综合一区二区三区精品视频| 亚洲亚洲精品在线观看| 日av在线不卡| 精品一区二区成人精品| 精品一区二区三区在线视频| 国产在线视频一区二区三区| 国产乱码精品一品二品| 国产999精品久久久久久| aaa国产一区| 69av一区二区三区| 中文字幕乱码一区二区免费| 亚洲精品国产视频| 国产自产v一区二区三区c| 国产一区二区成人久久免费影院| 成人黄色综合网站| 91精品国产免费| 综合网在线视频| 亚洲国产中文字幕在线视频综合 | 久久久久久一二三区| 亚洲欧美电影院| 日本亚洲三级在线| 成人一二三区视频| 欧美久久久一区| 国产精品乱码久久久久久| 亚洲与欧洲av电影| 不卡一二三区首页| 日韩精品影音先锋| 亚洲一本大道在线| 97se亚洲国产综合自在线 | 91免费视频观看| 欧美电影免费观看高清完整版在线观看| 国产精品久久久久久久久快鸭| 午夜国产精品一区| 欧美日韩一级黄| 亚洲摸摸操操av| 高清shemale亚洲人妖| 日韩精品一区二区三区在线| 亚洲综合视频在线| 91国内精品野花午夜精品| 国产嫩草影院久久久久| 蜜臀av性久久久久蜜臀aⅴ| 色久优优欧美色久优优| 中文字幕亚洲成人| 91视频免费播放| 亚洲一区在线观看免费观看电影高清 | 日韩一级高清毛片| 日日夜夜免费精品| 欧美精品日韩综合在线| 亚洲精品国产一区二区精华液 | 久久国产夜色精品鲁鲁99| 88在线观看91蜜桃国自产| 日韩有码一区二区三区| 久久综合色8888| 亚洲一区二区美女| 色88888久久久久久影院野外 | av不卡免费在线观看| 亚洲男人的天堂在线观看| 在线欧美日韩精品| 久久激情综合网| 中文字幕不卡在线播放| 色综合久久久久综合体桃花网| 亚洲狠狠丁香婷婷综合久久久| 欧美日韩高清在线播放| 国产99精品在线观看| 亚洲欧美电影院| wwwwww.欧美系列| 国产精品乡下勾搭老头1| 一区二区免费在线播放| 777a∨成人精品桃花网| 日韩激情视频网站| 国产精品麻豆视频| 欧美刺激脚交jootjob| 不卡的电影网站| 麻豆精品视频在线| 亚洲自拍偷拍九九九| 久久久精品综合| 欧美电影一区二区三区| 成人av网站在线| 五月激情六月综合| 综合婷婷亚洲小说| 亚洲精品一区二区三区影院 | 国产伦理精品不卡| 亚洲动漫第一页| 亚洲黄色在线视频| 久久综合狠狠综合久久综合88| 欧美日韩在线一区二区| 国产麻豆视频一区二区| 久久精品亚洲麻豆av一区二区| 国产成人免费视频网站高清观看视频| 欧美妇女性影城| 91网站最新地址| 成人午夜免费电影| 激情文学综合插| 国产麻豆成人传媒免费观看| 亚洲国产你懂的| 日日夜夜精品视频天天综合网| 午夜av区久久| 乱中年女人伦av一区二区| 日韩影视精彩在线| 麻豆91精品视频| 国内精品久久久久影院色| 激情深爱一区二区| 精彩视频一区二区| 国产精品一卡二卡| 亚洲午夜在线视频| 国产美女在线精品| 大胆亚洲人体视频| 97精品久久久久中文字幕| 在线精品亚洲一区二区不卡| 欧美日韩中文国产| 在线播放一区二区三区| 欧美电视剧免费全集观看| 久久综合九色综合97_久久久| 久久人人97超碰com| 久久久久久久久久久电影| 国产亚洲精品免费| 香蕉乱码成人久久天堂爱免费| 一区二区成人在线| 日韩精品电影一区亚洲| 国产电影精品久久禁18| 欧美日本在线一区| 中文字幕在线一区免费| 美女免费视频一区二区| av在线播放不卡| 久久一区二区三区国产精品| 亚洲欧美欧美一区二区三区| 六月丁香综合在线视频| 不卡av在线免费观看| xvideos.蜜桃一区二区| 天堂成人免费av电影一区| 国产成人精品网址| 精品久久久久一区二区国产| 日欧美一区二区| 欧美日韩国产另类不卡| 亚洲一区精品在线| 色综合久久88色综合天天6| 国产亚洲精品福利|