예제 #1
0
  protected void createTools(JToolBar palette) {
    super.createTools(palette);

    Tool tool = new UndoableTool(new TextTool(this, new TextFigure()));
    palette.add(createToolButton(IMAGES + "TEXT", "Text Tool", tool));

    tool = new UndoableTool(new ConnectedTextTool(this, new TextFigure()));
    palette.add(createToolButton(IMAGES + "ATEXT", "Connected Text Tool", tool));

    tool = new URLTool(this);
    palette.add(createToolButton(IMAGES + "URL", "URL Tool", tool));

    tool = new UndoableTool(new CreationTool(this, new RectangleFigure()));
    palette.add(createToolButton(IMAGES + "RECT", "Rectangle Tool", tool));

    tool = new UndoableTool(new CreationTool(this, new RoundRectangleFigure()));
    palette.add(createToolButton(IMAGES + "RRECT", "Round Rectangle Tool", tool));

    tool = new UndoableTool(new CreationTool(this, new EllipseFigure()));
    palette.add(createToolButton(IMAGES + "ELLIPSE", "Ellipse Tool", tool));

    tool = new UndoableTool(new PolygonTool(this));
    palette.add(createToolButton(IMAGES + "POLYGON", "Polygon Tool", tool));

    tool = new UndoableTool(new CreationTool(this, new TriangleFigure()));
    palette.add(createToolButton(IMAGES + "TRIANGLE", "Triangle Tool", tool));

    tool = new UndoableTool(new CreationTool(this, new DiamondFigure()));
    palette.add(createToolButton(IMAGES + "DIAMOND", "Diamond Tool", tool));

    tool = new UndoableTool(new CreationTool(this, new LineFigure()));
    palette.add(createToolButton(IMAGES + "LINE", "Line Tool", tool));

    tool = new UndoableTool(new ConnectionTool(this, new LineConnection()));
    palette.add(createToolButton(IMAGES + "CONN", "Connection Tool", tool));

    tool = new UndoableTool(new ConnectionTool(this, new ElbowConnection()));
    palette.add(createToolButton(IMAGES + "OCONN", "Elbow Connection Tool", tool));

    tool = new UndoableTool(new ScribbleTool(this));
    palette.add(createToolButton(IMAGES + "SCRIBBL", "Scribble Tool", tool));

    tool = new UndoableTool(new BorderTool(this));
    palette.add(createToolButton(IMAGES + "BORDDEC", "Border Tool", tool));
  }
예제 #2
0
 public void destroy() {
   super.destroy();
   endAnimation();
 }
예제 #3
0
 protected void createMenus(JMenuBar mb) {
   super.createMenus(mb);
   addMenuIfPossible(mb, createAnimationMenu());
   addMenuIfPossible(mb, createImagesMenu());
   addMenuIfPossible(mb, createWindowMenu());
 }