Package javax.swing

Examples of javax.swing.JTextField.addKeyListener()


    addMouseAdapter(mFindNext);
    addMouseAdapter(mFindPrev);
    addMouseAdapter(mSearchCloseBtn);

    searchField.addKeyListener(new KeyAdapter() {
      public void keyReleased(KeyEvent e) {
        mFindNext.setEnabled(searchField.getText().length() > 0);
        mFindPrev.setEnabled(searchField.getText().length() > 0);
      }
    });
View Full Code Here


   
    private void buildDialog() {
        getContentPane().setLayout(Layout.getGBL());
       
        JTextField txtFilter = ComponentFactory.getShortTextField(255);
        txtFilter.addKeyListener(this);

        list = new DcObjectList(DcObjectList._LISTING, false, true);
        list.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
        list.addMouseListener(this);
View Full Code Here

   
    private void build() {
        setLayout(Layout.getGBL());
       
        JTextField txtFilter = ComponentFactory.getShortTextField(255);
        txtFilter.addKeyListener(this);

        listLeft = new DcFieldList();
        listLeft.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
        listLeft.addMouseListener(new ListMouseListener(ListMouseListener._RIGHT));
View Full Code Here

   
    private void buildDialog() {
        getContentPane().setLayout(Layout.getGBL());
       
        JTextField txtFilter = ComponentFactory.getShortTextField(255);
        txtFilter.addKeyListener(this);

        tblAvailableItems = new DcTable(true, false);
        tblAvailableItems.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
        tblAvailableItems.addMouseListener(new ListMouseListener(ListMouseListener._RIGHT));
       
View Full Code Here

        valueFieldPanel.add(textFieldWithPopup, BorderLayout.CENTER);
        editorComponent = textFieldWithPopup;
        final JTextField textField = editorComponent.getTextField();
        textField.setText(variable.getValue());

        textField.addKeyListener(ComboBoxSelectionKeyListener.create(dataTypeComboBox, false));

        variable.setTemporaryValueProvider(new StatementExecutionVariable.TemporaryValueProvider() {
            public String getValue() { return textField.getText().trim(); }
            public GenericDataType getDataType() { return (GenericDataType) dataTypeComboBox.getSelectedItem();}
        });
View Full Code Here

                TextFieldWithPopup textFieldWithPopup = new TextFieldWithPopup(project);

                textFieldWithPopup.setPreferredSize(new Dimension(200, -1));
                JTextField valueTextField = textFieldWithPopup.getTextField();
                valueTextField.getDocument().addDocumentListener(documentListener);
                valueTextField.addKeyListener(keyAdapter);
                valueTextField.addFocusListener(focusListener);

                if (cell.getRow().getModel().isEditable()) {
                    if (genericDataType == GenericDataType.DATE_TIME) {
                        textFieldWithPopup.createCalendarPopup(false);
View Full Code Here

    foreground.setRenderer(new ColorListCellRenderer());

    DefaultCellEditor backgroundEditor = new DefaultCellEditor(background);
    DefaultCellEditor foregroundEditor = new DefaultCellEditor(foreground);
    JTextField textField = new JTextField();
    textField.addKeyListener(
      new ExpressionRuleContext(filterModel, textField));
    table.getColumnModel().getColumn(0).setCellEditor(
      new DefaultCellEditor(textField));
    table.getColumnModel().getColumn(1).setCellEditor(backgroundEditor);
    table.getColumnModel().getColumn(2).setCellEditor(foregroundEditor);
View Full Code Here

    if (filterCombo.getEditor().getEditorComponent() instanceof JTextField) {
      String comboToolTipText =
        "Enter an expression, press enter to add to list";
      filterText = (JTextField) filterCombo.getEditor().getEditorComponent();
      filterText.setToolTipText(comboToolTipText);
      filterText.addKeyListener(
        new ExpressionRuleContext(filterModel, filterText));
      filterText.getDocument().addDocumentListener(
        new DelayedFilterTextDocumentListener(filterText));
      filterCombo.setEditable(true);
      filterCombo.addActionListener(
View Full Code Here

        });
      upperPanel.add(filterCombo, BorderLayout.CENTER);
    } else {
      filterText = new JTextField();
      filterText.setToolTipText("Enter an expression");
      filterText.addKeyListener(
        new ExpressionRuleContext(filterModel, filterText));
      filterText.getDocument().addDocumentListener(
        new DelayedFilterTextDocumentListener(filterText));
      upperPanel.add(filterText, BorderLayout.CENTER);
    }
View Full Code Here

    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

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.