Package com.projity.pm.resource

Examples of com.projity.pm.resource.Resource


      Iterator r = resources.iterator();
      while (r.hasNext()) {
        Object obj = r.next();
        if (!(obj instanceof Resource))
          continue;
        Resource res = (Resource)obj;
        TimeIterator timeIterator = coord.getProjectTimeIterator();
        TimeIteratorGenerator generator = TimeIteratorGenerator.getInstance(timeIterator);
        Assignment.calcResourceAvailabilityBetween(res, generator, calculatedValues);
      }
    }
View Full Code Here


      else if (impl instanceof Assignment)
        taskInformationDialog.showResources();

      taskInformationDialog.setVisible(true);
    } else if (impl instanceof Resource||(impl instanceof Assignment&&resourceType)) {
      Resource resource=(Resource)((impl instanceof Assignment)?(((Assignment)impl).getResource()):impl);;
      if (resourceInformationDialog == null) {
        resourceInformationDialog = ResourceInformationDialog.getInstance(getFrame(),resource);
        resourceInformationDialog.pack();
        resourceInformationDialog.setModal(false);
      } else {
View Full Code Here

          return component;
        }
       
          public boolean isNodeDeletable(Node node) {
            if (node != null && node.getImpl() instanceof Resource) {
              Resource r = (Resource)node.getImpl();
              if (r.isUser()) {
                Alert.warn(Messages.getString("ResourceView.YouCannotDeleteTheResource") + r.getName() + Messages.getString("ResourceView.UsersCanOnlyBeRemoved")); //$NON-NLS-1$ //$NON-NLS-2$
                return false;
              }
              if (r.isAssignedToSomeProject()) {
                Alert.warn(Messages.getString("ResourceView.YouCannotDeleteTheResource") + r.getName() + Messages.getString("ResourceView.ThisResourceCurrentlyHasAssignments")); //$NON-NLS-1$ //$NON-NLS-2$
                return false;
              }
              List children=node.getChildren();
              if (children!=null)
              for (Iterator i=children.listIterator();i.hasNext();){
                Node child=(Node)i.next();
                if (!isNodeDeletable(child)) return false;
              }
            }
            return true;
          }
          public boolean isNodeCuttable(Node node) {
            if (node != null && node.getImpl() instanceof Resource) {
              Resource r = (Resource)node.getImpl();
              if (r.isUser()) {
                Alert.warn(Messages.getString("ResourceView.YouCannotDeleteTheResource") + r.getName() + Messages.getString("ResourceView.UsersCanOnlyBeRemoved")+ "\n" + Messages.getString("ResourceView.ToMoveAProtectedResource")); //$NON-NLS-1$ //$NON-NLS-2$
                return false;
              }
              if (r.isAssignedToSomeProject()) {
                Alert.warn(Messages.getString("ResourceView.YouCannotDeleteTheResource") + r.getName() + Messages.getString("ResourceView.ThisResourceCurrentlyHasAssignments")+ "\n" + Messages.getString("ResourceView.ToMoveAProtectedResource")); //$NON-NLS-1$ //$NON-NLS-2$
                return false;
              }
              List children=node.getChildren();
              if (children!=null)
              for (Iterator i=children.listIterator();i.hasNext();){
View Full Code Here

        return parent.getDelegatedTo();
    }
    return delegatedTo;
  }
  public void setDelegatedTo(Resource delegatedTo) {
    Resource old = this.delegatedTo;
    this.delegatedTo = delegatedTo;
//    if (old == null) {
//      SwingUtilities.invokeLater(new Runnable() {
//
//        public void run() {
View Full Code Here

//          Task newOne = getOwningProject().cloneTask(Task.this);
//        }});
//    }
  }
  public boolean isDelegatedToUser() {
    Resource del = getDelegatedTo();
    return del != null && Environment.getLogin().equals(del.getUserAccount());
  }
View Full Code Here

  public boolean isDelegatedToUser() {
    Resource del = getDelegatedTo();
    return del != null && Environment.getLogin().equals(del.getUserAccount());
  }
  public String getDelegatedToName() {
    Resource del = getDelegatedTo();
    return del == null ? "" : del.getName();
  }
View Full Code Here

TOP

Related Classes of com.projity.pm.resource.Resource

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.