641 |
* {@linkplain #getToolButton(int) tool button} |
* {@linkplain #getToolButton(int) tool button} |
642 |
*/ |
*/ |
643 |
public AbstractButton getButton(int id) { |
public AbstractButton getButton(int id) { |
644 |
|
|
645 |
|
//ACHUTNG: Das ist ein SK QUICK FIX! TODO |
646 |
|
if (!(toolAndActionButtons.get(id) instanceof AbstractButton)) return null; |
647 |
|
|
648 |
AbstractButton button = (AbstractButton) toolAndActionButtons.get(id); |
AbstractButton button = (AbstractButton) toolAndActionButtons.get(id); |
649 |
if (button == null) |
if (button == null) |
650 |
LOGGER.warn("Unknown tool or action ID: " + id); |
LOGGER.warn("Unknown tool or action ID: " + id); |
786 |
* is {@code false} |
* is {@code false} |
787 |
*/ |
*/ |
788 |
public void setAllToolsEnabled(boolean enabled, boolean hideOnDisable) { |
public void setAllToolsEnabled(boolean enabled, boolean hideOnDisable) { |
789 |
for (int tool : toolAndActionButtons.keySet()) |
for (int id : toolAndActionButtons.keySet()) { |
790 |
setButtonEnabled(tool, enabled, hideOnDisable); |
if (toolAndActionButtons.get(id) instanceof JToggleButton) { |
791 |
|
setButtonEnabled(id, enabled, hideOnDisable); |
792 |
|
} |
793 |
|
} |
794 |
} |
} |
795 |
|
|
796 |
/** |
/** |
797 |
* Sets the activation for all actions. |
* Sets the activation for all actions. |
798 |
* |
* |