Package org.openbp.guiclient.model

Examples of org.openbp.guiclient.model.ModelConnector


      if (! ve.isVetoed())
      {
        // Select something different than the current node
        itemBrowser.performAlternativeSelection();

        ModelConnector modelConnector = ModelConnector.getInstance();
        try
        {
          if (item instanceof Model)
          {
            modelConnector.removeModel((Model) item);
          }
          else
          {
            modelConnector.removeItem(item);
          }
        }
        catch (ModelException ex)
        {
          modelConnector.showExceptionDialog(ex, item);
        }
      }
    }

    return EVENT_CONSUMED;
View Full Code Here


   * true: The update was sucessful<br>
   * false: The update failed
   */
  private boolean updateItem(Item originalItem, Item modifiedItem)
  {
    ModelConnector modelConnector = ModelConnector.getInstance();

    try
    {
      if (originalItem instanceof Model)
      {
        modelConnector.updateModel((Model) modifiedItem);
      }
      else
      {
        String newName = modifiedItem.getName();

        ModelQualifier destinationQualifier = new ModelQualifier(originalItem.getQualifier());
        destinationQualifier.setItem(newName);

        // Move the item if necessary
        modelConnector.moveItem(modifiedItem, destinationQualifier);
        modelConnector.updateItem(modifiedItem);
      }
    }
    catch (ModelException e)
    {
      modelConnector.showExceptionDialog(e, originalItem);
      return false;
    }

    return true;
  }
View Full Code Here

    Item item = getSelectedItem();

    // Select something different than the current node
    performAlternativeSelection();

    ModelConnector modelConnector = ModelConnector.getInstance();
    try
    {
      modelConnector.removeItem(item);
    }
    catch (ModelException ex)
    {
      modelConnector.showExceptionDialog(ex, item);
      return null;
    }

    return new ItemTransferable(item);
  }
View Full Code Here

TOP

Related Classes of org.openbp.guiclient.model.ModelConnector

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.