122 |
*/ |
*/ |
123 |
public static final int TOOL_SELECTION_REMOVE = 230; |
public static final int TOOL_SELECTION_REMOVE = 230; |
124 |
|
|
125 |
|
public static final int ACTION_CHARTS = 401; |
126 |
|
|
127 |
/** Tool currently selected */ |
/** Tool currently selected */ |
128 |
protected int selectedTool = TOOL_ZOOMIN; |
protected int selectedTool = TOOL_ZOOMIN; |
129 |
|
|
474 |
initToolBar(); |
initToolBar(); |
475 |
} |
} |
476 |
|
|
477 |
|
|
478 |
|
|
479 |
/** |
/** |
480 |
* Adds a tool to the tool bar and resets the toolbar GUI. |
* Adds a tool to the tool bar and resets the toolbar GUI. |
481 |
* |
* |
511 |
if (resetToolBar) |
if (resetToolBar) |
512 |
initToolBar(); |
initToolBar(); |
513 |
} |
} |
514 |
|
|
515 |
|
/** |
516 |
|
* Adds any JComponent to the tool bar. Does nothing if a tool or action with the |
517 |
|
* specified ID already exists! |
518 |
|
* |
519 |
|
* @param component A {@link JComponent} that shall be added |
520 |
|
* @param id The ID associaded with the {@link JComponent} |
521 |
|
* @param resetToolBar |
522 |
|
* indicates whether the toolbar GUI is reset after adding the |
523 |
|
* button (if adding several actions it useful only to reset the |
524 |
|
* GUI for the last added tool) |
525 |
|
*/ |
526 |
|
public void addJComponent(JComponent component, int id, |
527 |
|
boolean resetToolBar) { |
528 |
|
|
529 |
|
if (isButtonIDUsed(id)) { |
530 |
|
LOGGER |
531 |
|
.warn("addAction(.) ignored because ID already used for tool or action: " |
532 |
|
+ id); |
533 |
|
return; |
534 |
|
} |
535 |
|
|
536 |
|
toolAndActionButtons.put(id, component); |
537 |
|
if (resetToolBar) |
538 |
|
initToolBar(); |
539 |
|
} |
540 |
|
|
541 |
public void addSeparator(int id, Separator separator) { |
public void addSeparator(int id, Separator separator) { |
542 |
if (isButtonIDUsed(id)) { |
if (isButtonIDUsed(id)) { |