Ejemplo n.º 1
0
 /** Installs Shape and Arrow Tools into the toolbar */
 private void initSportTools() {
   for (ShapeTool s : ToolFactory.getShapeTools(sport)) {
     this.installToolInToolBar(toolbar, s);
   }
   toolbar.addSeparator();
   for (ArrowTool a : ToolFactory.getArrowTools(sport)) {
     this.installToolInToolBar(toolbar, a);
   }
 }
Ejemplo n.º 2
0
  /** Installs default Tools (Cursor, Add and Remove Point, Rotate, TextBox) into the toolbar */
  private void initDefaultTools() {
    cursorTool = currentTool = ToolFactory.getCursorTool();
    this.installToolInToolBar(toolbar, currentTool);
    toolbar.addSeparator();
    installAddRemovePointButtons();
    cursorButton = currentButton = (JButton) toolbar.getComponent(0);

    toolbar.addSeparator();
    this.installToolInToolBar(toolbar, ToolFactory.getTextBoxTool());
    toolbar.addSeparator();

    this.installRotateButton();
    toolbar.addSeparator();
  }