Package javax.swing.text

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


        // textComponent.requestFocus();
        textComponent.setCaretColor(Color.BLUE);
        textComponent.setSelectionStart(start);
        textComponent.setCaretPosition(start);
        textComponent.setSelectionEnd(end);
        textComponent.requestFocus();
    }

    /**
     * ... and by the way switch the focus to the text area of the parameters.
     * @return
 
View Full Code Here


        public void actionPerformed(ActionEvent ae) {
            JTextComponent cmdText = cliGuiCtx.getCommandLine().getCmdText();
            ModelNode requestProperties = opDescription.get("result", "request-properties");
            if ((requestProperties == null) || (!requestProperties.isDefined()) || requestProperties.asList().isEmpty()) {
                cmdText.setText(addressPath + ":" + opName);
                cmdText.requestFocus();
                return;
            }

            if (node.isLeaf() && opName.equals("undefine-attribute")) {
                UserObject usrObj = (UserObject)node.getUserObject();
View Full Code Here

            }

            if (node.isLeaf() && opName.equals("undefine-attribute")) {
                UserObject usrObj = (UserObject)node.getUserObject();
                cmdText.setText(addressPath + ":" + opName + "(name=" + usrObj.getName() + ")");
                cmdText.requestFocus();
                return;
            }

            OperationDialog dialog = new OperationDialog(cliGuiCtx, node, opName, strDescription, requestProperties);
            dialog.setLocationRelativeTo(cliGuiCtx.getMainWindow());
View Full Code Here

        }

        JTextComponent cmdText = cliGuiCtx.getCommandLine().getCmdText();
        cmdText.setText(builder.toString());
        dispose();
        cmdText.requestFocus();
    }

}
View Full Code Here

        }

        JTextComponent cmdText = cliGuiCtx.getCommandLine().getCmdText();
        cmdText.setText(builder.toString());
        dispose();
        cmdText.requestFocus();
    }

    private void addDomainParams(StringBuilder builder) {
        if (!allRelevantServerGroups.isSelected()) {
            builder.append(serverGroupChooser.getCmdLineArg());
View Full Code Here

            addRequestProps(command, OperationDialog.this.props);

            JTextComponent cmdText = cliGuiCtx.getCommandLine().getCmdText();
            cmdText.setText(command.toString());
            OperationDialog.this.dispose();
            cmdText.requestFocus();
        }

        private void addRequestProps(StringBuilder command, SortedSet<RequestProp> reqProps) {
            boolean addedProps = false;
            command.append("(");
View Full Code Here

            // removes the user's portion of the to-be completed work to fix case errors
            // eg. User types "Hou", then hit Ctrl-Space. Then we replace "Hou" with "hour"
            editor.insertAutoCompleteString(userInputLength, insertion);

        }
        calEditor.requestFocus();
    }
   
    /**
     * Show the CodeEditorQuickCutPanel
     */
 
View Full Code Here

  private void startEditing() {
    JTextComponent textField = (JTextComponent) combo.getEditor().getEditorComponent();

    combo.setEditable(true);

    textField.requestFocus();

    String text = initialEditValue;
    if (initialEditValue == null)
      text = ""; // will revert to last valid value if invalid
View Full Code Here

    }

    @Override
    public void actionPerformed(ActionEvent e) {
        JTextComponent textComponent = (JTextComponent) getInvoker();
        textComponent.requestFocus();

        boolean haveSelection =
                textComponent.getSelectionStart() != textComponent.getSelectionEnd();

        if (e.getSource() == cutItem) {
View Full Code Here

            addRequestProps(command, OperationDialog.this.props);

            JTextComponent cmdText = cliGuiCtx.getCommandLine().getCmdText();
            cmdText.setText(command.toString());
            OperationDialog.this.dispose();
            cmdText.requestFocus();
        }

        private void addRequestProps(StringBuilder command, SortedSet<RequestProp> reqProps) {
            boolean addedProps = false;
            command.append("(");
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.