Examples of ActionListener


Examples of java.awt.event.ActionListener

    content.add(createExtrasPanel());

    JButton cancelBtn = new JButton(Localizer.getLocalization(Localizer.I18N_CANCEL));
    JButton okBtn = new JButton(Localizer.getLocalization(Localizer.I18N_OK));

    cancelBtn.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        setVisible(false);
      }
    });

    okBtn.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        saveAndClose();
      }
    });
View Full Code Here

Examples of java.awt.event.ActionListener

    panel.add(mName, cc.xy(3,1));

    JButton changeTitle = new JButton(mLocalizer.msg("changeName","Change name"));
    changeTitle.setFocusable(false);

    changeTitle.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        setFavoriteName();
      }
    });
View Full Code Here

Examples of java.awt.event.ActionListener

    setLimitChannelEnabled(isLimitedByChannel);
    mTimePeriodChooser.setEnabled(isLimitedByTime);
    mLimitDaysCB.setEnabled(mLimitTimeCb.isSelected());

    mLimitChannelCb.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        setLimitChannelEnabled(mLimitChannelCb.isSelected());
      }
    });

    mLimitTimeCb.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        mTimePeriodChooser.setEnabled(mLimitTimeCb.isSelected());
        mLimitDaysCB.setEnabled(mLimitTimeCb.isSelected());
      }
    });

    mChangeChannelsBtn.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        ChannelChooserDlg dlg = new ChannelChooserDlg((Window)EditFavoriteDialog.this, mChannelArr, null,
            ChannelChooserDlg.SELECTABLE_ITEM_LIST);
        UiUtilities.centerAndShow(dlg);
        Channel[] chArr = dlg.getChannels();
View Full Code Here

Examples of java.awt.event.ActionListener

    CellConstraints cc = new CellConstraints();

    mPassProgramPlugins = mFavorite.getForwardPlugins();
    mPassProgramsLb = new JLabel(getForwardPluginsLabelString(mPassProgramPlugins));
    mChangePassProgramsBtn = new JButton(mLocalizer.msg("change", "Change"));
    mChangePassProgramsBtn.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        PluginChooserDlg dlg = new PluginChooserDlg((Window)EditFavoriteDialog.this, mPassProgramPlugins, null, ReminderPluginProxy.getInstance(), FavoritesPlugin.getInstance().getClientPluginTargetIds());
        UiUtilities.centerAndShow(dlg);
        ProgramReceiveTarget[] pluginArr = dlg.getReceiveTargets();
        if (pluginArr != null) {
          mPassProgramPlugins = pluginArr;
          mPassProgramsLb.setText(getForwardPluginsLabelString(mPassProgramPlugins));
          if (pluginArr.length == 0) {
            mPassProgramsCheckBox.setSelected(false);
            updatePassProgramsPanel();
          }
        }
      }
    });

    panel.add(mReminderAfterDownloadCb = new JCheckBox(mLocalizer.msg("autoAlert",
        "Alert me, whenever a matching program is discovered")), cc.xyw(1, 1, 2));

    panel.add(mPassProgramsCheckBox = new JCheckBox(mLocalizer.msg("passProgramsTo", "Pass programs to") +" "), cc.xy(1, 3));
    panel.add(mPassProgramsLb, cc.xy(2, 3));
    panel.add(mChangePassProgramsBtn, cc.xy(3, 3));
    mReminderAfterDownloadCb.setSelected(mFavorite.isRemindAfterDownload());

    mPassProgramsCheckBox.setSelected(mPassProgramPlugins != null && mPassProgramPlugins.length > 0 && !mPassProgramsLb.getText().equals(mLocalizer.msg("dontpass", "don't pass programs")));
    mPassProgramsCheckBox.setEnabled(FavoritesPlugin.getInstance().getClientPluginTargetIds().length == 0);
    mPassProgramsCheckBox.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        updatePassProgramsPanel();
      }
    });
View Full Code Here

Examples of java.awt.event.ActionListener

      panelActivate.addRow();
      panelActivate.add(new JLabel(mLocalizer.msg("notactivated", "This Plugin is currently not activated.")), cc.xy(2, panelActivate.getRow()));

      final JButton btnActivate = new JButton(mLocalizer.msg("activate", "Activate"));
      btnActivate.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent e) {
          try {
            btnActivate.setEnabled(false);
            PluginProxyManager.getInstance().activatePlugin(mPlugin);
View Full Code Here

Examples of java.awt.event.ActionListener

    panelBuilder.add(mDayOfWeekCombo, cc.xy(3,5));
    panelBuilder.add(mTimePeriodChooser, cc.xy(3,7));

    updateControls();

    mChannelCb.addActionListener(new ActionListener(){
      public void actionPerformed(ActionEvent e) {
        updateControls();
      }
    });

    mDayOfWeekCb.addActionListener(new ActionListener(){
      public void actionPerformed(ActionEvent e) {
        updateControls();
      }
    });

    mTimeCb.addActionListener(new ActionListener(){
      public void actionPerformed(ActionEvent e) {
        updateControls();
      }
    });

    mChooseChannelsBtn.addActionListener(new ActionListener(){
      public void actionPerformed(ActionEvent e) {
        Window parent = UiUtilities.getBestDialogParent(mContent);
        ChannelChooserDlg dlg = new ChannelChooserDlg(parent, mChannelArr,
            null,
            ChannelChooserDlg.SELECTABLE_ITEM_LIST);
View Full Code Here

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

Examples of java.awt.event.ActionListener

    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

Examples of java.awt.event.ActionListener

    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

Examples of java.awt.event.ActionListener

    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
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.