Package org.trzcinka.intellitrac.model.tickets

Examples of org.trzcinka.intellitrac.model.tickets.State


    toolWindowComponent.appendTextToComment(text);
  }

  @Override
  public void update(AnActionEvent e) {
    State state = TicketsModel.getInstance().getCurrentState();
    boolean enabled = state == State.TICKET_EDITOR;
    e.getPresentation().setEnabled(enabled);
  }
View Full Code Here


       * Invoked when an action occurs.
       */
      public void actionPerformed(ActionEvent e) {
        Report selectedReport = (Report) reportsList.getSelectedValue();
        if (selectedReport != null) {
          State stateInfo = State.REPORT_EDITOR;
          ticketsModel.getCurrentReportModel().setCurrentReport(selectedReport);
          ticketsModel.setCurrentState(stateInfo);
        }
      }
    });
    removeButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        Report selectedReport = (Report) reportsList.getSelectedValue();
        if (selectedReport != null) {
          String message = bundle.getString("tool_window.tickets.reports_list.confirm_report_removal");
          int answer = Messages.showYesNoDialog(ApplicationModel.getProject(), message, bundle.getString("dialogs.warning"), Messages.getQuestionIcon());
          if (answer == 0) {
            ticketsModel.getReportsListModel().removeReport(selectedReport);
          }
        }
      }
    });
    addButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        State state = State.REPORT_EDITOR;
        ticketsModel.getCurrentReportModel().setCurrentReport(new Report());
        ticketsModel.setCurrentState(state);
      }
    });
    openButton.addActionListener(new ActionListener() {
View Full Code Here

  }

  private void reportsListRedirect() {
    disposeValidators();
    unsetInputVerifiers();
    State state = State.REPORTS_LIST;
    ticketsModel.setCurrentState(state);
  }
View Full Code Here

    toolWindowComponent.appendTextToDescription(text);
  }

  @Override
  public void update(AnActionEvent e) {
    State state = TicketsModel.getInstance().getCurrentState();
    boolean enabled = state == State.TICKET_EDITOR || state == State.TICKET_CREATOR;
    e.getPresentation().setEnabled(enabled);
  }
View Full Code Here

TOP

Related Classes of org.trzcinka.intellitrac.model.tickets.State

Copyright © 2018 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.