Examples of addKeyListener()


Examples of javax.swing.JTextField.addKeyListener()

    final JPanel panel = new JPanel(new BorderLayout());
    panel.add(
      new JLabel("Enter expression for new tab:  "), BorderLayout.NORTH);

    final JTextField textField = new JTextField();
    textField.addKeyListener(
      new ExpressionRuleContext(new FilterModel(), textField));
    panel.add(textField, BorderLayout.CENTER);

    JButton ok = new JButton("OK");
    JButton close = new JButton("Close");
View Full Code Here

Examples of javax.swing.JTextField.addKeyListener()

                                                  50 );
            tf.setFont( new Font( "monospaced",
                                  Font.PLAIN,
                                  12 ) );

            tf.addKeyListener( new KeyAdapter() {
                public void keyPressed(KeyEvent e)
                {
                    if ( e.getKeyCode() == KeyEvent.VK_ENTER ) {
                        okButt.doClick();
                        return;
View Full Code Here

Examples of javax.swing.JTextField.addKeyListener()

                                                  50 );
            tf.setFont( new Font( "monospaced",
                                  Font.PLAIN,
                                  12 ) );

            tf.addKeyListener( new KeyAdapter() {
                public void keyPressed(KeyEvent e)
                {
                    if ( e.getKeyCode() == KeyEvent.VK_ENTER ) {
                        okButt.doClick();
                        return;
View Full Code Here

Examples of javax.swing.JTextPane.addKeyListener()

    // create components for query input with syntax highlighting...
    final LuposDocument document = new LuposDocument();
    final JTextPane tp_query = new LuposJTextPane(document);
    document.init(SPARQLParser.createILuposParser(new LuposDocumentReader(document)), false, 100);

    tp_query.addKeyListener(this.getKeyListener(frame));
    tp_query.setFont(new Font("Courier New", Font.PLAIN, 12));
    tp_query.setPreferredSize(new Dimension(794, 200));
    tp_query.setText("PREFIX dc:      <http://purl.org/dc/elements/1.1/>\nPREFIX dcterms: <http://purl.org/dc/terms/>\n\nSELECT DISTINCT ?author ?yr\nWHERE {\n  ?doc1 dc:author ?author.\n  ?doc1 dc:ref ?doc2.\n  ?doc2 dc:ref ?doc3.\n  ?doc3 dc:ref ?doc1.\n  OPTIONAL {\n    ?doc1 dcterms:issued ?yr. FILTER(?yr < 1950)\n  }\n}\nORDER BY ASC(?author)");

    new LinePainter(tp_query, new Color(202, 223, 245));
View Full Code Here

Examples of javax.swing.JToggleButton.addKeyListener()

            button.setLocale(locale);
           
            // set buttons' action command to a string containing the date they represent
            button.setActionCommand(String.valueOf(day));
            button.addActionListener(actionListener);
            button.addKeyListener(keyListener);
            dayButtons.add(button);
        }
       
        // initialize panels
        JPanel monthPanel = new JPanel();
View Full Code Here

Examples of javax.swing.JToolBar.addKeyListener()

        toolBar1.setFloatable(false);
        toolBar1.setRollover(true);
        toolBar1.add(unboundLToggle);
        toolBar1.add(closedLToggle);
        toolBar1.add(openLToggle);
        toolBar1.addKeyListener(keyListener);
      
        JToolBar toolBar2 = new JToolBar();
        toolBar2.setFloatable(false);
        toolBar2.setRollover(true);
        toolBar2.add(openRToggle);
View Full Code Here

Examples of javax.swing.JTree.addKeyListener()

        treeListener.setJTree(tree);
        tree.addTreeSelectionListener(treeListener);
        tree.addMouseListener(treeListener);
        tree.addMouseMotionListener(treeListener);
        tree.addKeyListener(treeListener);

        return tree;
    }

    /**
 
View Full Code Here

Examples of javax.swing.text.JTextComponent.addKeyListener()

        final AbstractAutoCompleteAdaptor adaptor = new ComboBoxAdaptor(comboBox);
        final AutoCompleteDocument document = createAutoCompleteDocument(adaptor, strictMatching,
                stringConverter, editorComponent.getDocument());
        decorate(editorComponent, document, adaptor);
       
        editorComponent.addKeyListener(new AutoComplete.KeyAdapter(comboBox));
       
        //set before adding the listener for the editor
        comboBox.setEditor(new AutoCompleteComboBoxEditor(comboBox.getEditor(), document.stringConverter));
       
        // Changing the l&f can change the combobox' editor which in turn
View Full Code Here

Examples of lupos.gui.anotherSyntaxHighlighting.LuposJTextPane.addKeyListener()

    // create components for query input with syntax highlighting...
    final LuposDocument document = new LuposDocument();
    final JTextPane tp_query = new LuposJTextPane(document);
    document.init(SPARQLParser.createILuposParser(new LuposDocumentReader(document)), false, 100);

    tp_query.addKeyListener(this.getKeyListener(frame));
    tp_query.setFont(new Font("Courier New", Font.PLAIN, 12));
    tp_query.setPreferredSize(new Dimension(794, 200));
    tp_query.setText("PREFIX dc:      <http://purl.org/dc/elements/1.1/>\nPREFIX dcterms: <http://purl.org/dc/terms/>\n\nSELECT DISTINCT ?author ?yr\nWHERE {\n  ?doc1 dc:author ?author.\n  ?doc1 dc:ref ?doc2.\n  ?doc2 dc:ref ?doc3.\n  ?doc3 dc:ref ?doc1.\n  OPTIONAL {\n    ?doc1 dcterms:issued ?yr. FILTER(?yr < 1950)\n  }\n}\nORDER BY ASC(?author)");

    new LinePainter(tp_query, new Color(202, 223, 245));
View Full Code Here

Examples of lupos.gui.operatorgraph.visualeditor.util.ConfirmationDialog.addKeyListener()

  protected int createShowTextDialog(final String title, final String text,
      final String confirmationText, final boolean query_or_n3) {
    final JPanel panel = new JPanel();

    final ConfirmationDialog dialog = new ConfirmationDialog(null, panel, title, confirmationText);
    dialog.addKeyListener(this.getKeyListener(dialog));

    final LuposDocument document = new LuposDocument();
    final JTextPane tp = new LuposJTextPane(document);
    document.init((query_or_n3) ? SPARQLParser.createILuposParser(new LuposDocumentReader(document)):TurtleParser.createILuposParser(new LuposDocumentReader(document)), false);
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.