Package edu.mit.csail.sdg.alloy4

Examples of edu.mit.csail.sdg.alloy4.OurSyntaxWidget.requestFocusInWindow()


            log.logRed("Search wrapped.");
        } else {
            log.clearError();
        }
        if (lastFindForward) t.moveCaret(i, i+lastFind.length()); else t.moveCaret(i+lastFind.length(), i);
        t.requestFocusInWindow();
        return null;
    }

    /** This method performs Edit->Goto. */
    private Runner doGoto() {
View Full Code Here


            int caret = t.getLineStartOffset(yy-1);
            int len = (yy==lineCount ? t.getText().length()+1 : t.getLineStartOffset(yy)) - caret;
            if (xx>len) xx=len;
            if (xx<1) xx=1;
            t.moveCaret(caret+xx-1, caret+xx-1);
            t.requestFocusInWindow();
        } catch(NumberFormatException ex) {
            log.logRed("The number must be 1 or greater.");
        } catch(Throwable ex) {
            // This error is not important
        }
View Full Code Here

         @Override public Object do_root() { return Browsable.this; }
      };
      tree.setBorder(new EmptyBorder(3,3,3,3));
      final JScrollPane scr = new JScrollPane(tree, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
      scr.addFocusListener(new FocusListener() {
         public void focusGained(FocusEvent e) { tree.requestFocusInWindow(); }
         public void focusLost(FocusEvent e) { }
      });
      final JFrame x = new JFrame("Parse Tree");
      x.setLayout(new BorderLayout());
      x.add(scr, BorderLayout.CENTER);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.