Package org.openbp.jaspira.propertybrowser.nodes

Examples of org.openbp.jaspira.propertybrowser.nodes.ObjectNode


        if (context.isNewItem() && !context.isItemSaved())
        {
          // Make the object name editable if it's a new item

          // Create the property browser tree and clone it
          ObjectNode rootNode = NodeStructureMgr.getInstance().createEditorStructureFor(item.getClass());

          // Set the read-only property of the 'Name' property to false
          changeReadOnlyModeOfPropertyDescriptor(rootNode, "Name", false);
          // TODO Feature 3 Allow for selecting the model for new items; implement setOwningModelQualifier
          // changeReadOnlyModeOfPropertyDescriptor(rootNode, "OwningModelQualifier", false);
View Full Code Here


    AbstractNode treenode = (AbstractNode) path.getLastPathComponent();

    if (treenode != null)
    {
      ObjectNode odn = treenode.getObjectNode();

      if (odn != null && odn.getObject() instanceof ProcessVariable)
      {
        if (!propertyBrowser.saveObject())
          return null;

        ProcessVariable param = (ProcessVariable) odn.getObject();

        dragImage = ItemIconMgr.getMultiIcon(ItemIconMgr.getInstance().getTypeIcon(param.getDataType(), FlexibleSize.MEDIUM));

        return new BasicTransferable(param);
      }
View Full Code Here

      {
        return true;
      }

      // Validate the edited object using the validator of the root object descriptor node
      ObjectNode root = (ObjectNode) ((PropertyBrowserModel) getModel()).getRoot();
      if (root != null)
      {
        ObjectValidator validator = root.getValidator();
        if (validator != null)
        {
          if (!validator.validateObject(modifiedObject, this))
          {
            // We should re-validate the object until changes have been made
View Full Code Here

  public void copyNode()
  {
    if (!(currentNode instanceof ObjectNode))
      return;

    ObjectNode on = (ObjectNode) currentNode;
    Object o = on.getObject();

    BasicTransferable transferable = new BasicTransferable(o);
    ClipboardMgr.getInstance().addEntry(transferable);

    firePropertyBrowserEvent(new PropertyBrowserEvent(PropertyBrowserEvent.ELEMENT_COPIED, this, on));
View Full Code Here

   * @param rootNode Root node of the property browser tree or null if the model
   * should create an appropriate property browser tree based on the class of the object
   */
  public void setObject(final Object object, ObjectNode rootNode)
  {
    ObjectNode oldRoot = (ObjectNode) getRoot();
    if (oldRoot != null)
    {
      oldRoot.setPropertyBrowser(null);
      oldRoot.setObject(null);
    }

    if (object != null)
    {
      if (rootNode == null)
View Full Code Here

   * @param classType The class type for which the {@link ObjectNode} and its children are to be returned
   * @return The {@link ObjectNode} if it could be cloned, else null
   */
  public ObjectNode createEditorStructureFor(Class classType)
  {
    ObjectNode node = obtainStructure(classType);

    // Clone the node and return it to the client.
    if (node != null)
    {
      try
      {
        return (ObjectNode) node.clone();
      }
      catch (CloneNotSupportedException ex)
      {
        ExceptionUtil.printTrace(ex);
      }
View Full Code Here

  {
    if (nodeStructureMap == null)
      nodeStructureMap = new HashMap();

    // Query cache
    ObjectNode node = (ObjectNode) nodeStructureMap.get(classType);
    if (node != null)
    {
      return node;
    }

    try
    {
      // Create from object description data
      ObjectDescriptor objectDescriptor = ObjectDescriptorMgr.getInstance().getDescriptor(classType, ObjectDescriptorMgr.ODM_THROW_ERROR);

      node = new ObjectNode(objectDescriptor);
      if (node != null)
      {
        // Save to cache
        nodeStructureMap.put(classType, node);
      }
View Full Code Here

TOP

Related Classes of org.openbp.jaspira.propertybrowser.nodes.ObjectNode

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.