예제 #1
0
  /**
   * Set the group ID.
   *
   * <p>Group ID values must be in the range: [1-9]
   *
   * @param groupID The new group ID or (0) for no group assignment.
   */
  @Override
  public void setGroupID(int groupID) {
    UIMaster master = UIMaster.getInstance();

    PanelGroup<JNodeFilesPanel> panels = master.getNodeFilesPanels();

    if (pGroupID > 0) panels.releaseGroup(pGroupID);

    pGroupID = 0;
    if ((groupID > 0) && panels.isGroupUnused(groupID)) {
      panels.assignGroup(this, groupID);
      pGroupID = groupID;
    }

    master.updateOpsBar();
  }
예제 #2
0
    @Override
    public void run() {
      UIMaster master = UIMaster.getInstance();
      if (master.beginPanelOp(pGroupID, "Reverting Files...")) {
        MasterMgrClient client = master.acquireMasterMgrClient();
        try {
          client.revertFiles(pAuthor, pView, pStatus.getName(), pFiles);
        } catch (PipelineException ex) {
          master.showErrorDialog(ex);
          return;
        } finally {
          master.releaseMasterMgrClient(client);
          master.endPanelOp(pGroupID, "Done.");
        }

        updatePanels();
      }
    }
예제 #3
0
 /** Is the given group currently unused for this type of panel. */
 @Override
 public boolean isGroupUnused(int groupID) {
   PanelGroup<JNodeFilesPanel> panels = UIMaster.getInstance().getNodeFilesPanels();
   return panels.isGroupUnused(groupID);
 }