Examples of UIObjectInfo


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

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

  //
  // 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

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

  @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

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

   */
  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

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

  //
  // Operations
  //
  ////////////////////////////////////////////////////////////////////////////
  public void commandCreate(Object newObject, Object nextObject) throws Exception {
    UIObjectInfo newItem = (UIObjectInfo) newObject;
    UIObjectInfo nextItem = (UIObjectInfo) nextObject;
    // add new item
    XmlObjectUtils.add(newItem, Associations.direct(), m_menu, nextItem);
    // schedule selection
    MenuObjectInfoUtils.setSelectingObject(newItem);
  }
View Full Code Here

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

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

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

    }
    return pastedObjects;
  }

  public void commandMove(Object object, Object nextObject) throws Exception {
    UIObjectInfo item = (UIObjectInfo) object;
    UIObjectInfo nextItem = (UIObjectInfo) nextObject;
    // move item
    XmlObjectUtils.move(item, Associations.direct(), m_menu, nextItem);
    // schedule selection
    MenuObjectInfoUtils.setSelectingObject(item);
  }
View Full Code Here

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

  ////////////////////////////////////////////////////////////////////////////
  public void contributeMenu(IMenuManager manager, Property property) throws Exception {
    if (property instanceof GenericPropertyImpl) {
      GenericPropertyImpl genericProperty = (GenericPropertyImpl) property;
      if (genericProperty.getObject() instanceof UIObjectInfo) {
        UIObjectInfo object = (UIObjectInfo) genericProperty.getObject();
        MethodExpressionAccessor accessor = getMethodAccessor(genericProperty);
        if (accessor != null) {
          manager.insertAfter(GROUP_EDIT, new ExposePropertyAction(genericProperty,
              object,
              accessor));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.