MCPcopy
hub / github.com/arduino/Arduino / EditorToolbar

Method EditorToolbar

app/src/processing/app/EditorToolbar.java:132–168  ·  view source on GitHub ↗
(Editor editor, JMenu menu)

Source from the content-addressed store, hash-verified

130 private boolean shiftPressed;
131
132 public EditorToolbar(Editor editor, JMenu menu) {
133 this.editor = editor;
134 this.menu = menu;
135
136 buttonCount = 0;
137 which = new int[BUTTON_COUNT];
138
139 //which[buttonCount++] = NOTHING;
140 which[buttonCount++] = RUN;
141 which[buttonCount++] = EXPORT;
142 which[buttonCount++] = NEW;
143 which[buttonCount++] = OPEN;
144 which[buttonCount++] = SAVE;
145 which[buttonCount++] = SERIAL;
146
147 currentRollover = -1;
148
149 bgcolor = Theme.getColor("buttons.bgcolor");
150 statusFont = Theme.getFont("buttons.status.font");
151 statusColor = Theme.getColor("buttons.status.color");
152
153 if (OSUtils.isMacOS() && VersionComparator.greaterThanOrEqual(OSUtils.version(), "10.12")) {
154 editor.addWindowListener(new WindowAdapter() {
155 public void windowActivated(WindowEvent e) {
156 if (touchBar == null) {
157 buildTouchBar();
158
159 touchBar.show(editor);
160 }
161 }
162 });
163 }
164
165 addMouseListener(this);
166 addMouseMotionListener(this);
167 KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(this);
168 }
169
170 private void buildTouchBar() {
171 if (touchBarImages == null) {

Callers

nothing calls this directly

Calls 5

getColorMethod · 0.95
getFontMethod · 0.95
isMacOSMethod · 0.95
greaterThanOrEqualMethod · 0.95
versionMethod · 0.95

Tested by

no test coverage detected