Package javax.swing

Examples of javax.swing.AbstractAction


        setFocusable(true);

        if (    SecurityCentre.getInstance().getUser() == null ||
                SecurityCentre.getInstance().getUser().isAdmin()) {
            getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), "DELETE");
            getActionMap().put("DELETE", new AbstractAction() {
                @Override
                public void actionPerformed(ActionEvent ignored) {
                    delete();
                }
            });
View Full Code Here


    private Component createOptionsPanel() {
        JPanel panel = new JPanel();
        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));

        hideButton = new JButton(new AbstractAction("Hide") {
            public void actionPerformed(ActionEvent e) {
                hideSelected();
            }
        });

        showButton = new JButton(new AbstractAction("Show") {
            public void actionPerformed(ActionEvent e) {
                showSelected();
            }
        });
View Full Code Here

    private Component createOptionsPanel() {
        JPanel panel = new JPanel();
        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));

        JButton importButton = new JButton(new AbstractAction("Import...") {
            public void actionPerformed(ActionEvent e) {
                importFilter();
            }
        });

        JButton exportButton = new JButton(new AbstractAction("Export...") {
            public void actionPerformed(ActionEvent e) {
                exportFilter();
            }
        });

        filterOutTasksWithNoDescriptionCheckBox = new JCheckBox(new AbstractAction("Hide Tasks With No Description") {
            public void actionPerformed(ActionEvent e) {
                filterOutTasksWithNoDescription();
            }
        });
View Full Code Here

    private Component createOkCancelPanel() {
        JPanel panel = new JPanel();
        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));

        JButton okButton = new JButton(new AbstractAction("OK") {
            public void actionPerformed(ActionEvent e) {
                close(true);
            }
        });

        JButton cancelButton = new JButton(new AbstractAction("Cancel") {
            public void actionPerformed(ActionEvent e) {
                close(false);
            }
        });
View Full Code Here

    private Component createStatusPanel() {
        statusPanel = new JPanel();
        statusPanel.setLayout(new BoxLayout(statusPanel, BoxLayout.X_AXIS));
        statusLabel = new JLabel();
       executeAgainButton = Utility.createButton( OutputPanel.class, "/org/gradle/gradleplugin/userinterface/swing/generic/tabs/execute.png", "Execute Again", new AbstractAction()
        {
           public void actionPerformed( ActionEvent e )
           {
              parent.executeAgain( request, OutputPanel.this );
           }
View Full Code Here

    private Component createTopPanel() {
        JPanel panel = new JPanel();
        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));

        refreshButton = Utility.createButton(getClass(), "refresh.png", "Refreshes the task tree", new AbstractAction("Refresh") {
            public void actionPerformed(ActionEvent e) {
                refresh();
            }
        });

        executeButton = Utility.createButton(getClass(), EXECUTE_PNG, "Execute the selected tasks", new AbstractAction("Execute") {
            public void actionPerformed(ActionEvent e) {
                executeSelectedTasks();
            }
        });

        toggleFilterButton = Utility.createToggleButton( getClass(), "filter.png", "Toggles the view to show either everything or only the filtered items", new AbstractAction("Filter") {
            public void actionPerformed(ActionEvent e) {
                populate();
            }
        });

        toggleFilterButton.setSelected(true);

        editFilterButton = Utility.createButton(getClass(), "edit-filter.png", "Edits the filter to control what is visible", new AbstractAction("Edit Filter...") {
            public void actionPerformed(ActionEvent e) {
                configureFilter();
            }
        });
View Full Code Here

     * Builds the popup menu
    */
    private void setupPopupMenu() {
        popupMenu = new JPopupMenu();

        executeMenuItem = Utility.createMenuItem( this.getClass(), "Execute", EXECUTE_PNG, new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                executeSelectedTasks();
            }
        });
        popupMenu.add(executeMenuItem);

        executeOnlyThisMenuItem = Utility.createMenuItem( this.getClass(), "Execute Ignoring Dependencies (-a)", BLANK_PNG, new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                executeSelectedTasks("-a");
            }
        });
        popupMenu.add(executeOnlyThisMenuItem);

        popupMenu.addSeparator();

        addToFavoritesMenuItem = Utility.createMenuItem( this.getClass(), "Add To Favorites", BLANK_PNG, new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                addSelectedToFavorites();
            }
        });
        popupMenu.add(addToFavoritesMenuItem);

        filterOutMenuItem = Utility.createMenuItem( this.getClass(), "Hide", BLANK_PNG, new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                hideSelection();
            }
        });
        popupMenu.add(filterOutMenuItem);

        editFileMenuItem = Utility.createMenuItem( this.getClass(), "Edit File", BLANK_PNG, new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                editSelectedFiles();
            }
        });
        popupMenu.add(editFileMenuItem);

        copyTaskNameMenuItem = Utility.createMenuItem( this.getClass(), "Copy Task Name", BLANK_PNG, new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                copySelectedTaskNames();
            }
        });

View Full Code Here

        JPanel panel = new JPanel();
        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));

        executeButton = new JButton(new ExecuteAction());

        addToFavoritesButton = new JButton(new AbstractAction("Add To Favorites") {
            public void actionPerformed(ActionEvent e) {
                addToFavorites();
            }
        });
View Full Code Here

        }

       currentDirectoryTextField.setText(currentDirectory);
        gradlePluginLord.setCurrentDirectory(new File(currentDirectory));

        JButton browseButton = new JButton(new AbstractAction("Browse...") {
            public void actionPerformed(ActionEvent e) {
                File file = browseForDirectory( gradlePluginLord.getCurrentDirectory() );
                if (file != null) {
                    setCurrentDirectory( file );
                }
View Full Code Here

        useCustomGradleExecutorCheckBox = new JCheckBox("Use Custom Gradle Executor");

        customGradleExecutorField = new JTextField();
        customGradleExecutorField.setEditable(false);

        browseForCustomGradleExecutorButton = new JButton(new AbstractAction("Browse...") {
            public void actionPerformed(ActionEvent e) {
                browseForCustomGradleExecutor();
            }
        });
View Full Code Here

TOP

Related Classes of javax.swing.AbstractAction

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.