Package com.google.gdt.eclipse.designer.model.widgets

Examples of com.google.gdt.eclipse.designer.model.widgets.UIObjectInfo


  //
  ////////////////////////////////////////////////////////////////////////////
  public EditPart createEditPart(EditPart context, Object model) {
    // use generic EditPart for placeholders
    if (model instanceof UIObjectInfo) {
      UIObjectInfo object = (UIObjectInfo) model;
      if (object.isPlaceholder()) {
        return new UIObjectEditPart(object);
      }
    }
    // use factories
    for (IEditPartFactory factory : FACTORIES) {
View Full Code Here


  //
  // Operations
  //
  ////////////////////////////////////////////////////////////////////////////
  public void commandCreate(Object newObject, Object nextObject) throws Exception {
    UIObjectInfo newItem = (UIObjectInfo) newObject;
    UIObjectInfo nextItem = (UIObjectInfo) nextObject;
    // add new item
    if (newItem instanceof MenuItemInfo) {
      if (newItem.getCreationSupport() instanceof ImplicitFactoryCreationSupport) {
        VariableSupport variableSupport = new EmptyPureVariableSupport(newItem);
        StatementGenerator statementGenerator = GenerationUtils.getStatementGenerator(newItem);
View Full Code Here

  @SuppressWarnings("unchecked")
  public List<?> commandPaste(final Object mementoObject, final Object nextObject) throws Exception {
    List<UIObjectInfo> pastedObjects = Lists.newArrayList();
    List<JavaInfoMemento> mementos = (List<JavaInfoMemento>) mementoObject;
    for (JavaInfoMemento memento : mementos) {
      UIObjectInfo newItem = (UIObjectInfo) memento.create(m_menu);
      commandCreate(newItem, nextObject);
      memento.apply();
      pastedObjects.add(newItem);
    }
    return pastedObjects;
View Full Code Here

   */
  protected Rectangle translateCanvas2Section(CanvasInfo child, Point shift) {
    Point parentLocation = getModelBounds().getLocation();
    Point translatedLocation = parentLocation.getNegated().getTranslated(shift);
    if (!isRoot()) {
      UIObjectInfo root = (UIObjectInfo) getRootJava();
      translatedLocation.translate(root.getModelBounds().getLocation().getNegated());
    }
    Rectangle childBounds = child.getModelBounds();
    return childBounds.getTranslated(translatedLocation);
  }
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.model.widgets.UIObjectInfo

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.