Package org.openbp.common.generic.description

Examples of org.openbp.common.generic.description.DescriptionObject


    if (selectionValueList != null && ! readonly)
    {
      int n = selectionValueList.size();
      for (int i = 0; i < n; ++i)
      {
        DescriptionObject d = (DescriptionObject) selectionValueList.get(i);

        String name = d.getName();
        String text = d.getDescription();
        if (text != null)
        {
          c.addItem(text, name);
        }
        else
View Full Code Here


    if (selectionValueList != null)
    {
      int n = selectionValueList.size();
      for (int i = 0; i < n; ++i)
      {
        DescriptionObject d = (DescriptionObject) selectionValueList.get(i);

        String name = d.getName();
        if (CommonUtil.equalsNull(name, s))
        {
          return d.getDescription();
        }
      }
    }
    return s;
  }
View Full Code Here

    if (selectionValueList != null)
    {
      int n = selectionValueList.size();
      for (int i = 0; i < n; ++i)
      {
        DescriptionObject d = (DescriptionObject) selectionValueList.get(i);

        String desc = d.getDescription();
        if (CommonUtil.equalsNull(desc, s))
        {
          return d.getName();
        }
      }
    }
    return s;
  }
View Full Code Here

    }
    else
    {
      if (instance instanceof DescriptionObject)
      {
        DescriptionObject d = (DescriptionObject) instance;
        String name = NamedObjectCollectionUtil.createUniqueId(list, d.getName());
        d.setName(name);
      }
    }

    int index = getChildIndex(posNode);
    if (index < 0)
View Full Code Here

        for (int i = 0; i < n; ++i)
        {
          Object o = list.get(i);
          if (o instanceof DescriptionObject)
          {
            DescriptionObject desc = (DescriptionObject) o;
            if (CommonUtil.equalsNull(desc.getName(), name))
              return desc;
          }
        }
      }
      else
      {
        // For any other collection use an iterator to traverse it
        for (Iterator it = c.iterator(); it.hasNext();)
        {
          Object o = it.next();
          if (o instanceof DescriptionObject)
          {
            DescriptionObject desc = (DescriptionObject) o;
            if (CommonUtil.equalsNull(desc.getName(), name))
              return desc;
          }
        }
      }
    }
View Full Code Here

  {
    // Build a unique name
    for (int i = 1;; ++i)
    {
      String n = i == 1 ? typeName : typeName + i;
      DescriptionObject o = getByName(c, n);
      if (o == null)
      {
        // We found an id that is not in use yet
        return n;
      }
View Full Code Here

    ArrayList inserted = new ArrayList();

    for (Iterator it = toInsert.iterator(); it.hasNext();)
    {
      DescriptionObject element = (DescriptionObject) it.next();

      String n = element.getName();
      n = cutTrailingDigits(n);
      n = createUniqueId(toInsert, inserted, base, n);

      element.setName(n);

      inserted.add(element);
    }
  }
View Full Code Here

TOP

Related Classes of org.openbp.common.generic.description.DescriptionObject

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.