Examples of ComplexProperty


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

  /**
   * Collect bounds property from simple properties.
   */
  private static void collectBoundsProperty(FormItemInfo item, List<Property> properties) {
    final String key = "FormItem_Info.boundsProperty";
    ComplexProperty boundsProperty = (ComplexProperty) item.getArbitraryValue(key);
    if (boundsProperty == null) {
      boundsProperty = new ComplexProperty("Bounds", null);
      item.putArbitraryValue(key, boundsProperty);
    }
    // show bounds-property for absolute item layout
    boundsProperty.setCategory(item.getForm().isAbsoluteItemLayout()
        ? PropertyCategory.PREFERRED
        : PropertyCategory.ADVANCED);
    // move bounds items properties
    boundsProperty.setProperties(new Property[]{
        extractPropertyByTitle(properties, "left"),
        extractPropertyByTitle(properties, "top"),
        extractPropertyByTitle(properties, "width(int)"),
        extractPropertyByTitle(properties, "width(java.lang.String)"),
        extractPropertyByTitle(properties, "height(int)"),
        extractPropertyByTitle(properties, "height(java.lang.String)")});
    // apply current bounds
    Rectangle modelBounds = item.getModelBounds();
    if (modelBounds != null) {
      boundsProperty.setText("("
          + modelBounds.x
          + ", "
          + modelBounds.y
          + ", "
          + modelBounds.width
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.