FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bottom tabs now working, remove unused class · aengelke/processing@9a5ce2a · GitHub

Repository navigation

Commit 9a5ce2a

Browse files
committed
bottom tabs now working, remove unused class
1 parent 6a9dcdf commit 9a5ce2a

4 files changed

Lines changed: 30 additions & 160 deletions

File tree

‎app/src/processing/app/EditorFooter.java‎

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ public class EditorFooter extends Box {
4949

5050
static final int CURVE_RADIUS = 6;
5151

52-
static final int TAB_TOP = 2;
53-
static final int TAB_BOTTOM = 29;
52+
static final int TAB_TOP = 0;
53+
static final int TAB_BOTTOM = 27;
5454
// amount of extra space between individual tabs
5555
static final int TAB_BETWEEN = 3;
5656
// amount of margin on the left/right for the text on the tab
@@ -80,6 +80,7 @@ public class EditorFooter extends Box {
8080

8181
JPanel cardPanel;
8282
CardLayout cardLayout;
83+
Controller controller;
8384

8485

8586
public EditorFooter(Editor eddie) {
@@ -91,7 +92,9 @@ public EditorFooter(Editor eddie) {
9192
cardLayout = new CardLayout();
9293
cardPanel = new JPanel(cardLayout);
9394
add(cardPanel);
94-
add(new Controller());
95+
96+
controller = new Controller();
97+
add(controller);
9598
}
9699

97100

@@ -110,6 +113,7 @@ public void setPanel(Component comp) {
110113
for (Tab tab : tabs) {
111114
if (tab.comp == comp) {
112115
cardLayout.show(cardPanel, tab.name);
116+
repaint();
113117
}
114118
}
115119
}
@@ -152,6 +156,7 @@ public void mousePressed(MouseEvent e) {
152156
if (tab.contains(x)) {
153157
//editor.setFooterPanel(tab.index);
154158
cardLayout.show(cardPanel, tab.name);
159+
repaint();
155160
}
156161
}
157162
}
@@ -208,11 +213,11 @@ public void paintComponent(Graphics screen) {
208213
// now actually draw the tabs
209214
placeTabs(Editor.LEFT_GUTTER, g2);
210215

211-
// draw the two pixel line that extends left/right below the tabs
212-
g.setColor(tabColor[SELECTED]);
213-
// can't be done with lines, b/c retina leaves tiny hairlines
214-
g.fillRect(Editor.LEFT_GUTTER, TAB_BOTTOM,
215-
editor.getTextArea().getWidth() - Editor.LEFT_GUTTER, 2);
216+
// // draw the two pixel line that extends left/right below the tabs
217+
// g.setColor(tabColor[SELECTED]);
218+
// // can't be done with lines, b/c retina leaves tiny hairlines
219+
// g.fillRect(Editor.LEFT_GUTTER, TAB_BOTTOM,
220+
// editor.getTextArea().getWidth() - Editor.LEFT_GUTTER, 2);
216221

217222
screen.drawImage(offscreen, 0, 0, imageW, imageH, null);
218223
}
@@ -256,8 +261,8 @@ private void drawTab(Graphics g, int left, int right,
256261
Graphics2D g2 = (Graphics2D) g;
257262
EditorHeader.roundRect(g2, left, TAB_TOP, right, TAB_BOTTOM,
258263
0, 0,
259-
leftNotch ? CURVE_RADIUS : 0,
260-
rightNotch ? CURVE_RADIUS : 0);
264+
rightNotch ? CURVE_RADIUS : 0,
265+
leftNotch ? CURVE_RADIUS : 0);
261266
}
262267

263268

‎java/src/processing/mode/java/JavaEditor.java‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2570,15 +2570,20 @@ public void repaintErrorBar() {
25702570
}
25712571

25722572

2573-
/** Toggle between Console and Errors List */
2574-
public void showProblemListView(String buttonName) {
2575-
// CardLayout cl = (CardLayout) consoleProblemsPane.getLayout();
2576-
// cl.show(consoleProblemsPane, buttonName);
2577-
// ((JTabbedPane) consolePanel).setSelectedIndex(ERROR_TAB_INDEX);
2578-
footer.setPanel(errorTableScrollPane);
2573+
public void showConsole() {
2574+
footer.setPanel(console);
25792575
}
25802576

25812577

2578+
// /** Toggle between Console and Errors List */
2579+
// public void showProblemListView(String buttonName) {
2580+
//// CardLayout cl = (CardLayout) consoleProblemsPane.getLayout();
2581+
//// cl.show(consoleProblemsPane, buttonName);
2582+
//// ((JTabbedPane) consolePanel).setSelectedIndex(ERROR_TAB_INDEX);
2583+
// footer.setPanel(errorTableScrollPane);
2584+
// }
2585+
2586+
25822587
/** Updates the error table */
25832588
synchronized public boolean updateTable(final TableModel tableModel) {
25842589
return errorTable.updateTable(tableModel);

‎java/src/processing/mode/java/pdex/ErrorCheckerService.java‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
import processing.app.Base;
5353
import processing.app.Editor;
5454
import processing.app.EditorStatus;
55-
import processing.app.Language;
5655
import processing.app.Library;
5756
import processing.app.SketchCode;
5857
import processing.app.syntax.SyntaxDocument;
@@ -331,8 +330,10 @@ public void run() {
331330
checkCode();
332331
lastErrorCheckCall = System.currentTimeMillis();
333332

334-
if(!hasSyntaxErrors())
335-
editor.showProblemListView(Language.text("editor.footer.console"));
333+
if (!hasSyntaxErrors()) {
334+
// editor.showProblemListView(Language.text("editor.footer.console"));
335+
editor.showConsole();
336+
}
336337
// Make sure astGen has at least one CU to start with
337338
// This is when the loaded sketch already has syntax errors.
338339
// Completion wouldn't be complete, but it'd be still something

‎java/src/processing/mode/java/pdex/XQConsoleToggle.java‎

Lines changed: 0 additions & 141 deletions
This file was deleted.

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL