private JButton getMixerDefaultButton() {
   if (mixerDefaultButton == null) {
     mixerDefaultButton = new JButton("Default");
     mixerDefaultButton.setMnemonic('u');
     mixerDefaultButton.setDisplayedMnemonicIndex(4);
     mixerDefaultButton.addActionListener(eventHandler);
   }
   return mixerDefaultButton;
 }
 private JButton getDisableAllSoundsButton() {
   if (disableAllSoundsButton == null) {
     disableAllSoundsButton = new JButton("Disable all");
     disableAllSoundsButton.setMnemonic('i');
     disableAllSoundsButton.setDisplayedMnemonicIndex(1);
     disableAllSoundsButton.addActionListener(eventHandler);
   }
   return disableAllSoundsButton;
 }
 private JButton getEnableAllSoundsButton() {
   if (enableAllSoundsButton == null) {
     enableAllSoundsButton = new JButton("Enable all");
     enableAllSoundsButton.setMnemonic('a');
     enableAllSoundsButton.setDisplayedMnemonicIndex(7);
     enableAllSoundsButton.addActionListener(eventHandler);
   }
   return enableAllSoundsButton;
 }
 private JButton getPredefinedSpeedButton() {
   if (predefinedSpeedButton == null) {
     predefinedSpeedButton = new JButton("Speed");
     predefinedSpeedButton.setMnemonic('p');
     predefinedSpeedButton.setDisplayedMnemonicIndex(1);
     predefinedSpeedButton.addActionListener(eventHandler);
   }
   return predefinedSpeedButton;
 }
 private JButton getPredefinedPlatformDefaultButton() {
   if (predefinedPlaformDefaultButton == null) {
     predefinedPlaformDefaultButton = new JButton("Default");
     predefinedPlaformDefaultButton.setMnemonic('u');
     predefinedPlaformDefaultButton.setDisplayedMnemonicIndex(4);
     predefinedPlaformDefaultButton.addActionListener(eventHandler);
   }
   return predefinedPlaformDefaultButton;
 }
 private JButton getRemoveButton() {
   if (removeButton == null) {
     removeButton = new JButton();
     removeButton.setText("<- Remove");
     removeButton.setMnemonic('m');
     removeButton.setDisplayedMnemonicIndex(5);
     removeButton.addActionListener(eventHandler);
   }
   return removeButton;
 }
 private JButton getAddAllButton() {
   if (addAllButton == null) {
     addAllButton = new JButton();
     addAllButton.setText("Add All ->");
     addAllButton.setMnemonic('l');
     addAllButton.setDisplayedMnemonicIndex(5);
     addAllButton.addActionListener(eventHandler);
   }
   return addAllButton;
 }
 public JButton getReplaceAllButton() {
   if (replaceAllButton == null) {
     replaceAllButton = new JButton();
     replaceAllButton.setText("Replace All");
     replaceAllButton.setMnemonic('A');
     replaceAllButton.setDisplayedMnemonicIndex(8);
     replaceAllButton.addActionListener(this);
   }
   return replaceAllButton;
 }
  /**
   * Creates a new button that when clicked will show the Class chooser dialog and update the given
   * selection holder with the selected value.
   *
   * @param context The context ...
   * @param key The key used to retrieve the localized text from the given context's <code>
   *     ResourceRepository</code>
   * @param classRepositoryHolder The holder of the {@link
   *     org.eclipse.persistence.tools.workbench.scplugin.model.meta.ClassRepository} used to
   *     retrieve the list of classes
   * @param selectionHolder The holder of the selected item if set, otherwise the value will remain
   *     <code>null</code>
   * @return The new <code>JButton</code>
   */
  public static JButton buildBrowseButton(
      WorkbenchContextHolder contextHolder,
      String key,
      ValueModel classRepositoryHolder,
      PropertyValueModel selectionHolder) {
    ResourceRepository repository =
        contextHolder.getWorkbenchContext().getApplicationContext().getResourceRepository();

    JButton browseButton = new JButton();
    browseButton.setText(repository.getString(key));
    browseButton.setMnemonic(repository.getMnemonic(key));
    browseButton.setDisplayedMnemonicIndex(repository.getMnemonicIndex(key));
    browseButton.setName(key);

    BrowseAction action = new BrowseAction(contextHolder, classRepositoryHolder, selectionHolder);
    browseButton.addActionListener(action);

    installBrowseButtonEnabler(classRepositoryHolder, browseButton);

    return browseButton;
  }
 /**
  * Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR
  * call it in your code!
  *
  * @noinspection ALL
  */
 private void $$$setupUI$$$() {
   createUIComponents();
   contentPane = new JPanel();
   contentPane.setLayout(
       new FormLayout(
           "left:5dlu:noGrow,fill:max(d;125dlu):grow(0.6),fill:d:noGrow,left:4dlu:noGrow,fill:max(d;60dlu):grow(0.30000000000000004),left:5dlu:noGrow,fill:max(d;60dlu):grow(0.30000000000000004),left:5dlu:noGrow,fill:d:noGrow",
           "center:d:noGrow,top:5dlu:noGrow,center:m:grow(0.1),top:5dlu:noGrow,center:max(d;4px):noGrow,center:d:noGrow,top:5dlu:noGrow,center:m:grow(0.1),top:5dlu:noGrow,center:d:noGrow,center:max(d;4px):noGrow,top:5dlu:noGrow,center:d:noGrow"));
   final JScrollPane scrollPane1 = new JScrollPane();
   CellConstraints cc = new CellConstraints();
   contentPane.add(scrollPane1, cc.xyw(2, 3, 2, CellConstraints.FILL, CellConstraints.FILL));
   shipFreightTable.setName("shipFreightTable");
   scrollPane1.setViewportView(shipFreightTable);
   final JScrollPane scrollPane2 = new JScrollPane();
   contentPane.add(scrollPane2, cc.xyw(2, 8, 2, CellConstraints.FILL, CellConstraints.FILL));
   portFreightTable.setName("portFreightTable");
   scrollPane2.setViewportView(portFreightTable);
   final JScrollPane scrollPane3 = new JScrollPane();
   contentPane.add(scrollPane3, cc.xyw(5, 3, 3, CellConstraints.FILL, CellConstraints.FILL));
   shipsInPortListBox.setSelectionMode(0);
   scrollPane3.setViewportView(shipsInPortListBox);
   cancelButton = new JButton();
   cancelButton.setText("Cancel");
   cancelButton.setMnemonic('C');
   cancelButton.setDisplayedMnemonicIndex(0);
   contentPane.add(cancelButton, cc.xy(7, 11));
   okButton = new JButton();
   okButton.setText("OK");
   okButton.setMnemonic('O');
   okButton.setDisplayedMnemonicIndex(0);
   contentPane.add(okButton, cc.xy(5, 11));
   charterButton = new JButton();
   charterButton.setName("charterButton");
   charterButton.setText("Charter");
   charterButton.setMnemonic('T');
   charterButton.setDisplayedMnemonicIndex(4);
   contentPane.add(charterButton, cc.xy(2, 5, CellConstraints.RIGHT, CellConstraints.DEFAULT));
   shipInfoPanel = new JPanel();
   shipInfoPanel.setLayout(
       new FormLayout(
           "fill:d:grow(0.30000000000000004),left:4dlu:noGrow,fill:d:grow(0.19999999999999998)",
           "center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow"));
   shipInfoPanel.setName("shipInfoPanel");
   contentPane.add(shipInfoPanel, cc.xyw(5, 8, 3));
   final JLabel label1 = new JLabel();
   label1.setText("Ship name");
   shipInfoPanel.add(label1, cc.xy(1, 1));
   final JLabel label2 = new JLabel();
   label2.setText("Ship type");
   shipInfoPanel.add(label2, cc.xy(1, 3));
   final JLabel label3 = new JLabel();
   label3.setText("Max DWT");
   shipInfoPanel.add(label3, cc.xy(1, 5));
   shipName = new JLabel();
   shipName.setName("shipName");
   shipName.setText("Label");
   shipInfoPanel.add(shipName, cc.xy(3, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));
   shipType = new JLabel();
   shipType.setName("shipType");
   shipType.setText("Label");
   shipInfoPanel.add(shipType, cc.xy(3, 3, CellConstraints.LEFT, CellConstraints.DEFAULT));
   shipDWT = new JLabel();
   shipDWT.setName("maxDWT");
   shipDWT.setText("Label");
   shipInfoPanel.add(shipDWT, cc.xy(3, 5, CellConstraints.LEFT, CellConstraints.DEFAULT));
   final JLabel label4 = new JLabel();
   label4.setText("Available DWT");
   shipInfoPanel.add(label4, cc.xy(1, 7));
   availableDWT = new JLabel();
   availableDWT.setName("availableDWT");
   availableDWT.setText("Label");
   shipInfoPanel.add(availableDWT, cc.xy(3, 7));
   contentPane.add(nameOfPort, cc.xy(5, 5, CellConstraints.DEFAULT, CellConstraints.FILL));
 }