Skip to content

Commit ac3f093

Browse files
committed
Revert "Added Schematic view (from wiring)."
This reverts commit ccb318c.
1 parent cb39ad9 commit ac3f093

File tree

5 files changed

+14
-341
lines changed

5 files changed

+14
-341
lines changed

app/src/processing/app/Base.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -436,17 +436,6 @@ public void storeSketch(Editor editor) {
436436
// .................................................................
437437

438438

439-
/** Command on Mac OS X, Ctrl on Windows and Linux */
440-
static final int SHORTCUT_KEY_MASK =
441-
Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
442-
/** Command-W on Mac OS X, Ctrl-W on Windows and Linux */
443-
static final KeyStroke WINDOW_CLOSE_KEYSTROKE =
444-
KeyStroke.getKeyStroke('W', SHORTCUT_KEY_MASK);
445-
/** Command-Option on Mac OS X, Ctrl-Alt on Windows and Linux */
446-
static final int SHORTCUT_ALT_KEY_MASK = ActionEvent.ALT_MASK |
447-
Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
448-
449-
450439
// Because of variations in native windowing systems, no guarantees about
451440
// changes to the focused and active Windows can be made. Developers must
452441
// never assume that this Window is the focused or active Window until this

app/src/processing/app/Editor.java

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ public class Editor extends JFrame implements RunnerListener {
9999
static SerialMenuListener serialMenuListener;
100100
static SerialMonitor serialMonitor;
101101

102-
Schematics schematics;
103-
104102
EditorHeader header;
105103
EditorStatus status;
106104
EditorConsole console;
@@ -627,16 +625,6 @@ public void actionPerformed(ActionEvent e) {
627625
// }
628626
// });
629627
// sketchMenu.add(item);
630-
631-
sketchMenu.addSeparator();
632-
633-
item = new JMenuItem("Show schematics");
634-
item.addActionListener(new ActionListener() {
635-
public void actionPerformed(ActionEvent e) {
636-
handleSchematics();
637-
}
638-
});
639-
sketchMenu.add(item);
640628

641629
sketchMenu.addSeparator();
642630

@@ -1906,6 +1894,7 @@ public Point getSketchLocation() {
19061894
return sketchWindowLocation;
19071895
}
19081896

1897+
19091898
/**
19101899
* Implements Sketch → Stop, or pressing Stop on the toolbar.
19111900
*/
@@ -1922,19 +1911,6 @@ public void handleStop() { // called by menu or buttons
19221911
}
19231912

19241913

1925-
public void handleSchematics() { // called by menu or buttons
1926-
//String s = sketch.getFolder().getAbsolutePath() + File.separator + sketch.getName() + ".png";
1927-
File file = new File(sketch.getFolder(), sketch.getName() + ".png");
1928-
if (file.exists()) {
1929-
if (schematics == null)
1930-
schematics = new Schematics(file);
1931-
schematics.showFrame(this);
1932-
} else {
1933-
statusNotice("This sketch doesn't include schematics");
1934-
}
1935-
}
1936-
1937-
19381914
/**
19391915
* Deactivate the Run button. This is called by Runner to notify that the
19401916
* sketch has stopped running, usually in response to an error (or maybe

app/src/processing/app/EditorToolbar.java

Lines changed: 13 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key
3737

3838
/** Rollover titles for each button. */
3939
static final String title[] = {
40-
"Verify", "Upload", "New", "Open", "Save", "Show Schematics", "Serial Monitor"
40+
"Verify", "Upload", "New", "Open", "Save", "Serial Monitor"
4141
};
4242

4343
/** Titles for each button when the shift key is pressed. */
@@ -56,20 +56,18 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key
5656
static final int BUTTON_IMAGE_SIZE = 33;
5757

5858

59-
static final int RUN = 0;
60-
static final int EXPORT = 1;
59+
static final int RUN = 0;
60+
static final int EXPORT = 1;
6161

62-
static final int NEW = 2;
63-
static final int OPEN = 3;
64-
static final int SAVE = 4;
65-
static final int SCHEMATICS = 5;
62+
static final int NEW = 2;
63+
static final int OPEN = 3;
64+
static final int SAVE = 4;
6665

67-
static final int SERIAL = 6;
66+
static final int SERIAL = 5;
6867

6968
static final int INACTIVE = 0;
7069
static final int ROLLOVER = 1;
7170
static final int ACTIVE = 2;
72-
static final int DISABLED = 3;
7371

7472
Editor editor;
7573

@@ -110,7 +108,6 @@ public EditorToolbar(Editor editor, JMenu menu) {
110108
which[buttonCount++] = NEW;
111109
which[buttonCount++] = OPEN;
112110
which[buttonCount++] = SAVE;
113-
which[buttonCount++] = SCHEMATICS;
114111
which[buttonCount++] = SERIAL;
115112

116113
currentRollover = -1;
@@ -261,22 +258,19 @@ private int findSelection(int x, int y) {
261258
for (int i = 0; i < buttonCount; i++) {
262259
if ((y > y1) && (x > x1[i]) &&
263260
(y < y2) && (x < x2[i])) {
264-
if (state[i] != DISABLED) {
265-
return i;
266-
}
261+
//System.out.println("sel is " + i);
262+
return i;
267263
}
268264
}
269265
return -1;
270266
}
271267

272268

273269
private void setState(int slot, int newState, boolean updateAfter) {
274-
if (state[slot]!=DISABLED) {
275-
state[slot] = newState;
276-
stateImage[slot] = buttonImages[which[slot]][newState];
277-
if (updateAfter) {
278-
repaint();
279-
}
270+
state[slot] = newState;
271+
stateImage[slot] = buttonImages[which[slot]][newState];
272+
if (updateAfter) {
273+
repaint();
280274
}
281275
}
282276

@@ -344,10 +338,6 @@ public void mousePressed(MouseEvent e) {
344338
editor.handleExport(e.isShiftDown());
345339
break;
346340

347-
case SCHEMATICS:
348-
editor.handleSchematics();
349-
break;
350-
351341
case SERIAL:
352342
editor.handleSerial();
353343
break;
@@ -381,15 +371,6 @@ public void deactivate(int what) {
381371
}
382372

383373

384-
public void disable(int what) {
385-
if (buttonImages != null && which!=null && state!=null && stateImage!=null) {
386-
state[what] = DISABLED;
387-
stateImage[what] = buttonImages[which[what]][INACTIVE];
388-
repaint();
389-
}
390-
}
391-
392-
393374
public Dimension getPreferredSize() {
394375
return getMinimumSize();
395376
}

0 commit comments

Comments
 (0)