Package javax.swing

Examples of javax.swing.JButton


     
      pb.add(mRemFormatTextField, cc.xyw(2, pb.getRow(), pb.getColumnCount() - 1));
     
      pb.addParagraph(mLocalizer.msg("parametersAdditional", "Additional commands"));
      pb.addRow();
      JButton additional = new JButton(mLocalizer.msg("Additional", "Define additional commands"));
     
      additional.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          AdditionalParams params = new AdditionalParams(mKonfigurator, mData);
          UiUtilities.centerAndShow(params);
        }
      });
View Full Code Here


    JPanel panel2=new JPanel(new BorderLayout());
    JPanel panel3=new JPanel(new BorderLayout());
    JPanel panel4=new JPanel(new BorderLayout());
    JPanel panel5=new JPanel(new BorderLayout());

    mRightBt = new JButton(TVBrowserIcons.right(TVBrowserIcons.SIZE_LARGE));
    msg = mLocalizer.msg("tooltip.right", "Move selected rows in right list");
    mRightBt.setToolTipText(msg);
    mRightBt.setMargin(UiUtilities.ZERO_INSETS);

    mLeftBt = new JButton(TVBrowserIcons.left(TVBrowserIcons.SIZE_LARGE));
    msg = mLocalizer.msg("tooltip.left", "Move selected rows in left list");
    mLeftBt.setToolTipText(msg);
    mLeftBt.setMargin(UiUtilities.ZERO_INSETS);

    mUpBt = new JButton(TVBrowserIcons.up(TVBrowserIcons.SIZE_LARGE));
    msg = mLocalizer.msg("tooltip.up", "Move selected rows up");
    mUpBt.setToolTipText(msg);
    mUpBt.setMargin(UiUtilities.ZERO_INSETS);

    mDownBt = new JButton(TVBrowserIcons.down(TVBrowserIcons.SIZE_LARGE));
    msg = mLocalizer.msg("tooltip.down", "Move selected rows down");
    mDownBt.setToolTipText(msg);
    mDownBt.setMargin(UiUtilities.ZERO_INSETS);

    panel2.add(mRightBt,BorderLayout.SOUTH);
View Full Code Here

   *          Das Icon des Buttons (Kann ebenfalls null sein, wenn der Button
   *          kein Icon enthalten soll).
   * @return button
   */
  public static JButton createToolBarButton(String text, Icon icon) {
    final JButton btn;
    if (icon == null) {
      btn = new JButton(text);
    } else {
      btn = new JButton(icon);
      btn.setToolTipText(text);
      btn.setBorderPainted(false);
      btn.setMargin(ZERO_INSETS);

      btn.addMouseListener(new MouseAdapter() {
        @Override
        public void mouseEntered(MouseEvent e) {
          if (btn.isEnabled()) {
            btn.setBorderPainted(true);
          }
        }

        @Override
        public void mouseExited(MouseEvent e) {
          btn.setBorderPainted(false);
        }
      });
    }
    btn.setFocusPainted(false);

    return btn;
  }
View Full Code Here

      layout.appendRow(RowSpec.decode("3dlu"));
      contentPane.add(lb, cc.xy(1,pos));
      pos += 2;
    }

    JButton okBt = new JButton(Localizer.getLocalization(Localizer.I18N_OK));
    JButton cancelBt = new JButton(Localizer.getLocalization(Localizer.I18N_CANCEL));

    okBt.addActionListener(new ActionListener(){
      public void actionPerformed(ActionEvent event) {
        Object[] o = mPluginItemList.getSelection();
        mResultPluginArr = new Marker[o.length];
        for (int i=0;i<o.length;i++) {
          mResultPluginArr[i]=(Marker)o[i];
        }
        setVisible(false);
      }
      });

    cancelBt.addActionListener(new ActionListener(){
      public void actionPerformed(ActionEvent event) {
        mResultPluginArr = null;
        setVisible(false);
      }
    });
View Full Code Here

    mStorePassword.setSelected(mStore);
   
    ButtonBarBuilder2 builder = new ButtonBarBuilder2();
    builder.addGlue();
   
    JButton ok = new JButton(Localizer.getLocalization(Localizer.I18N_OK));
   
    ok.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        mReturnValue = JOptionPane.OK_OPTION;
        setVisible(false);
      }
    });
   
    getRootPane().setDefaultButton(ok);
   
    JButton cancel = new JButton (Localizer.getLocalization(Localizer.I18N_CANCEL));
   
    cancel.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        close();
      }
    });
   
View Full Code Here

    content.add(mCalendarChooser, cc.xy(5, 3));

    ButtonBarBuilder2 builder = new ButtonBarBuilder2();
    builder.addGlue();

    mOkButton = new JButton(Localizer.getLocalization(Localizer.I18N_OK));

    mOkButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        okPressed(settings);
      }
    });

    getRootPane().setDefaultButton(mOkButton);

    JButton cancel = new JButton(Localizer.getLocalization(Localizer.I18N_CANCEL));

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

    // buttons
    JPanel buttonPn = new JPanel(new FlowLayout(FlowLayout.TRAILING));
    main.add(buttonPn, BorderLayout.SOUTH);
   
    buttonPn.add(mBackButton = new JButton(Localizer.getLocalization(Localizer.I18N_BACK)));
    mBackButton.addActionListener(this);
    mBackButton.setEnabled(false);
   
    buttonPn.add(mCloseButton = new JButton(Localizer.getLocalization(Localizer.I18N_CLOSE)));
    mCloseButton.addActionListener(this);
    mDialog.getRootPane().setDefaultButton(mCloseButton);

    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    Window vaterWindow = mDialog.getOwner();
View Full Code Here

    frmEverbox.getContentPane().add(clientContrlPanel, BorderLayout.NORTH);
   
    JLabel label = new JLabel("\u8FD0\u884C\u72B6\u6001");
    clientContrlPanel.add(label);
   
    startClientButton = new JButton("\u542F\u52A8");
    startClientButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        if(client.run || clientThread.isAlive()) {
          stopClientButton.setEnabled(true);
          startClientButton.setEnabled(false);
          return;
        } else {
          client.run = true;
          try{
            EverboxAPI.login();
            clientThread = new Thread(client);
            clientThread.start();
            startClientButton.setEnabled(false);
            stopClientButton.setEnabled(true);
            JOptionPane.showConfirmDialog(frmEverbox, "登陆成功!! 可以查看everbox.log文件观察本客户端的运行情况.");
          }catch (Throwable e2) {
            log.debug("登陆失败",e2);
            JOptionPane.showConfirmDialog(frmEverbox, "登陆失败!! 请确认你已经正确设置用户名/密码,并且已经保存!");
            client.run = false;
            return;
          }
        }
      }
    });
    startClientButton.setToolTipText("\u542F\u52A8\u5BA2\u6237\u7AEF");
    clientContrlPanel.add(startClientButton);
   
    stopClientButton = new JButton("\u505C\u6B62");
    stopClientButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        if((!client.run) || (!clientThread.isAlive())) {
          stopClientButton.setEnabled(false);
          startClientButton.setEnabled(true);
        } else {
          client.run = false;
          stopClientButton.setText("正在关闭,请等候");
          while(true) {
            if(clientThread.isAlive())
              try {
                Thread.sleep(1000);
              } catch (Throwable e1) {
              }
            break;
          }
          stopClientButton.setText("停止");
          startClientButton.setEnabled(true);
          stopClientButton.setEnabled(false);
        }
      }
    });
    stopClientButton.setToolTipText("\u505C\u6B62\u5BA2\u6237\u7AEF");
    stopClientButton.setEnabled(false);
    clientContrlPanel.add(stopClientButton);
   
    JButton btnNewButton_1 = new JButton("\u7ACB\u5373\u505C\u6B62");
    btnNewButton_1.setEnabled(false);
    clientContrlPanel.add(btnNewButton_1);
   
    JPanel panel = new JPanel();
    frmEverbox.getContentPane().add(panel, BorderLayout.CENTER);
    SpringLayout sl_panel = new SpringLayout();
    panel.setLayout(sl_panel);
   
    JButton btnNewButton_2 = new JButton("\u4FDD\u5B58\u914D\u7F6E");
    btnNewButton_2.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        saveConfig();
      }
    });
    panel.add(btnNewButton_2);
   
    JLabel lblNewLabel = new JLabel("\u7528\u6237\u540D");
    sl_panel.putConstraint(SpringLayout.NORTH, lblNewLabel, 45, SpringLayout.NORTH, panel);
    sl_panel.putConstraint(SpringLayout.WEST, lblNewLabel, 10, SpringLayout.WEST, panel);
    panel.add(lblNewLabel);
   
    usernameField = new JTextField();
    sl_panel.putConstraint(SpringLayout.WEST, usernameField, 18, SpringLayout.EAST, lblNewLabel);
    sl_panel.putConstraint(SpringLayout.SOUTH, btnNewButton_2, -6, SpringLayout.NORTH, usernameField);
    usernameField.setToolTipText("\u6682\u65F6\u53EA\u652F\u6301\u76DB\u5927\u5E10\u6237");
    sl_panel.putConstraint(SpringLayout.NORTH, usernameField, 42, SpringLayout.NORTH, panel);
    panel.add(usernameField);
    usernameField.setColumns(10);
   
    JLabel lblNewLabel_1 = new JLabel("\u5BC6\u7801");
    sl_panel.putConstraint(SpringLayout.WEST, lblNewLabel_1, 207, SpringLayout.WEST, panel);
    sl_panel.putConstraint(SpringLayout.EAST, usernameField, -30, SpringLayout.WEST, lblNewLabel_1);
    sl_panel.putConstraint(SpringLayout.EAST, btnNewButton_2, 0, SpringLayout.EAST, lblNewLabel_1);
    sl_panel.putConstraint(SpringLayout.NORTH, lblNewLabel_1, 45, SpringLayout.NORTH, panel);
    panel.add(lblNewLabel_1);
   
    passwordField = new JPasswordField();
    passwordField.setToolTipText("\u8BF7\u586B\u5165\u5BC6\u7801");
    sl_panel.putConstraint(SpringLayout.WEST, passwordField, 6, SpringLayout.EAST, lblNewLabel_1);
    sl_panel.putConstraint(SpringLayout.EAST, passwordField, 159, SpringLayout.EAST, lblNewLabel_1);
    panel.add(passwordField);
   
    JCheckBox checkBox = new JCheckBox("\u542F\u7528\u4EE3\u7406");
    sl_panel.putConstraint(SpringLayout.WEST, checkBox, 10, SpringLayout.WEST, panel);
    checkBox.setEnabled(false);
    panel.add(checkBox);
   
    JLabel label_1 = new JLabel("\u4EE3\u7406\u670D\u52A1\u5668");
    sl_panel.putConstraint(SpringLayout.NORTH, label_1, 4, SpringLayout.NORTH, checkBox);
    sl_panel.putConstraint(SpringLayout.WEST, label_1, 6, SpringLayout.EAST, checkBox);
    panel.add(label_1);
   
    JLabel label_2 = new JLabel("\u7AEF\u53E3");
    sl_panel.putConstraint(SpringLayout.NORTH, label_2, 4, SpringLayout.NORTH, checkBox);
    panel.add(label_2);
   
    proxyPortField = new JTextField();
    proxyPortField.setEditable(false);
    sl_panel.putConstraint(SpringLayout.NORTH, proxyPortField, 1, SpringLayout.NORTH, checkBox);
    sl_panel.putConstraint(SpringLayout.WEST, proxyPortField, 6, SpringLayout.EAST, label_2);
    proxyPortField.setText("8080");
    panel.add(proxyPortField);
    proxyPortField.setColumns(10);
   
    proxyHostField = new JTextField();
    proxyHostField.setEditable(false);
    sl_panel.putConstraint(SpringLayout.WEST, proxyHostField, 6, SpringLayout.EAST, label_1);
    sl_panel.putConstraint(SpringLayout.EAST, proxyHostField, -172, SpringLayout.EAST, panel);
    sl_panel.putConstraint(SpringLayout.WEST, label_2, 6, SpringLayout.EAST, proxyHostField);
    sl_panel.putConstraint(SpringLayout.NORTH, proxyHostField, 1, SpringLayout.NORTH, checkBox);
    panel.add(proxyHostField);
    proxyHostField.setColumns(10);
   
    JLabel label_3 = new JLabel("\u672C\u5730\u6587\u4EF6\u5939");
    sl_panel.putConstraint(SpringLayout.NORTH, label_3, 21, SpringLayout.SOUTH, lblNewLabel);
    sl_panel.putConstraint(SpringLayout.WEST, label_3, 10, SpringLayout.WEST, panel);
    panel.add(label_3);
   
    rootpathField = new JTextField();
    sl_panel.putConstraint(SpringLayout.NORTH, checkBox, 13, SpringLayout.SOUTH, rootpathField);
    sl_panel.putConstraint(SpringLayout.NORTH, rootpathField, -3, SpringLayout.NORTH, label_3);
    sl_panel.putConstraint(SpringLayout.WEST, rootpathField, 6, SpringLayout.EAST, label_3);
    sl_panel.putConstraint(SpringLayout.EAST, rootpathField, -91, SpringLayout.EAST, panel);
    rootpathField.setEditable(false);
    rootpathField.setEnabled(false);
    panel.add(rootpathField);
    rootpathField.setColumns(10);
   
    JButton selectRootPathButton = new JButton("\u9009\u62E9");
    selectRootPathButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        JFileChooser jfc = new JFileChooser();
        jfc.setName("请选择本地存放文件夹");
        jfc.setDialogTitle("请选择本地存放文件夹");
        jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
        int rc = jfc.showOpenDialog(frmEverbox);
        if(rc == JFileChooser.APPROVE_OPTION )
          rootpathField.setText(jfc.getSelectedFile().getAbsolutePath());
      }
    });
    sl_panel.putConstraint(SpringLayout.NORTH, selectRootPathButton, -4, SpringLayout.NORTH, label_3);
    sl_panel.putConstraint(SpringLayout.WEST, selectRootPathButton, 6, SpringLayout.EAST, rootpathField);
    panel.add(selectRootPathButton);
   
    uploadEnableBox = new JCheckBox("\u542F\u7528\u4E0A\u4F20");
    sl_panel.putConstraint(SpringLayout.WEST, uploadEnableBox, 10, SpringLayout.WEST, panel);
    uploadEnableBox.setToolTipText("\u542F\u7528\u4E0A\u4F20\u6A21\u5F0F");
    uploadEnableBox.setSelected(true);
    sl_panel.putConstraint(SpringLayout.NORTH, uploadEnableBox, 6, SpringLayout.SOUTH, checkBox);
    panel.add(uploadEnableBox);
   
    downloadEnableBox = new JCheckBox("\u542F\u7528\u4E0B\u8F7D");
    downloadEnableBox.setToolTipText("\u542F\u7528\u4E0B\u8F7D\u6A21\u5F0F");
    sl_panel.putConstraint(SpringLayout.NORTH, downloadEnableBox, 0, SpringLayout.NORTH, uploadEnableBox);
    sl_panel.putConstraint(SpringLayout.WEST, downloadEnableBox, 0, SpringLayout.WEST, lblNewLabel_1);
    panel.add(downloadEnableBox);
   
    JLabel lblNewLabel_2 = new JLabel("\u5FFD\u7565\u6587\u4EF6\u6269\u5C55\u540D");
    sl_panel.putConstraint(SpringLayout.WEST, lblNewLabel_2, 10, SpringLayout.WEST, panel);
    panel.add(lblNewLabel_2);
   
    uploadMaxsizeField = new JTextField();
    uploadMaxsizeField.setToolTipText("\u8BBE\u7F6E\u4E0A\u4F20\u6587\u4EF6\u6700\u5927\u5C3A\u5BF8,\u4F8B\u5982100m");
    panel.add(uploadMaxsizeField);
    uploadMaxsizeField.setColumns(10);
   
    JLabel label_4 = new JLabel("\u5FFD\u7565\u6587\u4EF6\u6269\u5C55\u540D");
    sl_panel.putConstraint(SpringLayout.NORTH, label_4, 0, SpringLayout.NORTH, lblNewLabel_2);
    sl_panel.putConstraint(SpringLayout.WEST, label_4, 0, SpringLayout.WEST, lblNewLabel_1);
    sl_panel.putConstraint(SpringLayout.EAST, label_4, 0, SpringLayout.EAST, label_2);
    panel.add(label_4);
   
    downloadLimitField = new JTextField();
    downloadLimitField.setEditable(false);
    sl_panel.putConstraint(SpringLayout.EAST, downloadLimitField, 0, SpringLayout.EAST, proxyPortField);
    downloadLimitField.setColumns(10);
    panel.add(downloadLimitField);
   
    JLabel label_5 = new JLabel("\u6587\u4EF6\u6700\u5927\u5C3A\u5BF8");
    sl_panel.putConstraint(SpringLayout.WEST, uploadMaxsizeField, 17, SpringLayout.EAST, label_5);
    sl_panel.putConstraint(SpringLayout.WEST, label_5, 10, SpringLayout.WEST, panel);
    sl_panel.putConstraint(SpringLayout.NORTH, label_5, 45, SpringLayout.SOUTH, uploadEnableBox);
    sl_panel.putConstraint(SpringLayout.NORTH, uploadMaxsizeField, -3, SpringLayout.NORTH, label_5);
    panel.add(label_5);
   
    JLabel label_6 = new JLabel("\u6587\u4EF6\u6700\u5C0F\u5C3A\u5BF8");
    sl_panel.putConstraint(SpringLayout.WEST, label_6, 10, SpringLayout.WEST, panel);
    sl_panel.putConstraint(SpringLayout.NORTH, lblNewLabel_2, 20, SpringLayout.SOUTH, label_6);
    sl_panel.putConstraint(SpringLayout.NORTH, label_6, 16, SpringLayout.SOUTH, label_5);
    panel.add(label_6);
   
    JLabel label_7 = new JLabel("\u5FFD\u7565\u8DEF\u5F84");
    sl_panel.putConstraint(SpringLayout.WEST, label_7, 10, SpringLayout.WEST, panel);
    sl_panel.putConstraint(SpringLayout.EAST, lblNewLabel, 0, SpringLayout.EAST, label_7);
    sl_panel.putConstraint(SpringLayout.NORTH, label_7, 44, SpringLayout.SOUTH, lblNewLabel_2);
    panel.add(label_7);
   
    uploadIgnoreHiddenBox = new JCheckBox("\u5FFD\u7565\u9690\u85CF\u6587\u4EF6");
    sl_panel.putConstraint(SpringLayout.WEST, uploadIgnoreHiddenBox, 10, SpringLayout.WEST, panel);
    uploadIgnoreHiddenBox.setToolTipText("\u662F\u5426\u5FFD\u7565\u9690\u85CF\u6587\u4EF6");
    sl_panel.putConstraint(SpringLayout.NORTH, uploadIgnoreHiddenBox, 20, SpringLayout.SOUTH, label_7);
    uploadIgnoreHiddenBox.setSelected(true);
    panel.add(uploadIgnoreHiddenBox);
   
    JLabel label_8 = new JLabel("\u6587\u4EF6\u6700\u5927\u5C3A\u5BF8");
    sl_panel.putConstraint(SpringLayout.EAST, uploadMaxsizeField, -30, SpringLayout.WEST, label_8);
    sl_panel.putConstraint(SpringLayout.EAST, label_8, 0, SpringLayout.EAST, label_2);
    sl_panel.putConstraint(SpringLayout.NORTH, label_8, 3, SpringLayout.NORTH, uploadMaxsizeField);
    sl_panel.putConstraint(SpringLayout.WEST, label_8, 0, SpringLayout.WEST, lblNewLabel_1);
    panel.add(label_8);
   
    JLabel label_9 = new JLabel("\u6587\u4EF6\u6700\u5C0F\u5C3A\u5BF8");
    sl_panel.putConstraint(SpringLayout.NORTH, label_9, 0, SpringLayout.NORTH, label_6);
    sl_panel.putConstraint(SpringLayout.WEST, label_9, 0, SpringLayout.WEST, lblNewLabel_1);
    sl_panel.putConstraint(SpringLayout.EAST, label_9, 0, SpringLayout.EAST, label_2);
    panel.add(label_9);
   
    JLabel label_10 = new JLabel("\u5FFD\u7565\u8DEF\u5F84");
    sl_panel.putConstraint(SpringLayout.NORTH, label_10, 0, SpringLayout.NORTH, label_7);
    sl_panel.putConstraint(SpringLayout.WEST, label_10, 0, SpringLayout.WEST, lblNewLabel_1);
    panel.add(label_10);
   
    uploadMinsizeField = new JTextField();
    sl_panel.putConstraint(SpringLayout.WEST, uploadMinsizeField, 17, SpringLayout.EAST, label_6);
    sl_panel.putConstraint(SpringLayout.EAST, uploadMinsizeField, -30, SpringLayout.WEST, label_9);
    uploadMinsizeField.setToolTipText("\u8BBE\u7F6E\u4E0A\u4F20\u6587\u4EF6\u6700\u5C0F\u5C3A\u5BF8,\u4F8B\u5982100k");
    sl_panel.putConstraint(SpringLayout.NORTH, uploadMinsizeField, -3, SpringLayout.NORTH, label_6);
    panel.add(uploadMinsizeField);
    uploadMinsizeField.setColumns(10);
   
    uploadIgnoreSuffixField = new JTextField();
    sl_panel.putConstraint(SpringLayout.WEST, uploadIgnoreSuffixField, 6, SpringLayout.EAST, lblNewLabel_2);
    sl_panel.putConstraint(SpringLayout.EAST, uploadIgnoreSuffixField, -30, SpringLayout.WEST, label_4);
    uploadIgnoreSuffixField.setToolTipText("\u9700\u8981\u5FFD\u7565\u7684\u6587\u4EF6\u540D\u540E\u7F00,\u53EF\u586B\u5165\u591A\u4E2A,\u7528\u82F1\u6587\u9017\u53F7\u5206\u9694");
    sl_panel.putConstraint(SpringLayout.NORTH, uploadIgnoreSuffixField, -3, SpringLayout.NORTH, lblNewLabel_2);
    panel.add(uploadIgnoreSuffixField);
    uploadIgnoreSuffixField.setColumns(10);
   
    downloadIgnoreSuffixField = new JTextField();
    downloadIgnoreSuffixField.setToolTipText("\u9700\u8981\u5FFD\u7565\u7684\u6587\u4EF6\u540D\u540E\u7F00,\u53EF\u586B\u5165\u591A\u4E2A,\u7528\u82F1\u6587\u9017\u53F7\u5206\u9694");
    sl_panel.putConstraint(SpringLayout.NORTH, downloadIgnoreSuffixField, -3, SpringLayout.NORTH, lblNewLabel_2);
    sl_panel.putConstraint(SpringLayout.WEST, downloadIgnoreSuffixField, 0, SpringLayout.WEST, proxyPortField);
    panel.add(downloadIgnoreSuffixField);
    downloadIgnoreSuffixField.setColumns(10);
   
    downloadMinsizeField = new JTextField();
    downloadMinsizeField.setToolTipText("\u8BBE\u7F6E\u4E0B\u8F7D\u6587\u4EF6\u6700\u5C0F\u5C3A\u5BF8,\u4F8B\u59821m");
    sl_panel.putConstraint(SpringLayout.NORTH, downloadMinsizeField, -3, SpringLayout.NORTH, label_6);
    sl_panel.putConstraint(SpringLayout.WEST, downloadMinsizeField, 0, SpringLayout.WEST, proxyPortField);
    panel.add(downloadMinsizeField);
    downloadMinsizeField.setColumns(10);
   
    uploadLimitField = new JTextField();
    uploadLimitField.setText("\u8BBE\u7F6E\u6700\u5927\u4E0A\u4F20\u901F\u5EA6");
    sl_panel.putConstraint(SpringLayout.SOUTH, uploadLimitField, -6, SpringLayout.NORTH, uploadMaxsizeField);
    uploadLimitField.setEditable(false);
    panel.add(uploadLimitField);
    uploadLimitField.setColumns(10);
   
    downloadMaxsizeField = new JTextField();
    downloadMaxsizeField.setToolTipText("\u8BBE\u7F6E\u4E0B\u8F7D\u6587\u4EF6\u6700\u5927\u5C3A\u5BF8,\u4F8B\u59821g");
    sl_panel.putConstraint(SpringLayout.SOUTH, downloadLimitField, -6, SpringLayout.NORTH, downloadMaxsizeField);
    sl_panel.putConstraint(SpringLayout.NORTH, downloadMaxsizeField, 0, SpringLayout.NORTH, uploadMaxsizeField);
    sl_panel.putConstraint(SpringLayout.WEST, downloadMaxsizeField, 0, SpringLayout.WEST, proxyPortField);
    panel.add(downloadMaxsizeField);
    downloadMaxsizeField.setColumns(10);
   
    JCheckBox checkBox_4 = new JCheckBox("\u5220\u9664\u672C\u5730\u6587\u4EF6\u9700\u8981\u786E\u8BA4");
    sl_panel.putConstraint(SpringLayout.WEST, checkBox_4, 10, SpringLayout.WEST, panel);
    checkBox_4.setEnabled(false);
    sl_panel.putConstraint(SpringLayout.NORTH, checkBox_4, 70, SpringLayout.SOUTH, uploadIgnoreHiddenBox);
    panel.add(checkBox_4);
   
    JCheckBox checkBox_5 = new JCheckBox("\u8986\u76D6\u672C\u5730\u6587\u4EF6\u9700\u8981\u786E\u8BA4");
    checkBox_5.setEnabled(false);
    sl_panel.putConstraint(SpringLayout.NORTH, checkBox_5, 0, SpringLayout.NORTH, checkBox_4);
    sl_panel.putConstraint(SpringLayout.WEST, checkBox_5, 0, SpringLayout.WEST, lblNewLabel_1);
    panel.add(checkBox_5);
   
    JLabel label_11 = new JLabel("\u4E0A\u4F20\u9650\u901F");
    sl_panel.putConstraint(SpringLayout.WEST, uploadLimitField, 16, SpringLayout.EAST, label_11);
    sl_panel.putConstraint(SpringLayout.EAST, label_11, 0, SpringLayout.EAST, checkBox);
    sl_panel.putConstraint(SpringLayout.WEST, label_11, 10, SpringLayout.WEST, panel);
    sl_panel.putConstraint(SpringLayout.SOUTH, label_11, -12, SpringLayout.NORTH, label_5);
    panel.add(label_11);
   
    uploadIgnorePath = new JTextField();
    sl_panel.putConstraint(SpringLayout.WEST, uploadIgnorePath, 41, SpringLayout.EAST, label_7);
    sl_panel.putConstraint(SpringLayout.EAST, uploadIgnorePath, -30, SpringLayout.WEST, label_10);
    uploadIgnorePath.setToolTipText("\u9700\u8981\u5FFD\u7565\u7684\u76F8\u5BF9\u8DEF\u5F84,\u7528\u82F1\u6587\u9017\u53F7\u5206\u9694");
    sl_panel.putConstraint(SpringLayout.SOUTH, uploadIgnorePath, 0, SpringLayout.SOUTH, label_7);
    panel.add(uploadIgnorePath);
    uploadIgnorePath.setColumns(10);
   
    downloadIgnorePath = new JTextField();
    downloadIgnorePath.setToolTipText("\u9700\u8981\u5FFD\u7565\u7684\u76F8\u5BF9\u8DEF\u5F84,\u7528\u82F1\u6587\u9017\u53F7\u5206\u9694");
    sl_panel.putConstraint(SpringLayout.NORTH, downloadIgnorePath, -3, SpringLayout.NORTH, label_7);
    sl_panel.putConstraint(SpringLayout.WEST, downloadIgnorePath, 0, SpringLayout.WEST, proxyPortField);
    panel.add(downloadIgnorePath);
    downloadIgnorePath.setColumns(10);
   
    JLabel label_12 = new JLabel("\u4E0B\u8F7D\u9650\u901F");
    sl_panel.putConstraint(SpringLayout.EAST, uploadLimitField, -30, SpringLayout.WEST, label_12);
    sl_panel.putConstraint(SpringLayout.EAST, label_12, 0, SpringLayout.EAST, label_2);
    sl_panel.putConstraint(SpringLayout.NORTH, label_12, 3, SpringLayout.NORTH, downloadLimitField);
    sl_panel.putConstraint(SpringLayout.WEST, label_12, 0, SpringLayout.WEST, lblNewLabel_1);
    panel.add(label_12);
   
    JButton button = new JButton("\u64A4\u9500\u4FEE\u6539");
    sl_panel.putConstraint(SpringLayout.NORTH, passwordField, 6, SpringLayout.SOUTH, button);
    button.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        resetConfig();
      }
    });
    sl_panel.putConstraint(SpringLayout.NORTH, button, 0, SpringLayout.NORTH, btnNewButton_2);
View Full Code Here

   * @param list List to use
   *
   * @since 2.2
   */
  public SortableItemList(String title, Object[] objects, JList list) {
    mUpBt = new JButton(TVBrowserIcons.up(TVBrowserIcons.SIZE_LARGE));
    String msg = mLocalizer.msg("tooltip.up", "Move selected rows up");
    mUpBt.setToolTipText(msg);
    mUpBt.addActionListener(this);

    mDownBt = new JButton(TVBrowserIcons.down(TVBrowserIcons.SIZE_LARGE));
    msg = mLocalizer.msg("tooltip.down", "Move selected rows down");
    mDownBt.setToolTipText(msg);
    mDownBt.addActionListener(this);
   
    mTopBtn = new JButton(TVBrowserIcons.top(TVBrowserIcons.SIZE_LARGE));
    msg = mLocalizer.msg("tooltip.top", "Move selected rows to top");
    mTopBtn.setToolTipText(msg);
    mTopBtn.addActionListener(this);

    mBottomBtn = new JButton(TVBrowserIcons.bottom(TVBrowserIcons.SIZE_LARGE));
    msg = mLocalizer.msg("tooltip.bottom", "Move selected rows to bottom");
    mBottomBtn.setToolTipText(msg);
    mBottomBtn.addActionListener(this);

    mList = list;
View Full Code Here

    FormLayout layout = new FormLayout("pref,3dlu:grow,pref","pref");
    layout.setColumnGroups(new int[][] {{1,3}});
   
    JPanel p3 = new JPanel(layout);
   
    mSelectAllBt = new JButton(mLocalizer.msg("addAll", "Select all items"));
    mSelectAllBt.setToolTipText(mLocalizer.msg("tooltip.all", "Select all items in the list."));
    mSelectAllBt.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        selectAll();
      }
    });
    p3.add(mSelectAllBt, cc.xy(1,1));

    mDeSelectAllBt = new JButton(mLocalizer.msg("delAll", "Deselect all items"));
    mDeSelectAllBt.setToolTipText(mLocalizer.msg("tooltip.none", "Deselect all items in the list."));
    mDeSelectAllBt.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        clearSelection();
      }
View Full Code Here

TOP

Related Classes of javax.swing.JButton

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.