Example #1
0
  /*
   * (non-Javadoc)
   *
   * @see
   * com.intel.hpc.stl.ui.common.JCard#addControlButtons(javax.swing.JToolBar)
   */
  @Override
  protected void addControlButtons(JToolBar toolBar) {
    styleBtn = ComponentFactory.getImageButton(UIImages.BAR_ICON.getImageIcon());
    styleBtn.setToolTipText(UILabels.STL40002_TO_BAR.getDescription());
    toolBar.add(styleBtn);

    super.addControlButtons(toolBar);
  }
Example #2
0
    @Override
    protected void initComponents(String name, final JFormattedTextField textField) {
      super.initComponents(name, textField);

      btnStoreBrowser = ComponentFactory.getImageButton(UIImages.FOLDER_ICON.getImageIcon());
      btnStoreBrowser.setMargin(new Insets(2, 2, 2, 2));
      btnStoreBrowser.setToolTipText(STLConstants.K0642_BROWSE.getValue());
      btnStoreBrowser.addActionListener(
          new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
              String newFile = chooseFile(textField.getText());
              if (newFile != null) {
                textField.setText(newFile);
                hostInfoListener.setDirty();
              }
            }
          });
      add(btnStoreBrowser, BorderLayout.EAST);
    }
Example #3
0
  protected void initComponents() {
    setLayout(new BorderLayout(10, 5));
    setBorder(
        BorderFactory.createCompoundBorder(
            BorderFactory.createMatteBorder(1, 1, 1, 4, UIConstants.INTEL_LIGHT_GRAY),
            BorderFactory.createEmptyBorder(2, 2, 2, 2)));

    add(getHostPanel(), BorderLayout.CENTER);

    // Remove Button
    btnRemove = ComponentFactory.getImageButton(UIImages.CLOSE_RED.getImageIcon());
    btnRemove.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            hostInfoListener.removeHost(hostInfoPanel);
          }
        });
    add(btnRemove, BorderLayout.EAST);
  }
Example #4
0
  protected JPanel getConnTestPanel() {
    JPanel panel = new JPanel(new GridBagLayout());
    panel.setOpaque(false);

    GridBagConstraints gc = new GridBagConstraints();
    gc.fill = GridBagConstraints.HORIZONTAL;
    gc.insets = insets;

    gc.gridwidth = 1;
    btnConnectionTest = ComponentFactory.getImageButton(UIImages.PLAY.getImageIcon());
    btnConnectionTest.setToolTipText(STLConstants.K3027_TEST_CONNECTION.getValue());
    btnConnectionTest.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            if (!txtFldHostName.isEditValid() || !txtFldPortNum.isEditValid()) {
              // do nothing if edit is invalid
              return;
            }

            if (btnConnectionTest.isSelected()) {
              stopConnectionTest();
            } else {
              testConnection();
            }
          }
        });
    panel.add(btnConnectionTest, gc);

    gc.weightx = 1;
    gc.gridwidth = GridBagConstraints.REMAINDER;
    lblConnectionStatus =
        ComponentFactory.getH5Label(STLConstants.K3028_NOT_TESTED.getValue(), Font.PLAIN);
    panel.add(lblConnectionStatus, gc);

    return panel;
  }