()
| 85 | |
| 86 | |
| 87 | public void rebuild() { |
| 88 | removeAll(); // remove previous components, if any |
| 89 | List<EditorButton> buttons = createButtons(); |
| 90 | |
| 91 | box = Box.createHorizontalBox(); |
| 92 | box.add(Box.createHorizontalStrut(Editor.LEFT_GUTTER)); |
| 93 | |
| 94 | rolloverLabel = new JLabel(); |
| 95 | rolloverLabel.setFont(mode.getFont("toolbar.rollover.font")); |
| 96 | rolloverLabel.setForeground(mode.getColor("toolbar.rollover.color")); |
| 97 | |
| 98 | for (EditorButton button : buttons) { |
| 99 | box.add(button); |
| 100 | box.add(Box.createHorizontalStrut(GAP)); |
| 101 | // registerButton(button); |
| 102 | } |
| 103 | // // remove the last gap |
| 104 | // box.remove(box.getComponentCount() - 1); |
| 105 | |
| 106 | // box.add(Box.createHorizontalStrut(LABEL_GAP)); |
| 107 | box.add(rolloverLabel); |
| 108 | // currentButton = runButton; |
| 109 | |
| 110 | // runButton.setRolloverLabel(label); |
| 111 | // stopButton.setRolloverLabel(label); |
| 112 | |
| 113 | box.add(Box.createHorizontalGlue()); |
| 114 | addModeButtons(box, rolloverLabel); |
| 115 | // Component items = createModeButtons(); |
| 116 | // if (items != null) { |
| 117 | // box.add(items); |
| 118 | // } |
| 119 | ModeSelector ms = new ModeSelector(); |
| 120 | box.add(ms); |
| 121 | box.add(Box.createHorizontalStrut(Editor.RIGHT_GUTTER)); |
| 122 | |
| 123 | setLayout(new BorderLayout()); |
| 124 | add(box, BorderLayout.CENTER); |
| 125 | } |
| 126 | |
| 127 | |
| 128 | // public void registerButton(EditorButton button) { |
no test coverage detected