Package net.sourceforge.ganttproject

Examples of net.sourceforge.ganttproject.CustomProperty


  private void saveCustomProperties(IGanttProject project, HumanResource resource, TransformerHandler handler) throws SAXException {
    //CustomPropertyManager customPropsManager = project.getHumanResourceManager().getCustomPropertyManager();
    AttributesImpl attrs = new AttributesImpl();
    List properties = resource.getCustomProperties();
    for (int i=0; i<properties.size(); i++) {
      CustomProperty nextProperty = (CustomProperty) properties.get(i);
      CustomPropertyDefinition nextDefinition = nextProperty.getDefinition();
            if (nextProperty.getValue()!=null && !nextProperty.getValue().equals(nextDefinition.getDefaultValue())) {
          addAttribute("definition-id", nextDefinition.getID(), attrs);
          addAttribute("value", nextProperty.getValueAsString(), attrs);
          emptyElement("custom-property", attrs, handler);
            }
    }
  }
View Full Code Here


                addAttribute("id", "3", attrs);
                textElement("phone", attrs, p.getPhone(), handler);

                List/*<CustomProperty>*/ customFields = p.getCustomProperties();
                for (int j=0; j<customFields.size(); j++) {
                  CustomProperty nextProperty = (CustomProperty) customFields.get(j);
                  addAttribute("id", nextProperty.getDefinition().getID(), attrs);
                  String value = nextProperty.getValueAsString();
                  textElement("custom-field", attrs, value, handler);
                }
                endPrefixedElement("resource", handler);
            }

View Full Code Here

                String sRoleID = role==null ? "0":role.getPersistentID();
                writeTextCell(out, sRoleID);
            }
            List customProps = p.getCustomProperties();
            for (int j=0; j<customProps.size(); j++) {
              CustomProperty nextProperty = (CustomProperty) customProps.get(j);
              writeTextCell(out, nextProperty.getValueAsString());
            }
            out.write("\n");
        }
    } // end of write resources
View Full Code Here

                if (s.length() > iMaxSize)
                    iMaxSize = s.length();
            }
            List customProps = p.getCustomProperties();
            for (int j=0; j<customProps.size(); j++) {
              CustomProperty nextProperty = (CustomProperty) customProps.get(j);
              if (nextProperty.getValueAsString().length() > iMaxSize) {
                iMaxSize = nextProperty.getValueAsString().length();
              }
            }
        }

    } // get maxIndentation end
View Full Code Here

        imported.setMail(next.getMail());
        imported.setPhone(next.getPhone());
        imported.setRole(next.getRole());
        List/*<CustomProperty>*/ customProperties = next.getCustomProperties();
        for (int i=0; i<customProperties.size(); i++) {
          CustomProperty nextProperty = (CustomProperty) customProperties.get(i);
          imported.addCustomProperty(nextProperty.getDefinition(), nextProperty.getValueAsString());
        }
        original2imported.put(next, imported);
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.ganttproject.CustomProperty

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.