Package com.intellij.ui

Examples of com.intellij.ui.TextFieldWithStoredHistory


        loadState(settings);
    }

    private void createUIComponents() {
        enabledCompilationCheckBox = new StateRestoringCheckBox(JFLEX_ENABLED_COMPILATION_KEY, true);
        TextFieldWithStoredHistory jflexHomeHistory = createHistoryTextField(JFLEX_HOME_KEY, JFlexSettings.getDefaultJFlexHome());
        jFlexHomeTextField = new ComponentWithBrowseButton<TextFieldWithStoredHistory>(jflexHomeHistory, null);
        fixButton(jflexHomeHistory, jFlexHomeTextField);
        TextFieldWithStoredHistory skeletonPathHistory = createHistoryTextField(JFLEX_SKELETON_KEY, JFlexSettings.getDefaultSkeletonPath(JFlexSettings.getDefaultJFlexHome()));
        skeletonPathTextField = new ComponentWithBrowseButton<TextFieldWithStoredHistory>(skeletonPathHistory, null);
        fixButton(skeletonPathHistory, skeletonPathTextField);
        commandLineOptionsTextField = createHistoryTextField(JFLEX_OPTIONS_KEY, JFlexSettings.DEFAULT_OPTIONS_CHARAT_NOBAK);
        enabledEmbedJavaCheckBox = new StateRestoringCheckBox(JFLEX_ENABLED_EMBED_JAVA_KEY, true);
    }
View Full Code Here


        });
    }

    @SuppressWarnings({"unchecked"})
    private static TextFieldWithStoredHistory createHistoryTextField(@NotNull String name, @NotNull String... defaultValues) {
        TextFieldWithStoredHistory storedHistory = new TextFieldWithStoredHistoryBugFixed(name);
        storedHistory.reset();
        List<String> list = storedHistory.getHistory();
        list.removeAll(Arrays.asList(defaultValues));
        if (list.isEmpty()) {
            // Default histories
            for (String defaultValue : defaultValues) {
                setTextWithHistory(storedHistory, defaultValue);
            }
        } else {
            storedHistory.setSelectedItem(list.get(list.size() - 1));
        }
        return storedHistory;
    }
View Full Code Here

    protected JComponent createCenterPanel() {
        return getPreviewComponent();
    }

    private void createUIComponents() {
        peopleTextField = new TextFieldWithStoredHistory("rb.people");

//        peopleTextField.addKeyboardListener(new KeyAdapter() {
//            @Override
//            public void keyTyped(KeyEvent e) {
//                System.out.println(e);
//                if (e.getKeyCode() == KeyEvent.VK_DELETE) {
//                    peopleTextField.setSelectedIndex(-1);
////                    peopleTextField
//                }
//            }
//        });
        groupTextField = new TextFieldWithStoredHistory("rb.group");
    }
View Full Code Here

TOP

Related Classes of com.intellij.ui.TextFieldWithStoredHistory

Copyright © 2018 www.massapicom. 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.