@@ -267,10 +267,6 @@ public void paintComponent(Graphics g) {
267267
268268 upper .add (textarea );
269269
270- // alternate spot for status, but ugly
271- // status = new EditorStatus(this);
272- // upper.add(status);
273-
274270 splitPane = new JSplitPane (JSplitPane .VERTICAL_SPLIT , upper , footer );
275271
276272 // disable this because it hides the message area, which is essential (issue #745)
@@ -285,48 +281,20 @@ public void paintComponent(Graphics g) {
285281 // remove an ugly border around anything in a SplitPane !$*&!%
286282 UIManager .getDefaults ().put ("SplitPane.border" , BorderFactory .createEmptyBorder ());
287283 // set the height per our gui design
288- //splitPane.setDividerSize(mode.getInteger("divider.height"));
289284 splitPane .setDividerSize (EditorStatus .HIGH );
290285
291286 // override the look of the SplitPane so that it's identical across OSes
292287 splitPane .setUI (new BasicSplitPaneUI () {
293288 public BasicSplitPaneDivider createDefaultDivider () {
294289 status = new EditorStatus (this , Editor .this );
295290 return status ;
296- /*
297- return new BasicSplitPaneDivider(this) {
298- final Color dividerColor = mode.getColor("divider.color"); //new Color(204, 204, 204);
299- final Color dotColor = mode.getColor("divider.dot.color"); //new Color(80, 80, 80);
300- int dotSize = mode.getInteger("divider.dot.diameter"); //3;
301-
302- @Override
303- public void paint(Graphics g) {
304- Graphics2D g2 = (Graphics2D) g;
305- g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
306- RenderingHints.VALUE_ANTIALIAS_ON);
307-
308- final int w = getSize().width;
309- final int h = getSize().height;
310- g.setColor(dividerColor);
311- g.fillRect(0, 0, w, h);
312-
313- g.setColor(dotColor);
314- int x = w/2 - dotSize/2;
315- int y = h/2 - dotSize/2;
316- g.fillOval(x, y, dotSize, dotSize);
317- }
318- };
319- */
320291 }
321292 });
322293
323294 box .add (splitPane );
324295
325296 contentPain .add (box );
326297
327- // get shift down/up events so we can show the alt version of toolbar buttons
328- //textarea.addKeyListener(toolbar);
329-
330298 // end an undo-chunk any time the caret moves unless it's when text is edited
331299 textarea .addCaretListener (new CaretListener () {
332300 String lastText = textarea .getText ();
@@ -348,8 +316,9 @@ public void caretUpdate(CaretEvent e) {
348316 state .apply (this );
349317
350318 // Set the minimum size for the editor window
351- setMinimumSize (new Dimension (Preferences .getInteger ("editor.window.width.min" ),
352- Preferences .getInteger ("editor.window.height.min" )));
319+ int minWidth = Preferences .getInteger ("editor.window.width.min" );
320+ int minHeight = Preferences .getInteger ("editor.window.height.min" );
321+ setMinimumSize (new Dimension (minWidth , minHeight ));
353322
354323 // Bring back the general options for the editor
355324 applyPreferences ();
@@ -362,10 +331,6 @@ public void caretUpdate(CaretEvent e) {
362331 public void windowGainedFocus (WindowEvent e ) {
363332 textarea .requestFocusInWindow ();
364333 }
365-
366- // public void windowLostFocus(WindowEvent e) {
367- // System.out.println("lost focus, should we tell the text area?");
368- // }
369334 });
370335
371336 // Open the document that was passed in
@@ -391,43 +356,9 @@ public void removeToolContrib(ToolContribution tc) {
391356 }
392357
393358
394- /**
395- * Broken out to get modes working for GSOC, but this needs a longer-term
396- * solution where the listeners are handled properly.
397- */
398359 protected JEditTextArea createTextArea () {
399360 return new JEditTextArea (new PdeTextAreaDefaults (mode ),
400361 new PdeInputHandler ());
401- /*
402- return new JEditTextArea(new PdeTextAreaDefaults(mode), new PdeInputHandler()) {
403- // this is a kludge that needs to be removed [fry 150120]
404- public void processKeyEvent(KeyEvent evt) {
405- // this had to be added in Processing 007X, because the menu key
406- // events weren't making it up to the frame.
407- super.processKeyEvent(evt);
408-
409- if (inputHandler != null) {
410- // Prevent sketch being marked modified cia ctrl-, on Windows/Linux
411- if ((evt.getModifiers() & InputEvent.CTRL_MASK) != 0 &&
412- evt.getKeyChar() == ',') {
413- System.out.println("skipping " + evt);
414- return;
415- }
416- switch (evt.getID()) {
417- case KeyEvent.KEY_TYPED:
418- inputHandler.keyTyped(evt);
419- break;
420- case KeyEvent.KEY_PRESSED:
421- inputHandler.keyPressed(evt);
422- break;
423- case KeyEvent.KEY_RELEASED:
424- inputHandler.keyReleased(evt);
425- break;
426- }
427- }
428- }
429- };
430- */
431362 }
432363
433364
@@ -453,16 +384,6 @@ public EditorState getEditorState() {
453384 }
454385
455386
456- // public void removeRecent() {
457- // Recent.remove(this);
458- // }
459- //
460- //
461- // public void addRecent() {
462- // Recent.handle(this);
463- // }
464-
465-
466387 /**
467388 * Handles files dragged & dropped from the desktop and into the editor
468389 * window. Dragging files into the editor window is the same as using
0 commit comments