Package java.awt.event

Examples of java.awt.event.ActionListener


        if(item instanceof SoftwareUpdateItem) {
          if(((SoftwareUpdateItem)item).getWebsite() != null) {
            JPopupMenu menu = new JPopupMenu();

            JMenuItem menuItem = new JMenuItem(mLocalizer.msg("openWebsite","Open website"), TVBrowserIcons.webBrowser(TVBrowserIcons.SIZE_SMALL));
            menuItem.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent e) {
                Launch.openURL(((SoftwareUpdateItem)item).getWebsite());
              }
            });
View Full Code Here


    pb.add(pane, cc.xyw(1,2,3));
   
    JButton[] buttons = {new JButton(mLocalizer.msg("showList","Show the list with the Plugins now")),
        new JButton(mLocalizer.msg("closeDialog","Close this dialog"))};
   
    buttons[0].addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        MainFrame.getInstance().showUpdatePluginsDlg(true);
        close();
      }
    });
   
    buttons[1].addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        close();
      }
    });
   
View Full Code Here

    JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));

    JButton config = new JButton(mLocalizer.msg("configure", "Search options"));

    config.addActionListener(new ActionListener() {

      public void actionPerformed(ActionEvent e) {
        showConfigDialog();
      }
View Full Code Here

    msg = mLocalizer.msg("trayAntialiasing", "Antialiasing enabled");
    checked = Settings.propTrayIsAntialiasing.getBoolean();
    mTrayIsAnialiasing = new JCheckBox(msg, checked);
   
    if(System.getProperty("os.name").toLowerCase().startsWith("linux") && (JavaVersion.getVersion() < JavaVersion.VERSION_1_6 || OperatingSystem.isKDE())) {
      mMinimizeToTrayChb.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          if(mMinimizeToTrayChb.isSelected()) {
            JOptionPane.showMessageDialog(builder.getPanel(),mLocalizer.msg("minimizeToTrayWarning","This function might not work as expected on Unix systems like KDE or Gnome.\nSo it's recommended not to select this checkbox."),mLocalizer.msg("warning","Warning"), JOptionPane.WARNING_MESSAGE);
          }
        }
    });
    }
   
    //filter settings
    ButtonGroup filter = new ButtonGroup();
   
    msg = mLocalizer.msg("trayFilterAll", "Filter all programs");
    mFilterAll = new JRadioButton(msg);

    msg = mLocalizer.msg("trayFilterNotMarked", "Filter programs, if not marked");
    checked = Settings.propTrayFilterNotMarked.getBoolean();
    mNoMarkedFiltering = new JRadioButton(msg, checked);

    msg = mLocalizer.msg("trayFilterNot", "Don't filter programs");
    checked = Settings.propTrayFilterNot.getBoolean();
    mNoFiltering = new JRadioButton(msg, checked);
   
    if(!mNoFiltering.isSelected() && !mNoMarkedFiltering.isSelected()) {
      mFilterAll.setSelected(true);
    }
   
    filter.add(mFilterAll);
    filter.add(mNoMarkedFiltering);
    filter.add(mNoFiltering);

    //create panel
    builder.addSeparator(mLocalizer.msg("basics", "Basic settings"), cc.xyw(1,1,3));
    builder.add(mTrayIsEnabled, cc.xy(2,3));
    builder.add(mTrayIsAnialiasing, cc.xy(2,4));
    builder.add(mMinimizeToTrayChb, cc.xy(2,5));
    builder.add(mNowOnRestore, cc.xy(2,6));
   
    builder.addSeparator(mLocalizer.msg("filter", "Filter settings"), cc.xyw(1,9,3));
    builder.add(mFilterAll, cc.xy(2,11));
    builder.add(mNoMarkedFiltering, cc.xy(2,12));
    builder.add(mNoFiltering, cc.xy(2,13));

    mTrayIsEnabled.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        mIsEnabled = mTrayIsEnabled.isSelected();
        TrayImportantSettingsTab.setTrayIsEnabled(mIsEnabled);
        TrayNowSettingsTab.setTrayIsEnabled(mIsEnabled);
        TrayOnTimeSettingsTab.setTrayIsEnabled(mIsEnabled);
View Full Code Here

    mSearchButton.setFocusPainted(false);
    mSearchButton.setBorderPainted(false);
    mSearchButton.setFocusable(false);
    mSearchButton.setRequestFocusEnabled(false);
    mSearchButton.setRolloverEnabled(false);
    mSearchButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        showConfigureDialog(mText);
      };
    });
    mSearchButton.addMouseListener(new MouseAdapter() {

      @Override
      public void mousePressed(MouseEvent e) {
        showConfigureDialog(mText);
      }
    });
    mSearchButton.setToolTipText(mLocalizer.msg("preferences.tooltip", "Click to change search preferences"));

    mGoOrCancelButton = new JButton(IconLoader.getInstance().getIconFromTheme("action", "media-playback-start", 16));
    mGoOrCancelButton.setBorder(BorderFactory.createEmptyBorder());
    mGoOrCancelButton.setContentAreaFilled(false);
    mGoOrCancelButton.setMargin(new Insets(0, 0, 0, 0));
    mGoOrCancelButton.setFocusPainted(false);
    mGoOrCancelButton.setVisible(false);
    mGoOrCancelButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        if(mGoButton) {
          startSearch();
        }
        else {
View Full Code Here

    CellConstraints cc = new CellConstraints();

    panel.add(form, cc.xyw(1, 1, 3));

    JButton ok = new JButton(Localizer.getLocalization(Localizer.I18N_OK));
    ok.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        configure.setVisible(false);
        mSearchFormSettings = form.getSearchFormSettings();
        saveSearchFormSettings();
        textField.requestFocusInWindow();
View Full Code Here

    mIconSeparator = (JLabel)c1.getComponent(0);
    mSeparator2 = (JLabel)c2.getComponent(0);
   
    setEnabled(true);
   
    mIsEnabled.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        setEnabled(false);
      }
    });
   
View Full Code Here

    mIconSeparator = (JLabel)c1.getComponent(0);
    mSeparator2 = (JLabel)c2.getComponent(0);
   
    setEnabled(true);
   
    mShowInSubMenu.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        mSize.setModel(new SpinnerNumberModel(((Integer)mSize.getValue()).intValue(), 1, 30, 1));
        mSizeInfo.setText(mLocalizer.msg("sizeInfo","(maximum: {0})",30));
      }
    });

    mShowInTray.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        int value = ((Integer)mSize.getValue()).intValue();
        mSize.setModel(new SpinnerNumberModel(value > 15 ? 15 : value, 1, 15, 1));
        mSizeInfo.setText(mLocalizer.msg("sizeInfo","(maximum: {0})",15));
      }
    });
   
    mIsEnabled.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        setEnabled(false);
      }
    });
   
View Full Code Here

        void handleView(Collection<Address> mbrs) {
            checkboxes.removeAll();
            for(final Address addr: mbrs) {
                final MyCheckBox box=new MyCheckBox("discard traffic from " + addr, addr);
                box.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        if(box.isSelected()) {
                            ignoredMembers.add(addr);
                        }
                        else {
View Full Code Here

      createAction(time, "#scrollTo" + time,
          scrollTo + time, IconLoader.getInstance().getIconFromTheme("actions",
              "scroll-to-specific-time", 16), IconLoader.getInstance().getIconFromTheme(
              "actions", "scroll-to-specific-time", 22), ToolBar.BUTTON_ACTION,
          new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              MainFrame.getInstance().scrollToTime(timeMinutes);
            }
          });
    }
View Full Code Here

TOP

Related Classes of java.awt.event.ActionListener

Copyright © 2015 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.