public static int calculateHeight(EObject obj, HeightProperty heightProperty) { if ( heightProperty != null ) return calculateHeightDimension(obj,heightProperty.getHeightInChar(),heightProperty.getHeight(),heightProperty.isNegative()); else return 0; }
private static void setHeightPropertyFromStyle(EList<LayoutDataProperty> lpl, StylePropertyHeight spr, IElementWithLayoutData eld) { for (LayoutDataProperty ldp : lpl) { if (ldp instanceof HeightProperty) { if (((HeightProperty)ldp).getHeight()>0 && LayoutDataExtension.heightCanBeOverWrittenByHeightFromStyle(eld)==false) return; lpl.remove(ldp); break; } } HeightProperty ap = PomFactory.eINSTANCE.createHeightProperty(); ap.setHeight(spr.getHeight()); LayoutDataExtension.setHeightIsFromStyle(eld); lpl.add(ap); }
public Boolean apply(final HeightProperty it) { boolean _and = false; int _height = it.getHeight(); boolean _greaterThan = (_height > 0); if (!_greaterThan) { _and = false; } else { boolean _heightCanBeOverWrittenByHeightFromStyle = DefaultComponentStyleStrategy.this.heightCanBeOverWrittenByHeightFromStyle(eld); boolean _not = (!_heightCanBeOverWrittenByHeightFromStyle); _and = (_greaterThan && _not); } return Boolean.valueOf(_and); } };
} else if ( loProp instanceof HeightProperty ) { HeightProperty hProp = (HeightProperty) loProp; heightInChar = hProp.getHeightInChar();
final HeightProperty ap = PomFactory.eINSTANCE.createHeightProperty(); int _height = spr.getHeight(); ap.setHeight(_height); if (eld!=null) EObjectPropertiesAdapter.setProperty(eld, this.HEIGHT_SOURCE_PROPERTY, Integer.valueOf(this.HEIGHT_IS_FROM_STYLE)); lpl.add(ap);
public static int getHeight(LayoutData layoutData) { if (layoutData == null) return 0; for (Object obj : layoutData.getProperties()) { if (obj instanceof HeightProperty) { return ((HeightProperty)obj).getHeight(); } } return 0; }
xmaPage.setQntWidth(((WidthProperty)prop).getWidth()); } else if (prop instanceof HeightProperty) { xmaPage.setQntHeight(((HeightProperty)prop).getHeight()); } else if (prop instanceof TitleButtonsProperty) { xmaPage.setYnClose(false);