Package com.intellij.ui

Examples of com.intellij.ui.ToolbarDecorator


    }

    @Nullable
    @Override
    public JComponent createComponent() {
        ToolbarDecorator tablePanel = ToolbarDecorator.createDecorator(this.tableView, new ElementProducer<TwigPath>() {
            @Override
            public TwigPath createElement() {
                //IdeFocusManager.getInstance(TwigSettingsForm.this.project).requestFocus(TwigNamespaceDialog.getWindows(), true);
                return null//To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public boolean canCreateElement() {
                return true//To change body of implemented methods use File | Settings | File Templates.
            }
        });

        tablePanel.setEditAction(new AnActionButtonRunnable() {
            @Override
            public void run(AnActionButton anActionButton) {
                TwigSettingsForm.this.openTwigPathDialog(TwigSettingsForm.this.tableView.getSelectedObject());
            }
        });


        tablePanel.setAddAction(new AnActionButtonRunnable() {
            @Override
            public void run(AnActionButton anActionButton) {
               TwigSettingsForm.this.openTwigPathDialog(null);
            }
        });

        tablePanel.setEditActionUpdater(new AnActionButtonUpdater() {
            @Override
            public boolean isEnabled(AnActionEvent e) {
                TwigPath twigPath = TwigSettingsForm.this.tableView.getSelectedObject();
                return twigPath != null && twigPath.isCustomPath();
            }
        });

        tablePanel.setRemoveActionUpdater(new AnActionButtonUpdater() {
            @Override
            public boolean isEnabled(AnActionEvent e) {
                TwigPath twigPath = TwigSettingsForm.this.tableView.getSelectedObject();
                return twigPath != null && twigPath.isCustomPath();
            }
        });

        tablePanel.disableUpAction();
        tablePanel.disableDownAction();

        this.panelTableView.add(tablePanel.createPanel());

        return this.panel1;
    }
View Full Code Here


    }

    @Nullable
    @Override
    public JComponent createComponent() {
        ToolbarDecorator tablePanel = ToolbarDecorator.createDecorator(this.tableView, new ElementProducer<ContainerFile>() {
            @Override
            public ContainerFile createElement() {
                return null;
            }

            @Override
            public boolean canCreateElement() {
                return true;
            }
        });

        tablePanel.setEditAction(new AnActionButtonRunnable() {
            @Override
            public void run(AnActionButton anActionButton) {
                ContainerFile containerFile = ContainerSettingsForm.this.tableView.getSelectedObject();
                if(containerFile != null) {
                    String uri = ContainerSettingsForm.this.getPathDialog(null);
                    if(uri != null) {
                        containerFile.setPath(uri);
                        ContainerSettingsForm.this.changed = true;
                    }

                }
            }
        });

        tablePanel.setAddAction(new AnActionButtonRunnable() {
            @Override
            public void run(AnActionButton anActionButton) {
                String uri = ContainerSettingsForm.this.getPathDialog(null);
                if(uri != null) {
                    ContainerSettingsForm.this.tableView.getListTableModel().addRow(new ContainerFile(uri));
                    ContainerSettingsForm.this.changed = true;
                }
            }
        });

        this.panel1.add(tablePanel.createPanel());
        return this.panel1;
    }
View Full Code Here

    }

    @Nullable
    @Override
    public JComponent createComponent() {
        ToolbarDecorator tablePanel = ToolbarDecorator.createDecorator(this.tableView, new ElementProducer<MethodParameterSetting>() {
            @Override
            public MethodParameterSetting createElement() {
                //IdeFocusManager.getInstance(TwigSettingsForm.this.project).requestFocus(TwigNamespaceDialog.getWindows(), true);
                return null;
            }

            @Override
            public boolean canCreateElement() {
                return true;
            }
        });

        tablePanel.setEditAction(new AnActionButtonRunnable() {
            @Override
            public void run(AnActionButton anActionButton) {
                MethodParameterReferenceSettingsForm.this.openTwigPathDialog(MethodParameterReferenceSettingsForm.this.tableView.getSelectedObject());
            }
        });


        tablePanel.setAddAction(new AnActionButtonRunnable() {
            @Override
            public void run(AnActionButton anActionButton) {
                MethodParameterReferenceSettingsForm.this.openTwigPathDialog(null);
            }
        });

        tablePanel.disableUpAction();
        tablePanel.disableDownAction();

        this.panelConfigTableView.add(tablePanel.createPanel());

        return this.panel1;
    }
View Full Code Here

    }

    @Nullable
    @Override
    public JComponent createComponent() {
        ToolbarDecorator tablePanel = ToolbarDecorator.createDecorator(this.tableView, new ElementProducer<MethodSignatureSetting>() {
            @Override
            public MethodSignatureSetting createElement() {
                //IdeFocusManager.getInstance(TwigSettingsForm.this.project).requestFocus(TwigNamespaceDialog.getWindows(), true);
                return null;
            }

            @Override
            public boolean canCreateElement() {
                return true;
            }
        });

        tablePanel.setEditAction(new AnActionButtonRunnable() {
            @Override
            public void run(AnActionButton anActionButton) {
                MethodSignatureTypeSettingsForm.this.openTwigPathDialog(MethodSignatureTypeSettingsForm.this.tableView.getSelectedObject());
            }
        });


        tablePanel.setAddAction(new AnActionButtonRunnable() {
            @Override
            public void run(AnActionButton anActionButton) {
                MethodSignatureTypeSettingsForm.this.openTwigPathDialog(null);
            }
        });

        tablePanel.disableUpAction();
        tablePanel.disableDownAction();

        this.panelConfigTableView.add(tablePanel.createPanel());

        return this.panel1;
    }
View Full Code Here

            @Override public void mouseReleased(final MouseEvent mouseEvent) {}
            @Override public void mouseEntered(final MouseEvent mouseEvent) {}
            @Override public void mouseExited(final MouseEvent mouseEvent) {}
        });

        final ToolbarDecorator decorator = ToolbarDecorator.createDecorator(profileMappingTable);
        decorator
                .setAddAction(new AnActionButtonRunnable() {
                    @Override
                    public void run(final AnActionButton button) {
                        addRow();
                    }
                })
                .setEditAction(new AnActionButtonRunnable() {
                    @Override
                    public void run(final AnActionButton button) {
                        editRow();
                    }
                })
                .disableUpDownActions();

        cssDirPanel.add(decorator.createPanel(), GRIDCONSTRAINTS_FILL_ALL);

        resetPromptsButton.setMnemonic('r');
        resetPromptsButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(final ActionEvent actionEvent) {
View Full Code Here

TOP

Related Classes of com.intellij.ui.ToolbarDecorator

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.