Examples of AbstractButton


Examples of javax.swing.AbstractButton

      final TableLayout btbl = new TableLayout(bPanelSize);

      final Container buttonPanel = new JPanel(btbl);
      _excludePanel.add(buttonPanel, "3, 1, 3, 1");

      final AbstractButton addButton = new JButton();
      final Action action = new BrowseAction(_parent, "Add...", new ExtensionFileFilter(FindBugsUtil.XML_EXTENSIONS_SET), new BrowseActionCallback() {
        @Override
        public void addSelection(final File selectedFile) {
          final String replacement = IdeaUtilImpl.collapsePathMacro(_parent.getProject(), selectedFile.getAbsolutePath());
          //noinspection unchecked
          ((DefaultListModel) _excludeList.getModel()).addElement(replacement);
          _preferences.getExcludeFilters().add(replacement);
          _preferences.setModified(true);
        }
      });
      addButton.setAction(action);
      buttonPanel.add(addButton, "1, 1, 1, 1");

      final AbstractButton removeButton = new JButton("Remove") {


        @Override
        public boolean isEnabled() {
          return super.isEnabled() && _excludeList.getSelectedIndex() > -1;
        }
      };
      removeButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(final ActionEvent e) {
          final int index = _excludeList.getSelectedIndex();
          getModel(_excludeList).remove(index);
          _preferences.removeExcludeFilter(index);
View Full Code Here

Examples of nextapp.echo2.app.button.AbstractButton

     */
    public static void clickRandomButton() {
        Window window = ApplicationInstance.getActive().getDefaultWindow();
        List buttonList = new ArrayList();
        findButtons(buttonList, window);
        AbstractButton button = (AbstractButton) buttonList.get((int) (buttonList.size() * Math.random()));
        button.doAction();
    }
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.