コード例 #1
0
 @Override
 public void actionPerformed(ActionEvent e) {
   try {
     if (e.getActionCommand().equals(ACTION_COMMAND_ANALYSIS_MODE)) {
       SwatState.getInstance()
           .setOperatingMode(SwatNewNetToolbar.this, OperatingMode.ANALYSIS_MODE);
     } else if (e.getActionCommand().equals(ACTION_COMMAND_EDIT_MODE)) {
       SwatState.getInstance().setOperatingMode(SwatNewNetToolbar.this, OperatingMode.EDIT_MODE);
     }
   } catch (ParameterException ex) {
     ex.printStackTrace();
   }
 }
コード例 #2
0
  /**
   * Put Buttons into linkedList {@link #standardItems} for later use
   *
   * @throws IOException
   * @throws PropertyException
   * @throws ParameterException
   */
  private void createButtons() {

    try {
      standardItems.add(getNewPTNetButton());
      standardItems.add(getNewCPNButton());
      standardItems.add(getNewIFNetButton());
      standardItems.add(getNewRTPNButton());
    } catch (ParameterException e) {
      e.printStackTrace();
    } catch (PropertyException e) {
      e.printStackTrace();
    } catch (IOException e) {
      e.printStackTrace();
    }
  }