| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -49,8 +49,8 @@ public class EditorFooter extends Box { | |||
| 49 | 49 | ||
| 50 | 50 | static final int CURVE_RADIUS = 6; | |
| 51 | 51 | ||
| 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; | ||
| 54 | 54 | // amount of extra space between individual tabs | |
| 55 | 55 | static final int TAB_BETWEEN = 3; | |
| 56 | 56 | // amount of margin on the left/right for the text on the tab | |
@@ -80,6 +80,7 @@ public class EditorFooter extends Box { | |||
| 80 | 80 | ||
| 81 | 81 | JPanel cardPanel; | |
| 82 | 82 | CardLayout cardLayout; | |
| 83 | + Controller controller; | ||
| 83 | 84 | ||
| 84 | 85 | ||
| 85 | 86 | public EditorFooter(Editor eddie) { | |
@@ -91,7 +92,9 @@ public EditorFooter(Editor eddie) { | |||
| 91 | 92 | cardLayout = new CardLayout(); | |
| 92 | 93 | cardPanel = new JPanel(cardLayout); | |
| 93 | 94 | add(cardPanel); | |
| 94 | - add(new Controller()); | ||
| 95 | + | ||
| 96 | + controller = new Controller(); | ||
| 97 | + add(controller); | ||
| 95 | 98 | } | |
| 96 | 99 | ||
| 97 | 100 | ||
@@ -110,6 +113,7 @@ public void setPanel(Component comp) { | |||
| 110 | 113 | for (Tab tab : tabs) { | |
| 111 | 114 | if (tab.comp == comp) { | |
| 112 | 115 | cardLayout.show(cardPanel, tab.name); | |
| 116 | + repaint(); | ||
| 113 | 117 | } | |
| 114 | 118 | } | |
| 115 | 119 | } | |
@@ -152,6 +156,7 @@ public void mousePressed(MouseEvent e) { | |||
| 152 | 156 | if (tab.contains(x)) { | |
| 153 | 157 | //editor.setFooterPanel(tab.index); | |
| 154 | 158 | cardLayout.show(cardPanel, tab.name); | |
| 159 | + repaint(); | ||
| 155 | 160 | } | |
| 156 | 161 | } | |
| 157 | 162 | } | |
@@ -208,11 +213,11 @@ public void paintComponent(Graphics screen) { | |||
| 208 | 213 | // now actually draw the tabs | |
| 209 | 214 | placeTabs(Editor.LEFT_GUTTER, g2); | |
| 210 | 215 | ||
| 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); | ||
| 216 | 221 | ||
| 217 | 222 | screen.drawImage(offscreen, 0, 0, imageW, imageH, null); | |
| 218 | 223 | } | |
@@ -256,8 +261,8 @@ private void drawTab(Graphics g, int left, int right, | |||
| 256 | 261 | Graphics2D g2 = (Graphics2D) g; | |
| 257 | 262 | EditorHeader.roundRect(g2, left, TAB_TOP, right, TAB_BOTTOM, | |
| 258 | 263 | 0, 0, | |
| 259 | - leftNotch ? CURVE_RADIUS : 0, | ||
| 260 | - rightNotch ? CURVE_RADIUS : 0); | ||
| 264 | + rightNotch ? CURVE_RADIUS : 0, | ||
| 265 | + leftNotch ? CURVE_RADIUS : 0); | ||
| 261 | 266 | } | |
| 262 | 267 | ||
| 263 | 268 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2570,15 +2570,20 @@ public void repaintErrorBar() { | |||
| 2570 | 2570 | } | |
| 2571 | 2571 | ||
| 2572 | 2572 | ||
| 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); | ||
| 2579 | 2575 | } | |
| 2580 | 2576 | ||
| 2581 | 2577 | ||
| 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 | + | ||
| 2582 | 2587 | /** Updates the error table */ | |
| 2583 | 2588 | synchronized public boolean updateTable(final TableModel tableModel) { | |
| 2584 | 2589 | return errorTable.updateTable(tableModel); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -52,7 +52,6 @@ | |||
| 52 | 52 | import processing.app.Base; | |
| 53 | 53 | import processing.app.Editor; | |
| 54 | 54 | import processing.app.EditorStatus; | |
| 55 | - import processing.app.Language; | ||
| 56 | 55 | import processing.app.Library; | |
| 57 | 56 | import processing.app.SketchCode; | |
| 58 | 57 | import processing.app.syntax.SyntaxDocument; | |
@@ -331,8 +330,10 @@ public void run() { | |||
| 331 | 330 | checkCode(); | |
| 332 | 331 | lastErrorCheckCall = System.currentTimeMillis(); | |
| 333 | 332 | ||
| 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 | + } | ||
| 336 | 337 | // Make sure astGen has at least one CU to start with | |
| 337 | 338 | // This is when the loaded sketch already has syntax errors. | |
| 338 | 339 | // Completion wouldn't be complete, but it'd be still something | |
| Back | FazBrowse Home | New Git URL |
0 commit comments