コード例 #1
0
 public void mouseDragged(MouseEvent e) {
   graphContainer
       .getGraphControl()
       .dispatchEvent(
           SwingUtilities.convertMouseEvent(
               (Component) e.getSource(), e, graphContainer.getGraphControl()));
 }
コード例 #2
0
    public void mousePressed(MouseEvent e) {
      // Selects to create a handler for resizing
      if (!graph.isCellSelected(cell)) {
        graphContainer.selectCellForEvent(cell, e);
      }

      // Initiates a resize event in the handler
      mxCellHandler handler = graphContainer.getSubHandler().getHandler(cell);

      if (handler != null) {
        // Starts the resize at index 7 (bottom right)
        handler.start(
            SwingUtilities.convertMouseEvent(
                (Component) e.getSource(), e, graphContainer.getGraphControl()),
            index);
        e.consume();
      }
    }
コード例 #3
0
ファイル: OWLVizView.java プロジェクト: protegeproject/owlviz
  protected void createToolBar(Controller assertedController, Controller inferredController) {

    addAction(
        new ShowClassCommand(
            this,
            getOWLModelManager(),
            (Frame) SwingUtilities.getAncestorOfClass(Frame.class, this)),
        "A",
        "A");
    addAction(new ShowSubclassesCommand(this), "A", "B");
    addAction(new ShowSuperclassesCommand(this), "A", "C");
    addAction(new ShowAllClassesCommand(this, getOWLModelManager()), "A", "D");
    addAction(new HideClassCommand(this), "A", "E");
    addAction(new HideSubclassesCommand(this), "A", "F");
    addAction(new HideClassesPastRadiusCommand(assertedController, inferredController), "A", "G");
    addAction(new HideAllClassesCommand(this), "A", "H");

    addAction(new ZoomOutCommand(this), "B", "A");
    addAction(new ZoomInCommand(this), "B", "B");
    addAction(new ExportCommand(this), "C", "A");
    addAction(new SetOptionsCommand(this, setupOptionsDialog()), "D", "A");
  }