Examples of ComplexProperty


Examples of org.eclipse.wb.internal.core.model.property.ComplexProperty

                  defaultValue,
                  null,
                  propertyEditor);
        }
        // create complex "Cell" property
        ComplexProperty cellProperty = new ComplexProperty("Cell", "(cell properties)");
        cellProperty.setCategory(PropertyCategory.system(7));
        cellProperty.setProperties(new Property[]{
            widthProperty,
            heightProperty,
            horizontalAlignmentProperty,
            verticalAlignmentProperty});
        return cellProperty;
View Full Code Here

Examples of org.eclipse.wb.internal.core.model.property.ComplexProperty

  private void addFace(String faceName) throws Exception {
    final JavaInfo face = JavaInfoUtils.addChildExposedByMethod(this, "get" + faceName);
    m_faces.add(face);
    // create ComplexProperty for each face
    {
      ComplexProperty faceProperty = new ComplexProperty(faceName, "(Face properties)") {
        @Override
        public void setValue(Object value) throws Exception {
          if (value == Property.UNKNOWN_VALUE) {
            face.delete();
          }
        }
      };
      faceProperty.setProperties(face.getProperties());
      faceProperty.setCategory(PropertyCategory.system(100 + m_faces.size()));
      m_faceProperties.add(faceProperty);
    }
    // when any face property is about to set, reset other properties
    face.addBroadcastListener(new GenericPropertySetValue() {
      public void invoke(GenericPropertyImpl property, Object[] value, boolean[] shouldSetValue)
View Full Code Here

Examples of org.eclipse.wb.internal.core.model.property.ComplexProperty

    // optional FlexTable properties
    if (m_panel instanceof FlexTableInfo) {
      addSpanProperties(widget, properties);
    }
    // create complex "Cell" property
    ComplexProperty cellProperty = new ComplexProperty("Cell", "(cell properties)");
    cellProperty.setCategory(PropertyCategory.system(7));
    cellProperty.setProperties(properties);
    return cellProperty;
  }
View Full Code Here

Examples of org.eclipse.wb.internal.core.model.property.ComplexProperty

    if (invocation == null) {
      return;
    }
    String signature = AstNodeUtils.getMethodSignature(invocation);
    //
    ComplexProperty complexProperty;
    {
      @SuppressWarnings("unchecked")
      Map<String, ComplexProperty> complexProperties =
          (Map<String, ComplexProperty>) widget.getArbitraryValue(this);
      if (complexProperties == null) {
        complexProperties = Maps.newTreeMap();
        widget.putArbitraryValue(this, complexProperties);
      }
      complexProperty = complexProperties.get(title);
      if (complexProperty == null) {
        complexProperty = new ComplexProperty(title, "<properties>");
        complexProperty.setCategory(PropertyCategory.system(10));
        complexProperties.put(signature, complexProperty);
      }
      properties.add(complexProperty);
    }
    // update sub-properties
    String[] propertyTitles = getLocationPropertyTitles(signature);
    String title_1 = propertyTitles[0];
    String title_3 = propertyTitles[1];
    Property property_1 = new LocationValue_Property(title_1, invocation, 1);
    Property property_1u = new LocationUnit_Property(title_1 + " unit", invocation, 2, horizontal);
    Property property_3 = new LocationValue_Property(title_3, invocation, 3);
    Property property_3u = new LocationUnit_Property(title_3 + " unit", invocation, 4, horizontal);
    Property[] subProperties = new Property[]{property_1, property_1u, property_3, property_3u};
    complexProperty.setProperties(subProperties);
  }
View Full Code Here

Examples of org.eclipse.wb.internal.core.model.property.ComplexProperty

          propertyDescription.setEditor(propertyEditor);
          propertyDescription.setDefaultValue(defaultValue);
          verticalAlignmentProperty = new GenericPropertyImpl(widget, propertyDescription);
        }
        // create complex "Cell" property
        ComplexProperty cellProperty = new ComplexProperty("Cell", "(cell properties)");
        cellProperty.setCategory(PropertyCategory.system(7));
        cellProperty.setProperties(new Property[]{
            widthProperty,
            heightProperty,
            horizontalAlignmentProperty,
            verticalAlignmentProperty});
        return cellProperty;
View Full Code Here

Examples of org.eclipse.wb.internal.core.model.property.ComplexProperty

              propertiesToMove.add(property);
            }
          }
          properties.removeAll(propertiesToMove);
          // add to "canvas" property
          ComplexProperty canvasProperty = getCanvasProperty();
          canvasProperty.setProperties(propertiesToMove);
          canvasProperty.setText(getVariableSupport().getTitle());
          properties.add(canvasProperty);
          // add underlying widget properties
          Property[] widgetProperties = getWidget().getProperties();
          properties.addAll(Lists.newArrayList(widgetProperties));
        }
View Full Code Here

Examples of org.eclipse.wb.internal.core.model.property.ComplexProperty

    });
  }

  private ComplexProperty getCanvasProperty() {
    final String CANVAS_PROPERTY = "CANVAS_PROPERTY";
    ComplexProperty canvasProperty = (ComplexProperty) getArbitraryValue(CANVAS_PROPERTY);
    if (canvasProperty == null) {
      canvasProperty = new ComplexProperty("Canvas", null);
      canvasProperty.setCategory(PropertyCategory.system(5));
      canvasProperty.setModified(true);
      putArbitraryValue(CANVAS_PROPERTY, canvasProperty);
    }
    return canvasProperty;
  }
View Full Code Here

Examples of org.eclipse.wb.internal.core.model.property.ComplexProperty

    // prepare layout complex property
    {
      Property[] layoutProperties = getProperties();
      if (m_layoutComplexProperty == null) {
        String text = "(" + getTitle() + ")";
        m_layoutComplexProperty = new ComplexProperty("Layout", text) {
          @Override
          public boolean isModified() throws Exception {
            return true;
          }
View Full Code Here

Examples of org.eclipse.wb.internal.core.model.property.ComplexProperty

      {
        Class<?> componentClass = getDescription().getComponentClass();
        text = "(" + componentClass.getName() + ")";
      }
      // prepare ComplexProperty
      m_complexProperty = new ComplexProperty("LayoutData", text) {
        @Override
        public boolean isModified() throws Exception {
          return true;
        }
View Full Code Here

Examples of org.eclipse.wb.internal.core.model.property.ComplexProperty

    Constructor<?> constructor = getUiConstructor(object);
    if (constructor == null) {
      return null;
    }
    // prepare @UiConstructor complex property
    ComplexProperty constructorProperty = new ComplexProperty("UiConstructor", "(Properties)");
    constructorProperty.setCategory(PropertyCategory.system(3));
    constructorProperty.setModified(true);
    constructorProperty.setTooltip("Properties for @UiConstructor arguments.");
    // prepare sub-properties
    List<Property> subPropertiesList = Lists.newArrayList();
    String[] parameterNames = getConstructorParameterNames(constructor);
    Class<?>[] parameterTypes = constructor.getParameterTypes();
    for (int i = 0; i < parameterTypes.length; i++) {
      Property property = createProperty(object, parameterNames[i], parameterTypes[i]);
      if (property != null) {
        subPropertiesList.add(property);
      }
    }
    // set sub-properties
    if (!subPropertiesList.isEmpty()) {
      constructorProperty.setProperties(subPropertiesList);
      return constructorProperty;
    }
    return null;
  }
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.