diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AbstractAttribute.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AbstractAttribute.java index a274533a1e953b7fdbdf3d538da52fcba675c965..b34b32c11d12b243abf922fd0f6a8d0c162ace32 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AbstractAttribute.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AbstractAttribute.java @@ -14,6 +14,7 @@ import org.eclipse.ui.views.properties.IPropertyDescriptor; import org.eclipse.ui.views.properties.IPropertySource; import org.eclipse.ui.views.properties.PropertyDescriptor; +import de.bmotionstudio.gef.editor.AttributeConstants; import de.bmotionstudio.gef.editor.model.BControl; /** @@ -40,21 +41,14 @@ public abstract class AbstractAttribute implements IPropertySource, Cloneable { // The current value of the attribute private Object value; - public AbstractAttribute() { + public AbstractAttribute(Object value) { + this.value = value; + this.defaultValue = value; + this.group = AttributeConstants.ATTRIBUTE_MISC; + this.editable = true; + this.show = true; } - // public AbstractAttribute(Object value) { - // this(value, true, true); - // } - // - // public AbstractAttribute(Object value, boolean isEditable, - // boolean showInPropertiesView) { - // this.value = value; - // this.initValue = value; - // this.editable = isEditable; - // this.show = showInPropertiesView; - // } - private Object readResolve() { this.initValue = this.value; return this; diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeBlocks.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeBlocks.java index 315644b9ef97568c4c00926f1789014a9c7eaecb..c8bc0a271d4bbad53892d0fb4de6ef0d36efc7bd 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeBlocks.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeBlocks.java @@ -13,6 +13,10 @@ import de.bmotionstudio.gef.editor.property.IntegerPropertyDescriptor; public class AttributeBlocks extends AbstractAttribute { + public AttributeBlocks(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeFillColor.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeFillColor.java index cd80f70d55afc0a10bd527df0e106fd91ba21746..bf60950d26341e9d1d227aa21506c31f0d1041ca 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeFillColor.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeFillColor.java @@ -13,6 +13,10 @@ import org.eclipse.ui.views.properties.PropertyDescriptor; public class AttributeFillColor extends AbstractAttribute { + public AttributeFillColor(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { return new ColorPropertyDescriptor(getID(), getName()); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeFillHeight.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeFillHeight.java index 9f01d0b6c552c34aef19113722a7fc5e75da4803..87fd14a739285a50037ea7b4924991b977ddd071 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeFillHeight.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeFillHeight.java @@ -13,6 +13,10 @@ import de.bmotionstudio.gef.editor.property.IntegerPropertyDescriptor; public class AttributeFillHeight extends AbstractAttribute { + public AttributeFillHeight(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeLights.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeLights.java index 627d92dba72681209c5c811e7955fc17c1813601..0c1d0822a4fa6e2172c53408bad655d4a7157454 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeLights.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeLights.java @@ -13,6 +13,10 @@ import de.bmotionstudio.gef.editor.property.IntegerPropertyDescriptor; public class AttributeLights extends AbstractAttribute { + public AttributeLights(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeMeasureInterval.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeMeasureInterval.java index 1680c972ae95edd8fe905e532c5771f64831e587..7c78a501ca1e55a99370a2b3e03ad4ce2ab5049e 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeMeasureInterval.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeMeasureInterval.java @@ -13,6 +13,10 @@ import de.bmotionstudio.gef.editor.property.IntegerPropertyDescriptor; public class AttributeMeasureInterval extends AbstractAttribute { + public AttributeMeasureInterval(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeMeasureMaxPos.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeMeasureMaxPos.java index e9f6f8e173d94f81adea9a1d64002c8ff07f8799..328348c8365d63e4def3e93ed930f2f321303bcd 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeMeasureMaxPos.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeMeasureMaxPos.java @@ -13,6 +13,10 @@ import de.bmotionstudio.gef.editor.property.IntegerPropertyDescriptor; public class AttributeMeasureMaxPos extends AbstractAttribute { + public AttributeMeasureMaxPos(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeShowMeasure.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeShowMeasure.java index ef0519e2b954a8d9ee325ec39524407a61df1ffc..2d53e7796a8e9a4e489695aceaf74773de1178f0 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeShowMeasure.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeShowMeasure.java @@ -13,6 +13,10 @@ import de.bmotionstudio.gef.editor.property.CheckboxPropertyDescriptor; public class AttributeShowMeasure extends AbstractAttribute { + public AttributeShowMeasure(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { return new CheckboxPropertyDescriptor(getID(), getName()); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeSignalColor.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeSignalColor.java index dbb67bfa42d70af2254e9215839b011b67fb0b33..19bc13837938bb4447b7bcddc0dd0806f31212ca 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeSignalColor.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeSignalColor.java @@ -15,6 +15,10 @@ public class AttributeSignalColor extends AbstractAttribute { public static final int GREEN = 1; public static final int NO_COLOR = 2; + public AttributeSignalColor(Object value) { + super(value); + } + @Override protected PropertyDescriptor preparePropertyDescriptor() { return new ComboBoxPropertyDescriptor(getID(), getName(), new String[] { diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeSwitchDirection.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeSwitchDirection.java index 346ebe11c5e06206138032d7d42b2978ea5e832d..783b182283947934b9fc5e4d1ffb45e0ee2246d2 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeSwitchDirection.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeSwitchDirection.java @@ -16,6 +16,10 @@ public class AttributeSwitchDirection extends AbstractAttribute { public static final int RIGHT_NORTH = 2; public static final int LEFT_NORTH = 3; + public AttributeSwitchDirection(Object value) { + super(value); + } + @Override public Object unmarshal(final String s) { return Integer.valueOf(s); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeSwitchPosition.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeSwitchPosition.java index 6ef89531e992ca9a2385fa79703570ad5daf6c09..a214d084617f0bdee8ba018ca05f497e6401ab00 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeSwitchPosition.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeSwitchPosition.java @@ -8,13 +8,16 @@ package de.bmotionstudio.gef.editor.attribute; import org.eclipse.ui.views.properties.ComboBoxPropertyDescriptor; import org.eclipse.ui.views.properties.PropertyDescriptor; - public class AttributeSwitchPosition extends AbstractAttribute { public static final int LEFT = 0; public static final int RIGHT = 1; public static final int UNKNOWN = 2; + public AttributeSwitchPosition(Object value) { + super(value); + } + @Override public Object unmarshal(final String s) { return Integer.valueOf(s); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeTrackDirection.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeTrackDirection.java index 642205502eeebb813a9056d802e5140be13b079a..b6a6dff2f2e2be9d93188ff9ea80dffbd4ddd002 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeTrackDirection.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeTrackDirection.java @@ -8,12 +8,15 @@ package de.bmotionstudio.gef.editor.attribute; import org.eclipse.ui.views.properties.ComboBoxPropertyDescriptor; import org.eclipse.ui.views.properties.PropertyDescriptor; - public class AttributeTrackDirection extends AbstractAttribute { public static final int RIGHT = 0; public static final int LEFT = 1; + public AttributeTrackDirection(Object value) { + super(value); + } + @Override public Object unmarshal(final String s) { return Integer.valueOf(s); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeAlpha.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeAlpha.java index 41eea7fe4cf1e7e5b45e4bb9c3663568d9a244d1..fe192157564608b16cc527627ed8ff49cd13ec62 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeAlpha.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeAlpha.java @@ -13,6 +13,10 @@ import de.bmotionstudio.gef.editor.property.SliderPropertyDescriptor; public class BAttributeAlpha extends AbstractAttribute { + public BAttributeAlpha(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { SliderPropertyDescriptor descriptor = new SliderPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeBackgroundColor.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeBackgroundColor.java index a0fc14f98a6360befc1174041a259a3e63f8bd15..0023246f77f3519457e9c64abf7ba27698fff49f 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeBackgroundColor.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeBackgroundColor.java @@ -14,6 +14,10 @@ import de.bmotionstudio.gef.editor.model.BControl; public class BAttributeBackgroundColor extends AbstractAttribute { + public BAttributeBackgroundColor(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { return new ColorPropertyDescriptor(getID(), getName()); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeBackgroundVisible.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeBackgroundVisible.java index 32054a9bcfbcf20d3d71c5b1f8888543cea1fdd4..05c468b63454bd7836f67c8c319cb7660f76de34 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeBackgroundVisible.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeBackgroundVisible.java @@ -13,6 +13,10 @@ import de.bmotionstudio.gef.editor.property.CheckboxPropertyDescriptor; public class BAttributeBackgroundVisible extends AbstractAttribute { + public BAttributeBackgroundVisible(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { return new CheckboxPropertyDescriptor(getID(), getName()); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeButtonGroup.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeButtonGroup.java index aefb1043c6432f9211035c47bacd2414f8e4f186..e15182719126fc38f4fd36bd599f1938e6f6c0f0 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeButtonGroup.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeButtonGroup.java @@ -11,6 +11,10 @@ import org.eclipse.ui.views.properties.TextPropertyDescriptor; public class BAttributeButtonGroup extends AbstractAttribute { + public BAttributeButtonGroup(Object value) { + super(value); + } + @Override protected PropertyDescriptor preparePropertyDescriptor() { return new TextPropertyDescriptor(getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeChecked.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeChecked.java index de45a3afa7ef6ac7a2fd7fef8aa397bc3f4097d9..d3013220cac3d2a736d85297118267822590618b 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeChecked.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeChecked.java @@ -13,6 +13,10 @@ import de.bmotionstudio.gef.editor.property.CheckboxPropertyDescriptor; public class BAttributeChecked extends AbstractAttribute { + public BAttributeChecked(Object value) { + super(value); + } + @Override protected PropertyDescriptor preparePropertyDescriptor() { return new CheckboxPropertyDescriptor(getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeColumns.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeColumns.java index 0ce92a69dfb946a91ed7ae400d66c5d4bc115784..12a636d196f8838fb2daf5c2561d8c3aa829aae2 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeColumns.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeColumns.java @@ -13,6 +13,10 @@ import de.bmotionstudio.gef.editor.property.IntegerPropertyDescriptor; public class BAttributeColumns extends AbstractAttribute { + public BAttributeColumns(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeConnection.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeConnection.java index 1e5e4a1f744ca396414720aaffa89c47cbb4335f..19428d8be059cc602dd29770813165943a53820a 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeConnection.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeConnection.java @@ -11,6 +11,10 @@ import org.eclipse.ui.views.properties.PropertyDescriptor; public class BAttributeConnection extends AbstractAttribute { + public BAttributeConnection(Object value) { + super(value); + } + @Override public PropertyDescriptor preparePropertyDescriptor() { PropertyDescriptor descriptor = new PropertyDescriptor(getID(), diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeConnectionSourceDecoration.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeConnectionSourceDecoration.java index f62678f88021e50313abdd9c669ef285a0efee00..0a63dffb6f8a8d0b709dde9ed4c1da1a212c1427 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeConnectionSourceDecoration.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeConnectionSourceDecoration.java @@ -11,6 +11,10 @@ import org.eclipse.ui.views.properties.PropertyDescriptor; public class BAttributeConnectionSourceDecoration extends AbstractAttribute { + public BAttributeConnectionSourceDecoration(Object value) { + super(value); + } + public static int DECORATION_NONE = 0; public static int DECORATION_TRIANGLE = 1; diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeConnectionTargetDecoration.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeConnectionTargetDecoration.java index 1e22657db49af91185ec7a3a09933c4c96255995..0666b2593ff07f542384d97154175c2057889d6c 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeConnectionTargetDecoration.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeConnectionTargetDecoration.java @@ -11,6 +11,10 @@ import org.eclipse.ui.views.properties.PropertyDescriptor; public class BAttributeConnectionTargetDecoration extends AbstractAttribute { + public BAttributeConnectionTargetDecoration(Object value) { + super(value); + } + public static int DECORATION_NONE = 0; public static int DECORATION_TRIANGLE = 1; diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeCoordinates.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeCoordinates.java index 01447dc77778aacadc5c49759927c443c0fae044..2aeb359d027bd32783119b814a50786e7f8c476b 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeCoordinates.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeCoordinates.java @@ -14,6 +14,10 @@ import de.bmotionstudio.gef.editor.AttributeConstants; public class BAttributeCoordinates extends AbstractAttribute { + public BAttributeCoordinates(Object value) { + super(value); + } + @Override public PropertyDescriptor preparePropertyDescriptor() { PropertyDescriptor descriptor = new PropertyDescriptor(getID(), diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeCustom.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeCustom.java index 3342762ea41d5a1bd5c15dcdd10bfaa5de7c65a1..a2ff6fa20caa0970d0519bad991a4f0b1a0f93c6 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeCustom.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeCustom.java @@ -11,6 +11,10 @@ import org.eclipse.ui.views.properties.TextPropertyDescriptor; public class BAttributeCustom extends AbstractAttribute { + public BAttributeCustom(Object value) { + super(value); + } + @Override public PropertyDescriptor preparePropertyDescriptor() { return new TextPropertyDescriptor(getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeDirection.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeDirection.java index 40f9418e0d102f3fcef33835d9b8bf4e5032af8f..ffd7f2c1fc564bfd48c24cf47bf8016e7357e3a0 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeDirection.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeDirection.java @@ -11,6 +11,10 @@ import org.eclipse.ui.views.properties.PropertyDescriptor; public class BAttributeDirection extends AbstractAttribute { + public BAttributeDirection(Object value) { + super(value); + } + public static final int NORTH = 0; public static final int SOUTH = 1; public static final int WEST = 2; diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeEnabled.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeEnabled.java index c8ae7422abfbac9531e3c50dc7a1fd5e7edc880d..170e1dfde4ec606c0932fe2fcb03fd8eb0ec7b0e 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeEnabled.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeEnabled.java @@ -13,6 +13,10 @@ import de.bmotionstudio.gef.editor.property.CheckboxPropertyDescriptor; public class BAttributeEnabled extends AbstractAttribute { + public BAttributeEnabled(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { return new CheckboxPropertyDescriptor(getID(), getName()); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeFalseValue.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeFalseValue.java index 6ea18bb04de84c3ce408fca33826389887caab6e..342f0d7ab5761275cb97d0705ad3ed10ccbd4cea 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeFalseValue.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeFalseValue.java @@ -1,3 +1,9 @@ +/** + * (c) 2009 Lehrstuhl fuer Softwaretechnik und Programmiersprachen, + * Heinrich Heine Universitaet Duesseldorf + * This software is licenced under EPL 1.0 (http://www.eclipse.org/org/documents/epl-v10.html) + * */ + package de.bmotionstudio.gef.editor.attribute; import org.eclipse.ui.views.properties.PropertyDescriptor; @@ -5,6 +11,10 @@ import org.eclipse.ui.views.properties.TextPropertyDescriptor; public class BAttributeFalseValue extends AbstractAttribute { + public BAttributeFalseValue(Object value) { + super(value); + } + @Override public PropertyDescriptor preparePropertyDescriptor() { return new TextPropertyDescriptor(getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeFillType.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeFillType.java index bd57f9d8331fced4d4615e54ca82a798d563b78f..81abe496879115fa02f1c2bf99682cd727f57344 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeFillType.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeFillType.java @@ -16,6 +16,10 @@ public class BAttributeFillType extends AbstractAttribute { public static final int SHADED = 2; public static final int GRADIENT = 3; + public BAttributeFillType(Object value) { + super(value); + } + @Override protected PropertyDescriptor preparePropertyDescriptor() { return new ComboBoxPropertyDescriptor(getID(), getName(), new String[] { diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeFont.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeFont.java index 9c89418c917993b50709ce32f80c38eace929c38..85986759f8aed85204a780a1d4f54082296b91f0 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeFont.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeFont.java @@ -12,6 +12,10 @@ import de.bmotionstudio.gef.editor.property.FontPropertyDescriptor; public class BAttributeFont extends AbstractAttribute { + public BAttributeFont(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { return new FontPropertyDescriptor(getID(), getName()); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeForegroundColor.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeForegroundColor.java index 8a17fe1387f029e02c9aeb4e83712038a6015974..cf4abf23f94cd929925ae936b74ba1c6aeae5888 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeForegroundColor.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeForegroundColor.java @@ -14,6 +14,10 @@ import de.bmotionstudio.gef.editor.model.BControl; public class BAttributeForegroundColor extends AbstractAttribute { + public BAttributeForegroundColor(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { return new ColorPropertyDescriptor(getID(), getName()); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeHeight.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeHeight.java index b0a6191af1cacc545bef905f191f6f5a4368dc83..5947e5cd808c696ae11196e1b7eddc77c2b98fb7 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeHeight.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeHeight.java @@ -13,6 +13,10 @@ import de.bmotionstudio.gef.editor.property.IntegerPropertyDescriptor; public class BAttributeHeight extends AbstractAttribute { + public BAttributeHeight(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeID.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeID.java index 2af7dadd08c395f66de3c039e3f0589e91026b29..b181122cdbd830bab5682d75b05d494f0fb8e00d 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeID.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeID.java @@ -13,6 +13,10 @@ import de.bmotionstudio.gef.editor.model.BControl; public class BAttributeID extends AbstractAttribute { + public BAttributeID(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { TextPropertyDescriptor descriptor = new TextPropertyDescriptor(getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeImage.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeImage.java index d3938ae21abf2fa4daf34d75e2e98360323fb80a..86f1d299bf2ef2cf3811c6eee0916e062ae9605f 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeImage.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeImage.java @@ -16,6 +16,10 @@ import de.bmotionstudio.gef.editor.property.ImagePropertyDescriptor; public class BAttributeImage extends AbstractAttribute { + public BAttributeImage(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { return new ImagePropertyDescriptor(getID(), getName()); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeLabel.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeLabel.java index 47b72fb46604377bf1413358d8da5e0a73afc405..a3f962a2702da02a2554dd4cb6f2b2476904edda 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeLabel.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeLabel.java @@ -11,6 +11,10 @@ import org.eclipse.ui.views.properties.TextPropertyDescriptor; public class BAttributeLabel extends AbstractAttribute { + public BAttributeLabel(Object value) { + super(value); + } + @Override protected PropertyDescriptor preparePropertyDescriptor() { return new TextPropertyDescriptor(getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeLineStyle.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeLineStyle.java index 262e5fd9f207c86ed9ac5f8efa634baf4a574741..9e0132d7d607e9eb4d1f08f382ea7894a5489e9b 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeLineStyle.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeLineStyle.java @@ -17,6 +17,10 @@ public class BAttributeLineStyle extends AbstractAttribute { public static final int DASHED_DOTTED_CONNECTION = 3; public static final int DASHED_DOTTED_DOTTED_CONNECTION = 4; + public BAttributeLineStyle(Object value) { + super(value); + } + @Override protected PropertyDescriptor preparePropertyDescriptor() { return new ComboBoxPropertyDescriptor(getID(), getName(), new String[] { diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeLineWidth.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeLineWidth.java index b40020c53d0e67dd551de27b0b8da041a677969e..82f43fda9cb00aa3fd4cbc51cd9625191b90f79d 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeLineWidth.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeLineWidth.java @@ -13,6 +13,10 @@ public class BAttributeLineWidth extends AbstractAttribute { return descriptor; } + public BAttributeLineWidth(Object value) { + super(value); + } + @Override public String validateValue(Object value, BControl control) { if (!(String.valueOf(value)).trim().matches("\\d*")) { diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeMain.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeMain.java index 8429e40309d287c54bd43f4c5084aa2202f6b988..2870f97b871646f1bc141b5c33f76b3dde21b219 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeMain.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeMain.java @@ -11,6 +11,10 @@ import org.eclipse.ui.views.properties.PropertyDescriptor; public class BAttributeMain extends AbstractAttribute { + public BAttributeMain(Object value) { + super(value); + } + @Override public PropertyDescriptor preparePropertyDescriptor() { PropertyDescriptor descriptor = new PropertyDescriptor(getID(), diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeMisc.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeMisc.java index c32fa2681fc10cd3b7feec57da712a1ab11d5a1e..658f9e91b231ea21d6383cc32298f73424977693 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeMisc.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeMisc.java @@ -11,6 +11,10 @@ import org.eclipse.ui.views.properties.PropertyDescriptor; public class BAttributeMisc extends AbstractAttribute { + public BAttributeMisc(Object value) { + super(value); + } + @Override public PropertyDescriptor preparePropertyDescriptor() { PropertyDescriptor descriptor = new PropertyDescriptor(getID(), diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOffsetH.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOffsetH.java index f91d9446c4d5e770093a6b1fa33d1f9346dcf678..f173bbfb605a0c922380c2e9db6bae83e9eba08f 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOffsetH.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOffsetH.java @@ -13,6 +13,10 @@ import de.bmotionstudio.gef.editor.property.IntegerPropertyDescriptor; public class BAttributeOffsetH extends AbstractAttribute { + public BAttributeOffsetH(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOffsetV.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOffsetV.java index 6c8ef25c738659a4104e00e83cbdfd2510197994..9fafedfc1c7588060e666ac95d51344bc3c9dfc5 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOffsetV.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOffsetV.java @@ -13,6 +13,10 @@ import de.bmotionstudio.gef.editor.property.IntegerPropertyDescriptor; public class BAttributeOffsetV extends AbstractAttribute { + public BAttributeOffsetV(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOrientation.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOrientation.java index ac0656a50f6ed5df19491f483d73d4583f105c00..db025c10df17ae79035008eac615bd1a36069290 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOrientation.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOrientation.java @@ -5,6 +5,10 @@ import org.eclipse.ui.views.properties.PropertyDescriptor; public class BAttributeOrientation extends AbstractAttribute { + public BAttributeOrientation(Object value) { + super(value); + } + public static final int HORIZONTAL = 0; public static final int VERTICAL = 1; diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOutlineAlpha.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOutlineAlpha.java index 218e74deb39827dcd8360fab13c0945df4e8d301..f583a8f03f37c48592c2358a6217a1f2b347b7b3 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOutlineAlpha.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOutlineAlpha.java @@ -13,6 +13,10 @@ import de.bmotionstudio.gef.editor.property.SliderPropertyDescriptor; public class BAttributeOutlineAlpha extends AbstractAttribute { + public BAttributeOutlineAlpha(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { SliderPropertyDescriptor descriptor = new SliderPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeRows.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeRows.java index dbd8fdd42d5ae5f3ed1c6f3c9c606241e70512e9..b3df0f422b0fab661a49ac893d785b2c3cda0a00 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeRows.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeRows.java @@ -13,6 +13,10 @@ import de.bmotionstudio.gef.editor.property.IntegerPropertyDescriptor; public class BAttributeRows extends AbstractAttribute { + public BAttributeRows(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeShape.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeShape.java index 48547232461d0040a8621ef9bab07845280ac066..506461deca4a39e20ff8bf3adecaeedb1555f601 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeShape.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeShape.java @@ -11,6 +11,10 @@ import org.eclipse.ui.views.properties.PropertyDescriptor; public class BAttributeShape extends AbstractAttribute { + public BAttributeShape(Object value) { + super(value); + } + public static final int SHAPE_RECTANGLE = 0; public static final int SHAPE_OVAL = 1; public static final int SHAPE_TRIANGLE = 2; diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeSize.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeSize.java index 6244b248374f1b34a0529c6417e5353b2794bdc3..23094707bf3e913c307528b9d8d3bb5d1a5e0fda 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeSize.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeSize.java @@ -14,6 +14,10 @@ import de.bmotionstudio.gef.editor.AttributeConstants; public class BAttributeSize extends AbstractAttribute { + public BAttributeSize(Object value) { + super(value); + } + public static final String ID = "de.bmotionstudio.gef.editor.attribute.BAttributeSize"; @Override diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeText.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeText.java index b5c18d5cb2fd25574d1d944cdb7a07205c259bc4..97d071630c2c0df0fdc1159ecb2d74de2f47fd23 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeText.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeText.java @@ -11,6 +11,10 @@ import org.eclipse.ui.views.properties.TextPropertyDescriptor; public class BAttributeText extends AbstractAttribute { + public BAttributeText(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { return new TextPropertyDescriptor(getID(), getName()); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeTextColor.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeTextColor.java index d6e6465095ab97d39429c1884d3c94146979f78d..dbba315d244d7655012a87b6072cc0db9ca37eda 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeTextColor.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeTextColor.java @@ -14,6 +14,10 @@ import de.bmotionstudio.gef.editor.model.BControl; public class BAttributeTextColor extends AbstractAttribute { + public BAttributeTextColor(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { return new ColorPropertyDescriptor(getID(), getName()); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeTrueValue.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeTrueValue.java index 27ef95ab61e8058fcaa4ac0074a6263f50f5b507..3d58d1fbd9b9645fb4df65b4b0ed72f3ee1adb24 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeTrueValue.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeTrueValue.java @@ -11,6 +11,10 @@ import org.eclipse.ui.views.properties.TextPropertyDescriptor; public class BAttributeTrueValue extends AbstractAttribute { + public BAttributeTrueValue(Object value) { + super(value); + } + @Override public PropertyDescriptor preparePropertyDescriptor() { return new TextPropertyDescriptor(getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeValue.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeValue.java index f6f62ad7e605d95ced4751aa3c67008d825f3c1b..2b0aaf110088d54fde29b51a5fc1f5125ba80b54 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeValue.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeValue.java @@ -11,6 +11,10 @@ import org.eclipse.ui.views.properties.TextPropertyDescriptor; public class BAttributeValue extends AbstractAttribute { + public BAttributeValue(Object value) { + super(value); + } + @Override protected PropertyDescriptor preparePropertyDescriptor() { return new TextPropertyDescriptor(getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeVisible.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeVisible.java index de3ca30f252777eb3dfb15629c0e776f5a362535..bbf89608770e925157c6fcf401e58fcd3338d59b 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeVisible.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeVisible.java @@ -13,6 +13,10 @@ import de.bmotionstudio.gef.editor.property.CheckboxPropertyDescriptor; public class BAttributeVisible extends AbstractAttribute { + public BAttributeVisible(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { return new CheckboxPropertyDescriptor(getID(), getName()); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeWidth.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeWidth.java index 7885372386ae8b8f99b8f7ab76881eb4f88f2ff4..34844653d9226fbca2ab5020f527fb7d43718cc0 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeWidth.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeWidth.java @@ -13,6 +13,10 @@ import de.bmotionstudio.gef.editor.property.IntegerPropertyDescriptor; public class BAttributeWidth extends AbstractAttribute { + public BAttributeWidth(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeX.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeX.java index 3494ad60a75d272f602f573076858a504e1251e4..e3f911398536a6f4a871fdd8b037608462a064a0 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeX.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeX.java @@ -13,6 +13,10 @@ import de.bmotionstudio.gef.editor.property.IntegerPropertyDescriptor; public class BAttributeX extends AbstractAttribute { + public BAttributeX(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeY.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeY.java index 1ac072819bf8e01d9e6f04d04d8a04b3941729cc..45c5959a7837d01f33fe22d722db436167b3d7fa 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeY.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeY.java @@ -13,6 +13,10 @@ import de.bmotionstudio.gef.editor.property.IntegerPropertyDescriptor; public class BAttributeY extends AbstractAttribute { + public BAttributeY(Object value) { + super(value); + } + public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/BControlPropertySource.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/BControlPropertySource.java index 625d75213e4d709338b1c3cacff9411096d350f1..2a836bbb01b329295719dcb98442848f2bbecd5e 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/BControlPropertySource.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/BControlPropertySource.java @@ -19,8 +19,9 @@ public class BControlPropertySource extends AbstractAttribute { private BAttributeMisc miscAttribute; public BControlPropertySource(BControl control) { + super(null); this.control = control; - this.miscAttribute = new BAttributeMisc(); + this.miscAttribute = new BAttributeMisc(""); addChild(this.miscAttribute); init(); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BButton.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BButton.java index ba400c1ec2d1ba36747eca9a3b28729f5d507052..0c472a56bbf10e4978a3a0029fb2d4895fb9b4cd 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BButton.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BButton.java @@ -8,7 +8,13 @@ package de.bmotionstudio.gef.editor.model; import org.eclipse.swt.graphics.RGB; -import de.bmotionstudio.gef.editor.AttributeConstants; +import de.bmotionstudio.gef.editor.attribute.BAttributeBackgroundColor; +import de.bmotionstudio.gef.editor.attribute.BAttributeEnabled; +import de.bmotionstudio.gef.editor.attribute.BAttributeHeight; +import de.bmotionstudio.gef.editor.attribute.BAttributeSize; +import de.bmotionstudio.gef.editor.attribute.BAttributeText; +import de.bmotionstudio.gef.editor.attribute.BAttributeTextColor; +import de.bmotionstudio.gef.editor.attribute.BAttributeWidth; /** * @author Lukas Ladenberger @@ -31,15 +37,20 @@ public class BButton extends BControl { @Override protected void initAttributes() { - initAttribute(AttributeConstants.ATTRIBUTE_TEXT, DEFAULT_TEXT); - initAttribute(AttributeConstants.ATTRIBUTE_BACKGROUND_COLOR, new RGB( - 192, 192, 192)); - initAttribute(AttributeConstants.ATTRIBUTE_TEXT_COLOR, new RGB(0, 0, 0)); - initAttribute(AttributeConstants.ATTRIBUTE_ENABLED, true); - initAttribute(AttributeConstants.ATTRIBUTE_HEIGHT, 25, - AttributeConstants.ATTRIBUTE_SIZE); - initAttribute(AttributeConstants.ATTRIBUTE_WIDTH, 100, - AttributeConstants.ATTRIBUTE_SIZE); + + initAttribute(new BAttributeText(DEFAULT_TEXT)); + initAttribute(new BAttributeBackgroundColor(new RGB(192, 192, 192))); + initAttribute(new BAttributeTextColor(new RGB(0, 0, 0))); + initAttribute(new BAttributeEnabled(true)); + + BAttributeHeight aHeight = new BAttributeHeight(25); + aHeight.setGroup(BAttributeSize.ID); + initAttribute(aHeight); + + BAttributeWidth aWidth = new BAttributeWidth(100); + aHeight.setGroup(BAttributeSize.ID); + initAttribute(aWidth); + } } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BCheckbox.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BCheckbox.java index 39cc02f81a4a35c00c4b83f9465eea0feff746aa..96950332d7be34480035dff478e53e6fcada563c 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BCheckbox.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BCheckbox.java @@ -9,6 +9,14 @@ package de.bmotionstudio.gef.editor.model; import org.eclipse.swt.graphics.RGB; import de.bmotionstudio.gef.editor.AttributeConstants; +import de.bmotionstudio.gef.editor.attribute.BAttributeChecked; +import de.bmotionstudio.gef.editor.attribute.BAttributeEnabled; +import de.bmotionstudio.gef.editor.attribute.BAttributeFalseValue; +import de.bmotionstudio.gef.editor.attribute.BAttributeHeight; +import de.bmotionstudio.gef.editor.attribute.BAttributeSize; +import de.bmotionstudio.gef.editor.attribute.BAttributeText; +import de.bmotionstudio.gef.editor.attribute.BAttributeTextColor; +import de.bmotionstudio.gef.editor.attribute.BAttributeTrueValue; /** * @author Lukas Ladenberger @@ -31,14 +39,20 @@ public class BCheckbox extends BControl { @Override protected void initAttributes() { - initAttribute(AttributeConstants.ATTRIBUTE_TEXT, DEFAULT_TEXT); - initAttribute(AttributeConstants.ATTRIBUTE_TEXT_COLOR, new RGB(0, 0, 0)); - initAttribute(AttributeConstants.ATTRIBUTE_CHECKED, true); - initAttribute(AttributeConstants.ATTRIBUTE_ENABLED, true); - initAttribute(AttributeConstants.ATTRIBUTE_TRUEVALUE, ""); - initAttribute(AttributeConstants.ATTRIBUTE_FALSEVALUE, ""); - initAttribute(AttributeConstants.ATTRIBUTE_HEIGHT, 21, false, false, - AttributeConstants.ATTRIBUTE_SIZE); + + initAttribute(new BAttributeText(DEFAULT_TEXT)); + initAttribute(new BAttributeTextColor(new RGB(0, 0, 0))); + initAttribute(new BAttributeEnabled(true)); + initAttribute(new BAttributeChecked(true)); + initAttribute(new BAttributeTrueValue("")); + initAttribute(new BAttributeFalseValue("")); + + BAttributeHeight aHeight = new BAttributeHeight(21); + aHeight.setGroup(BAttributeSize.ID); + aHeight.setShow(false); + aHeight.setEditable(false); + initAttribute(aHeight); + } @Override diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BComposite.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BComposite.java index 8bfb44d6867ec5b7d26dbc8204373114e8973410..52d060b4781b977535ead1436f069d5df9b0b666 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BComposite.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BComposite.java @@ -8,7 +8,8 @@ package de.bmotionstudio.gef.editor.model; import org.eclipse.swt.graphics.RGB; -import de.bmotionstudio.gef.editor.AttributeConstants; +import de.bmotionstudio.gef.editor.attribute.BAttributeBackgroundColor; +import de.bmotionstudio.gef.editor.attribute.BAttributeImage; /** * @author Lukas Ladenberger @@ -29,9 +30,10 @@ public class BComposite extends BControl { @Override protected void initAttributes() { - initAttribute(AttributeConstants.ATTRIBUTE_BACKGROUND_COLOR, new RGB( - 192, 192, 192)); - initAttribute(AttributeConstants.ATTRIBUTE_IMAGE, null); + + initAttribute(new BAttributeBackgroundColor(new RGB(192, 192, 192))); + initAttribute(new BAttributeImage(null)); + } @Override diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BConnection.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BConnection.java index 048da4cfc3c726f28410804f93b96adf8ba02e4f..30427a0361ca0baa0cd1c29c7b9a38b230b3bb1e 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BConnection.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BConnection.java @@ -8,10 +8,13 @@ package de.bmotionstudio.gef.editor.model; import org.eclipse.swt.graphics.RGB; -import de.bmotionstudio.gef.editor.AttributeConstants; +import de.bmotionstudio.gef.editor.attribute.BAttributeConnection; import de.bmotionstudio.gef.editor.attribute.BAttributeConnectionSourceDecoration; import de.bmotionstudio.gef.editor.attribute.BAttributeConnectionTargetDecoration; +import de.bmotionstudio.gef.editor.attribute.BAttributeForegroundColor; +import de.bmotionstudio.gef.editor.attribute.BAttributeLabel; import de.bmotionstudio.gef.editor.attribute.BAttributeLineStyle; +import de.bmotionstudio.gef.editor.attribute.BAttributeLineWidth; public class BConnection extends BControl { @@ -117,24 +120,38 @@ public class BConnection extends BControl { @Override protected void initAttributes() { - initAttribute(AttributeConstants.ATTRIBUTE_CONNECTION, null); - initAttribute(AttributeConstants.ATTRIBUTE_LINEWIDTH, 1, - AttributeConstants.ATTRIBUTE_CONNECTION); - initAttribute(AttributeConstants.ATTRIBUTE_LINESTYLE, - BAttributeLineStyle.SOLID_CONNECTION, - AttributeConstants.ATTRIBUTE_CONNECTION); - initAttribute(AttributeConstants.ATTRIBUTE_FOREGROUND_COLOR, new RGB(0, - 0, 0), AttributeConstants.ATTRIBUTE_CONNECTION); - initAttribute( - AttributeConstants.ATTRIBUTE_CONNECTION_SOURCE_DECORATION, - BAttributeConnectionSourceDecoration.DECORATION_NONE, - AttributeConstants.ATTRIBUTE_CONNECTION); - initAttribute( - AttributeConstants.ATTRIBUTE_CONNECTION_TARGET_DECORATION, - BAttributeConnectionTargetDecoration.DECORATION_NONE, - AttributeConstants.ATTRIBUTE_CONNECTION); - initAttribute(AttributeConstants.ATTRIBUTE_LABEL, "Label...", - AttributeConstants.ATTRIBUTE_CONNECTION); + + BAttributeConnection aConnection = new BAttributeConnection(null); + initAttribute(aConnection); + + BAttributeLineWidth aLineWidth = new BAttributeLineWidth(1); + aLineWidth.setGroup(aConnection); + initAttribute(aLineWidth); + + BAttributeLineStyle aLineStyle = new BAttributeLineStyle( + BAttributeLineStyle.SOLID_CONNECTION); + aLineStyle.setGroup(aConnection); + initAttribute(aLineStyle); + + BAttributeForegroundColor aForegroundColor = new BAttributeForegroundColor( + new RGB(0, 0, 0)); + aForegroundColor.setGroup(aConnection); + initAttribute(aForegroundColor); + + BAttributeConnectionSourceDecoration aSourceDeco = new BAttributeConnectionSourceDecoration( + BAttributeConnectionSourceDecoration.DECORATION_NONE); + aSourceDeco.setGroup(aConnection); + initAttribute(aSourceDeco); + + BAttributeConnectionTargetDecoration aTargetDeco = new BAttributeConnectionTargetDecoration( + BAttributeConnectionSourceDecoration.DECORATION_NONE); + aTargetDeco.setGroup(aConnection); + initAttribute(aTargetDeco); + + BAttributeLabel aLabel = new BAttributeLabel("Label ..."); + aLabel.setGroup(aConnection); + initAttribute(aLabel); + } } \ No newline at end of file diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BControl.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BControl.java index c65e19736a3ebd39da8f167200ace4d61a6cf27c..3b18b6d688076b757ca215ac2b44c34e90472e01 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BControl.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BControl.java @@ -29,6 +29,16 @@ import de.bmotionstudio.gef.editor.AttributeConstants; import de.bmotionstudio.gef.editor.BMotionEditorPlugin; import de.bmotionstudio.gef.editor.BMotionStudioImage; import de.bmotionstudio.gef.editor.attribute.AbstractAttribute; +import de.bmotionstudio.gef.editor.attribute.BAttributeCoordinates; +import de.bmotionstudio.gef.editor.attribute.BAttributeCustom; +import de.bmotionstudio.gef.editor.attribute.BAttributeHeight; +import de.bmotionstudio.gef.editor.attribute.BAttributeID; +import de.bmotionstudio.gef.editor.attribute.BAttributeMisc; +import de.bmotionstudio.gef.editor.attribute.BAttributeSize; +import de.bmotionstudio.gef.editor.attribute.BAttributeVisible; +import de.bmotionstudio.gef.editor.attribute.BAttributeWidth; +import de.bmotionstudio.gef.editor.attribute.BAttributeX; +import de.bmotionstudio.gef.editor.attribute.BAttributeY; import de.bmotionstudio.gef.editor.internal.BControlPropertySource; import de.bmotionstudio.gef.editor.observer.IObserverListener; import de.bmotionstudio.gef.editor.observer.Observer; @@ -189,45 +199,47 @@ public abstract class BControl implements IAdaptable, Cloneable { ID = UUID.randomUUID().toString(); else ID = (visualization.getMaxIDString(type)); - initAttribute(AttributeConstants.ATTRIBUTE_ID, ID, - AbstractAttribute.ROOT); - initAttribute(AttributeConstants.ATTRIBUTE_MISC, "", - AbstractAttribute.ROOT); - - // initAttribute(new BAttributeID(ID), AbstractAttribute.ROOT); + BAttributeID aID = new BAttributeID(ID); + aID.setGroup(AbstractAttribute.ROOT); + initAttribute(aID); + BAttributeMisc aMisc = new BAttributeMisc(""); + aMisc.setGroup(AbstractAttribute.ROOT); + initAttribute(aMisc); + // Init location and size attributes - initAttribute(AttributeConstants.ATTRIBUTE_COORDINATES, null, - AbstractAttribute.ROOT); - initAttribute(AttributeConstants.ATTRIBUTE_X, 100, - AttributeConstants.ATTRIBUTE_COORDINATES); - initAttribute(AttributeConstants.ATTRIBUTE_Y, 100, - AttributeConstants.ATTRIBUTE_COORDINATES); - - // BAttributeCoordinates coordinatesAtr = new - // BAttributeCoordinates(null); - // initAttribute(coordinatesAtr, AbstractAttribute.ROOT); - // initAttribute(new BAttributeX(100), coordinatesAtr); - // initAttribute(new BAttributeY(100), coordinatesAtr); - - initAttribute(AttributeConstants.ATTRIBUTE_SIZE, null, - AbstractAttribute.ROOT); - initAttribute(AttributeConstants.ATTRIBUTE_WIDTH, 100, - AttributeConstants.ATTRIBUTE_SIZE); - initAttribute(AttributeConstants.ATTRIBUTE_HEIGHT, 100, - AttributeConstants.ATTRIBUTE_SIZE); - - // BAttributeSize sizeAtr = new BAttributeSize(null); - // initAttribute(sizeAtr, AbstractAttribute.ROOT); - // initAttribute(new BAttributeWidth(100), sizeAtr); - // initAttribute(new BAttributeHeight(100), sizeAtr); + BAttributeCoordinates aCoordinates = new BAttributeCoordinates(null); + aCoordinates.setGroup(AbstractAttribute.ROOT); + initAttribute(aCoordinates); + + BAttributeX aX = new BAttributeX(100); + aX.setGroup(aCoordinates); + initAttribute(aX); + + BAttributeY aY = new BAttributeY(100); + aY.setGroup(aCoordinates); + initAttribute(aY); + + BAttributeSize aSize = new BAttributeSize(null); + initAttribute(aSize); + + BAttributeWidth aWidth = new BAttributeWidth(100); + aWidth.setGroup(aSize); + initAttribute(aWidth); + + BAttributeHeight aHeight = new BAttributeHeight(100); + aHeight.setGroup(aSize); + initAttribute(aHeight); // Init visible and this attribute - initAttribute(AttributeConstants.ATTRIBUTE_VISIBLE, true, - AbstractAttribute.ROOT); - initAttribute(AttributeConstants.ATTRIBUTE_CUSTOM, "", - AbstractAttribute.ROOT); + BAttributeVisible aVisible = new BAttributeVisible(true); + aVisible.setGroup(AbstractAttribute.ROOT); + initAttribute(aVisible); + + BAttributeCustom aCustom = new BAttributeCustom(""); + aCustom.setGroup(AbstractAttribute.ROOT); + initAttribute(aCustom); } @@ -771,60 +783,26 @@ public abstract class BControl implements IAdaptable, Cloneable { public abstract String getType(); - protected void initAttribute(String id, Object defaultValue) { - initAttribute(id, defaultValue, true, true, - AttributeConstants.ATTRIBUTE_MISC); - } - - protected void initAttribute(String id, Object defaultValue, String groupID) { - initAttribute(id, defaultValue, true, true, groupID); - } - - protected void initAttribute(String id, Object defaultValue, - boolean editable, boolean show) { - initAttribute(id, defaultValue, editable, show, - AttributeConstants.ATTRIBUTE_MISC); - } - - protected void initAttribute(String id, Object defaultValue, - boolean editable, boolean show, String groupID) { + protected void initAttribute(AbstractAttribute atr) { - AbstractAttribute atr = getAttribute(id); + AbstractAttribute oldAtr = getAttribute(atr.getID()); // If no attribute exists yet, create a new one and set the value - if (atr == null) { - atr = (AbstractAttribute) reflectiveGet(id); - if (atr != null) { - atr.setValue(defaultValue); - getAttributes().put(atr.getID(), atr); - } else { - return; - } + if (oldAtr == null) { + oldAtr = atr; + getAttributes().put(oldAtr.getID(), oldAtr); } - if (!atr.isInitialized()) { - atr.setDefaultValue(defaultValue); - atr.setGroup(groupID); - atr.setEditable(editable); - atr.setShow(show); - atr.setInitialized(true); - } + if (!oldAtr.isInitialized()) { - } + oldAtr.setDefaultValue(atr.getDefaultValue()); + oldAtr.setGroup(atr.getGroup()); + oldAtr.setEditable(atr.isEditable()); + oldAtr.setShow(atr.show()); + oldAtr.setInitialized(true); - private Object reflectiveGet(String className) { - Object newInstance = null; - try { - Class<?> forName = Class.forName(className); - newInstance = forName.newInstance(); - } catch (ClassNotFoundException e) { - e.printStackTrace(); - } catch (InstantiationException e) { - e.printStackTrace(); - } catch (IllegalAccessException e) { - e.printStackTrace(); } - return newInstance; + } public boolean canHaveChildren() { diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BImage.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BImage.java index 4a62e4490f480b66d861cb8c90b6d7c657087b1b..0d626f9246bcdc9964a4cce92abebfa13b889cf4 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BImage.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BImage.java @@ -6,7 +6,7 @@ package de.bmotionstudio.gef.editor.model; -import de.bmotionstudio.gef.editor.AttributeConstants; +import de.bmotionstudio.gef.editor.attribute.BAttributeImage; /** * @author Lukas Ladenberger @@ -27,7 +27,9 @@ public class BImage extends BControl { @Override protected void initAttributes() { - initAttribute(AttributeConstants.ATTRIBUTE_IMAGE, null); + + initAttribute(new BAttributeImage(null)); + } } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BRadioButton.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BRadioButton.java index d4fb6291a82a2e261e7235f4c38952ad2a666c26..ea370fbfd120477d521b6dba181cd4bbab4b9537 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BRadioButton.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BRadioButton.java @@ -12,6 +12,14 @@ import org.eclipse.swt.graphics.RGB; import de.bmotionstudio.gef.editor.AttributeConstants; import de.bmotionstudio.gef.editor.ButtonGroupHelper; +import de.bmotionstudio.gef.editor.attribute.BAttributeButtonGroup; +import de.bmotionstudio.gef.editor.attribute.BAttributeChecked; +import de.bmotionstudio.gef.editor.attribute.BAttributeEnabled; +import de.bmotionstudio.gef.editor.attribute.BAttributeHeight; +import de.bmotionstudio.gef.editor.attribute.BAttributeSize; +import de.bmotionstudio.gef.editor.attribute.BAttributeText; +import de.bmotionstudio.gef.editor.attribute.BAttributeTextColor; +import de.bmotionstudio.gef.editor.attribute.BAttributeValue; /** * @author Lukas Ladenberger @@ -39,14 +47,20 @@ public class BRadioButton extends BControl { @Override protected void initAttributes() { - initAttribute(AttributeConstants.ATTRIBUTE_TEXT, DEFAULT_TEXT); - initAttribute(AttributeConstants.ATTRIBUTE_TEXT_COLOR, new RGB(0, 0, 0)); - initAttribute(AttributeConstants.ATTRIBUTE_CHECKED, true); - initAttribute(AttributeConstants.ATTRIBUTE_ENABLED, true); - initAttribute(AttributeConstants.ATTRIBUTE_VALUE, ""); - initAttribute(AttributeConstants.ATTRIBUTE_BUTTONGROUP, ""); - initAttribute(AttributeConstants.ATTRIBUTE_HEIGHT, 21, false, false, - AttributeConstants.ATTRIBUTE_SIZE); + + initAttribute(new BAttributeText(DEFAULT_TEXT)); + initAttribute(new BAttributeTextColor(new RGB(0, 0, 0))); + initAttribute(new BAttributeEnabled(true)); + initAttribute(new BAttributeChecked(true)); + initAttribute(new BAttributeValue("")); + initAttribute(new BAttributeButtonGroup("")); + + BAttributeHeight aHeight = new BAttributeHeight(21); + aHeight.setGroup(BAttributeSize.ID); + aHeight.setShow(false); + aHeight.setEditable(false); + initAttribute(aHeight); + } @Override diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BShape.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BShape.java index 91d912289965f1aff6955b06b639110a2fdd1195..3e2bdb233831215341b2be3ff2777f63be9860e4 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BShape.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BShape.java @@ -11,9 +11,14 @@ import org.eclipse.swt.graphics.RGB; import de.bmotionstudio.gef.editor.AttributeConstants; import de.bmotionstudio.gef.editor.BMotionStudioImage; +import de.bmotionstudio.gef.editor.attribute.BAttributeAlpha; +import de.bmotionstudio.gef.editor.attribute.BAttributeBackgroundColor; import de.bmotionstudio.gef.editor.attribute.BAttributeDirection; import de.bmotionstudio.gef.editor.attribute.BAttributeFillType; +import de.bmotionstudio.gef.editor.attribute.BAttributeForegroundColor; +import de.bmotionstudio.gef.editor.attribute.BAttributeImage; import de.bmotionstudio.gef.editor.attribute.BAttributeOrientation; +import de.bmotionstudio.gef.editor.attribute.BAttributeOutlineAlpha; import de.bmotionstudio.gef.editor.attribute.BAttributeShape; /** @@ -40,21 +45,18 @@ public class BShape extends BControl { @Override protected void initAttributes() { - initAttribute(AttributeConstants.ATTRIBUTE_BACKGROUND_COLOR, new RGB( - 255, 0, 0)); - initAttribute(AttributeConstants.ATTRIBUTE_FOREGROUND_COLOR, new RGB(0, - 0, 0)); - initAttribute(AttributeConstants.ATTRIBUTE_IMAGE, null); - initAttribute(AttributeConstants.ATTRIBUTE_ALPHA, 255); - initAttribute(AttributeConstants.ATTRIBUTE_OUTLINEALPHA, 0); - initAttribute(AttributeConstants.ATTRIBUTE_SHAPE, - BAttributeShape.SHAPE_RECTANGLE); - initAttribute(AttributeConstants.ATTRIBUTE_ORIENTATION, - BAttributeOrientation.HORIZONTAL); - initAttribute(AttributeConstants.ATTRIBUTE_DIRECTION, - BAttributeDirection.NORTH); - initAttribute(AttributeConstants.ATTRIBUTE_FILLTYPE, - BAttributeFillType.FILLED); + + initAttribute(new BAttributeBackgroundColor(new RGB(255, 0, 0))); + initAttribute(new BAttributeForegroundColor(new RGB(0, 0, 0))); + initAttribute(new BAttributeImage(null)); + initAttribute(new BAttributeAlpha(255)); + initAttribute(new BAttributeOutlineAlpha(0)); + initAttribute(new BAttributeShape(BAttributeShape.SHAPE_RECTANGLE)); + initAttribute(new BAttributeOrientation( + BAttributeOrientation.HORIZONTAL)); + initAttribute(new BAttributeDirection(BAttributeDirection.NORTH)); + initAttribute(new BAttributeFillType(BAttributeFillType.FILLED)); + } @Override diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BTable.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BTable.java index c896d09d6e88a8ea223cfe5465f65f827c1a851c..3d455a431397f3e97c7419db64581cde7a84c7df 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BTable.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BTable.java @@ -9,8 +9,13 @@ package de.bmotionstudio.gef.editor.model; import org.eclipse.draw2d.ColorConstants; import org.eclipse.draw2d.geometry.Rectangle; -import de.bmotionstudio.gef.editor.AttributeConstants; import de.bmotionstudio.gef.editor.attribute.AbstractAttribute; +import de.bmotionstudio.gef.editor.attribute.BAttributeColumns; +import de.bmotionstudio.gef.editor.attribute.BAttributeForegroundColor; +import de.bmotionstudio.gef.editor.attribute.BAttributeHeight; +import de.bmotionstudio.gef.editor.attribute.BAttributeRows; +import de.bmotionstudio.gef.editor.attribute.BAttributeSize; +import de.bmotionstudio.gef.editor.attribute.BAttributeWidth; import de.bmotionstudio.gef.editor.command.CreateCommand; public class BTable extends BControl { @@ -47,16 +52,30 @@ public class BTable extends BControl { @Override protected void initAttributes() { - initAttribute(AttributeConstants.ATTRIBUTE_SIZE, null, false, false, - AbstractAttribute.ROOT); - initAttribute(AttributeConstants.ATTRIBUTE_WIDTH, 0, false, false, - AttributeConstants.ATTRIBUTE_SIZE); - initAttribute(AttributeConstants.ATTRIBUTE_HEIGHT, 0, false, false, - AttributeConstants.ATTRIBUTE_SIZE); - initAttribute(AttributeConstants.ATTRIBUTE_FOREGROUND_COLOR, - ColorConstants.black.getRGB()); - initAttribute(AttributeConstants.ATTRIBUTE_COLUMNS, 1); - initAttribute(AttributeConstants.ATTRIBUTE_ROWS, 1); + + BAttributeSize aSize = new BAttributeSize(null); + aSize.setGroup(AbstractAttribute.ROOT); + aSize.setShow(false); + aSize.setEditable(false); + initAttribute(aSize); + + BAttributeHeight aHeight = new BAttributeHeight(0); + aHeight.setGroup(BAttributeSize.ID); + aHeight.setShow(false); + aHeight.setEditable(false); + initAttribute(aHeight); + + BAttributeWidth aWidth = new BAttributeWidth(0); + aWidth.setGroup(BAttributeSize.ID); + aWidth.setShow(false); + aWidth.setEditable(false); + initAttribute(aWidth); + + initAttribute(new BAttributeForegroundColor( + ColorConstants.black.getRGB())); + initAttribute(new BAttributeColumns(1)); + initAttribute(new BAttributeRows(1)); + } @Override diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BTableCell.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BTableCell.java index 631f54b4005c940da1450ecc5d0d69dc2eeacee7..3a735ce2ba7a97604c26198e3b83d941df98929e 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BTableCell.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BTableCell.java @@ -8,7 +8,12 @@ package de.bmotionstudio.gef.editor.model; import org.eclipse.draw2d.ColorConstants; -import de.bmotionstudio.gef.editor.AttributeConstants; +import de.bmotionstudio.gef.editor.attribute.BAttributeBackgroundColor; +import de.bmotionstudio.gef.editor.attribute.BAttributeForegroundColor; +import de.bmotionstudio.gef.editor.attribute.BAttributeHeight; +import de.bmotionstudio.gef.editor.attribute.BAttributeSize; +import de.bmotionstudio.gef.editor.attribute.BAttributeText; +import de.bmotionstudio.gef.editor.attribute.BAttributeTextColor; public class BTableCell extends BControl { @@ -20,15 +25,25 @@ public class BTableCell extends BControl { @Override protected void initAttributes() { - initAttribute(AttributeConstants.ATTRIBUTE_BACKGROUND_COLOR, - ColorConstants.white.getRGB()); - initAttribute(AttributeConstants.ATTRIBUTE_FOREGROUND_COLOR, - ColorConstants.black.getRGB(), true, false); - initAttribute(AttributeConstants.ATTRIBUTE_TEXT_COLOR, + + initAttribute(new BAttributeBackgroundColor( + ColorConstants.white.getRGB())); + + BAttributeForegroundColor aForegroundColor = new BAttributeForegroundColor( ColorConstants.black.getRGB()); - initAttribute(AttributeConstants.ATTRIBUTE_TEXT, ""); - initAttribute(AttributeConstants.ATTRIBUTE_HEIGHT, 20, false, false, - AttributeConstants.ATTRIBUTE_SIZE); + aForegroundColor.setEditable(true); + aForegroundColor.setShow(false); + initAttribute(aForegroundColor); + + initAttribute(new BAttributeTextColor(ColorConstants.black.getRGB())); + initAttribute(new BAttributeText("")); + + BAttributeHeight aHeight = new BAttributeHeight(20); + aHeight.setGroup(BAttributeSize.ID); + aHeight.setShow(false); + aHeight.setEditable(false); + initAttribute(aHeight); + } @Override diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BTableColumn.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BTableColumn.java index 2b10c3b19cc445d9294117f5951835b21733fa8d..8fd526768607baf7425a486e02483be4789af6c1 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BTableColumn.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BTableColumn.java @@ -8,7 +8,9 @@ package de.bmotionstudio.gef.editor.model; import org.eclipse.draw2d.ColorConstants; -import de.bmotionstudio.gef.editor.AttributeConstants; +import de.bmotionstudio.gef.editor.attribute.BAttributeForegroundColor; +import de.bmotionstudio.gef.editor.attribute.BAttributeHeight; +import de.bmotionstudio.gef.editor.attribute.BAttributeSize; public class BTableColumn extends BControl { @@ -20,10 +22,19 @@ public class BTableColumn extends BControl { @Override protected void initAttributes() { - initAttribute(AttributeConstants.ATTRIBUTE_FOREGROUND_COLOR, - ColorConstants.black.getRGB(), true, false); - initAttribute(AttributeConstants.ATTRIBUTE_HEIGHT, 0, false, false, - AttributeConstants.ATTRIBUTE_SIZE); + + BAttributeForegroundColor aForegroundColor = new BAttributeForegroundColor( + ColorConstants.black.getRGB()); + aForegroundColor.setEditable(true); + aForegroundColor.setShow(false); + initAttribute(aForegroundColor); + + BAttributeHeight aHeight = new BAttributeHeight(0); + aHeight.setGroup(BAttributeSize.ID); + aHeight.setShow(false); + aHeight.setEditable(false); + initAttribute(aHeight); + } @Override diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BText.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BText.java index bbaa742f8ccda1d0875f8ea411f7fc5f5d822cd0..6a2ad36c36265fab3fb457a4d6419c58b3c66514 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BText.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BText.java @@ -8,7 +8,11 @@ package de.bmotionstudio.gef.editor.model; import org.eclipse.draw2d.ColorConstants; -import de.bmotionstudio.gef.editor.AttributeConstants; +import de.bmotionstudio.gef.editor.attribute.BAttributeBackgroundColor; +import de.bmotionstudio.gef.editor.attribute.BAttributeBackgroundVisible; +import de.bmotionstudio.gef.editor.attribute.BAttributeFont; +import de.bmotionstudio.gef.editor.attribute.BAttributeText; +import de.bmotionstudio.gef.editor.attribute.BAttributeTextColor; /** * @author Lukas Ladenberger @@ -31,14 +35,15 @@ public class BText extends BControl { @Override protected void initAttributes() { - initAttribute(AttributeConstants.ATTRIBUTE_TEXT, DEFAULT_TEXT); - initAttribute(AttributeConstants.ATTRIBUTE_BACKGROUND_COLOR, - ColorConstants.white.getRGB()); - initAttribute(AttributeConstants.ATTRIBUTE_TEXT_COLOR, - ColorConstants.black.getRGB()); - initAttribute(AttributeConstants.ATTRIBUTE_BACKGROUND_VISIBLE, true); - initAttribute(AttributeConstants.ATTRIBUTE_FONT, - "1||9.75|0|WINDOWS|1|-13|0|0|0|400|0|0|0|0|0|0|0|0|"); + + initAttribute(new BAttributeText(DEFAULT_TEXT)); + initAttribute(new BAttributeTextColor(ColorConstants.black.getRGB())); + initAttribute(new BAttributeBackgroundColor( + ColorConstants.white.getRGB())); + initAttribute(new BAttributeBackgroundVisible(true)); + initAttribute(new BAttributeFont( + "1||9.75|0|WINDOWS|1|-13|0|0|0|400|0|0|0|0|0|0|0|0|")); + } } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BTextfield.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BTextfield.java index d832ef10832f46d861d50e00bcc1f541b6b83e91..aafd035e5c872cc4929ebe3b8535110b1bde9f23 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BTextfield.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BTextfield.java @@ -7,6 +7,9 @@ package de.bmotionstudio.gef.editor.model; import de.bmotionstudio.gef.editor.AttributeConstants; +import de.bmotionstudio.gef.editor.attribute.BAttributeHeight; +import de.bmotionstudio.gef.editor.attribute.BAttributeSize; +import de.bmotionstudio.gef.editor.attribute.BAttributeText; /** * @author Lukas Ladenberger @@ -29,9 +32,15 @@ public class BTextfield extends BControl { @Override protected void initAttributes() { - initAttribute(AttributeConstants.ATTRIBUTE_TEXT, DEFAULT_TEXT); - initAttribute(AttributeConstants.ATTRIBUTE_HEIGHT, 21, - AttributeConstants.ATTRIBUTE_SIZE); + + initAttribute(new BAttributeText(DEFAULT_TEXT)); + + BAttributeHeight aHeight = new BAttributeHeight(21); + aHeight.setGroup(BAttributeSize.ID); + aHeight.setShow(false); + aHeight.setEditable(false); + initAttribute(aHeight); + } @Override diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Light.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Light.java index e3257455dab31748f3313f255119d0830caf5088..89ef5f398c7a6f7654fe688fb9aa062f955b95f4 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Light.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Light.java @@ -7,8 +7,12 @@ package de.bmotionstudio.gef.editor.model; import org.eclipse.draw2d.ColorConstants; -import de.bmotionstudio.gef.editor.AttributeConstants; import de.bmotionstudio.gef.editor.attribute.AbstractAttribute; +import de.bmotionstudio.gef.editor.attribute.BAttributeBackgroundColor; +import de.bmotionstudio.gef.editor.attribute.BAttributeCoordinates; +import de.bmotionstudio.gef.editor.attribute.BAttributeHeight; +import de.bmotionstudio.gef.editor.attribute.BAttributeSize; +import de.bmotionstudio.gef.editor.attribute.BAttributeWidth; public class Light extends BControl { @@ -21,16 +25,32 @@ public class Light extends BControl { @Override protected void initAttributes() { - initAttribute(AttributeConstants.ATTRIBUTE_SIZE, null, false, false, - AbstractAttribute.ROOT); - initAttribute(AttributeConstants.ATTRIBUTE_COORDINATES, null, false, - false, AbstractAttribute.ROOT); - initAttribute(AttributeConstants.ATTRIBUTE_WIDTH, 12, false, false, - AttributeConstants.ATTRIBUTE_SIZE); - initAttribute(AttributeConstants.ATTRIBUTE_HEIGHT, 12, false, false, - AttributeConstants.ATTRIBUTE_SIZE); - initAttribute(AttributeConstants.ATTRIBUTE_BACKGROUND_COLOR, - ColorConstants.lightGray.getRGB()); + BAttributeCoordinates aCoordinates = new BAttributeCoordinates(null); + aCoordinates.setGroup(AbstractAttribute.ROOT); + aCoordinates.setShow(false); + aCoordinates.setEditable(false); + initAttribute(aCoordinates); + + BAttributeSize aSize = new BAttributeSize(null); + aSize.setGroup(AbstractAttribute.ROOT); + aSize.setShow(false); + aSize.setEditable(false); + initAttribute(aSize); + + BAttributeHeight aHeight = new BAttributeHeight(12); + aHeight.setGroup(BAttributeSize.ID); + aHeight.setShow(false); + aHeight.setEditable(false); + initAttribute(aHeight); + + BAttributeWidth aWidth = new BAttributeWidth(12); + aWidth.setGroup(BAttributeSize.ID); + aWidth.setShow(false); + aWidth.setEditable(false); + initAttribute(aWidth); + + initAttribute(new BAttributeBackgroundColor( + ColorConstants.lightGray.getRGB())); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Signal.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Signal.java index d9e62ef149366bd0e35953dc8adc017c6aa63036..5065cca37e9824670f9bc51af1a9eb5087b7db54 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Signal.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Signal.java @@ -7,8 +7,10 @@ package de.bmotionstudio.gef.editor.model; import org.eclipse.draw2d.geometry.Rectangle; -import de.bmotionstudio.gef.editor.AttributeConstants; +import de.bmotionstudio.gef.editor.attribute.AttributeLights; import de.bmotionstudio.gef.editor.attribute.AttributeTrackDirection; +import de.bmotionstudio.gef.editor.attribute.BAttributeHeight; +import de.bmotionstudio.gef.editor.attribute.BAttributeSize; import de.bmotionstudio.gef.editor.command.CreateCommand; /** @@ -42,11 +44,16 @@ public class Signal extends BControl { @Override protected void initAttributes() { - initAttribute(AttributeConstants.ATTRIBUTE_TRACK_DIRECTION, - AttributeTrackDirection.RIGHT); - initAttribute(AttributeConstants.ATTRIBUTE_HEIGHT, 48, false, false, - AttributeConstants.ATTRIBUTE_SIZE); - initAttribute(AttributeConstants.ATTRIBUTE_LIGHTS, 2); + + BAttributeHeight aHeight = new BAttributeHeight(48); + aHeight.setGroup(BAttributeSize.ID); + aHeight.setShow(false); + aHeight.setEditable(false); + initAttribute(aHeight); + + initAttribute(new AttributeTrackDirection(AttributeTrackDirection.RIGHT)); + initAttribute(new AttributeLights(2)); + } @Override diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Switch.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Switch.java index bd5fd4fbed676298420c9b703429f5d776166eac..918b7823b6eb29aafae259a271aeb73a4d225581 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Switch.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Switch.java @@ -15,6 +15,9 @@ import de.bmotionstudio.gef.editor.AttributeConstants; import de.bmotionstudio.gef.editor.attribute.AbstractAttribute; import de.bmotionstudio.gef.editor.attribute.AttributeSwitchDirection; import de.bmotionstudio.gef.editor.attribute.AttributeSwitchPosition; +import de.bmotionstudio.gef.editor.attribute.BAttributeHeight; +import de.bmotionstudio.gef.editor.attribute.BAttributeSize; +import de.bmotionstudio.gef.editor.attribute.BAttributeWidth; import de.bmotionstudio.gef.editor.command.CreateCommand; import de.bmotionstudio.gef.editor.command.TrackCreateCommand; @@ -101,15 +104,18 @@ public class Switch extends BControl { @Override protected void initAttributes() { - initAttribute(AttributeConstants.ATTRIBUTE_WIDTH, 100, - AttributeConstants.ATTRIBUTE_SIZE); - initAttribute(AttributeConstants.ATTRIBUTE_HEIGHT, 50, - AttributeConstants.ATTRIBUTE_SIZE); + BAttributeHeight aHeight = new BAttributeHeight(50); + aHeight.setGroup(BAttributeSize.ID); + initAttribute(aHeight); - initAttribute(AttributeConstants.ATTRIBUTE_SWITCH_DIRECTION, - AttributeSwitchDirection.RIGHT_SOUTH); - initAttribute(AttributeConstants.ATTRIBUTE_SWITCH_POSITION, - AttributeSwitchPosition.UNKNOWN); + BAttributeWidth aWidth = new BAttributeWidth(100); + aWidth.setGroup(BAttributeSize.ID); + initAttribute(aWidth); + + initAttribute(new AttributeSwitchDirection( + AttributeSwitchDirection.RIGHT_SOUTH)); + initAttribute(new AttributeSwitchPosition( + AttributeSwitchPosition.UNKNOWN)); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Tank.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Tank.java index ffb63370d645f1491b95445a390703125d9e9cbc..3b6215e913f60487831895b846c286c449e81945 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Tank.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Tank.java @@ -6,9 +6,15 @@ package de.bmotionstudio.gef.editor.model; -import org.eclipse.swt.graphics.RGB; +import org.eclipse.draw2d.ColorConstants; -import de.bmotionstudio.gef.editor.AttributeConstants; +import de.bmotionstudio.gef.editor.attribute.AttributeFillColor; +import de.bmotionstudio.gef.editor.attribute.AttributeFillHeight; +import de.bmotionstudio.gef.editor.attribute.AttributeMeasureInterval; +import de.bmotionstudio.gef.editor.attribute.AttributeMeasureMaxPos; +import de.bmotionstudio.gef.editor.attribute.AttributeShowMeasure; +import de.bmotionstudio.gef.editor.attribute.BAttributeAlpha; +import de.bmotionstudio.gef.editor.attribute.BAttributeBackgroundColor; public class Tank extends BControl { @@ -26,15 +32,14 @@ public class Tank extends BControl { @Override protected void initAttributes() { - initAttribute(AttributeConstants.ATTRIBUTE_SHOWS_MEASURE, true); - initAttribute(AttributeConstants.ATTRIBUTE_MEASURE_INTERVAL, 25); - initAttribute(AttributeConstants.ATTRIBUTE_MEASURE_MAXPOS, 100); - initAttribute(AttributeConstants.ATTRIBUTE_FILL_COLOR, - new RGB(0, 0, 255)); - initAttribute(AttributeConstants.ATTRIBUTE_FILL_HEIGHT, 75); - initAttribute(AttributeConstants.ATTRIBUTE_BACKGROUND_COLOR, new RGB( - 255, 255, 255)); - initAttribute(AttributeConstants.ATTRIBUTE_ALPHA, 0); + initAttribute(new BAttributeBackgroundColor( + ColorConstants.black.getRGB())); + initAttribute(new AttributeShowMeasure(true)); + initAttribute(new AttributeMeasureInterval(25)); + initAttribute(new AttributeMeasureMaxPos(100)); + initAttribute(new AttributeFillColor(ColorConstants.blue.getRGB())); + initAttribute(new AttributeFillHeight(75)); + initAttribute(new BAttributeAlpha(0)); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Track.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Track.java index 2d335f6bbba98ce8e9f338945dd476611a9f1b68..efc34288f3ec897a469268e2f4cd5c286790b807 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Track.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Track.java @@ -6,11 +6,15 @@ package de.bmotionstudio.gef.editor.model; -import org.eclipse.draw2d.ColorConstants; +import org.eclipse.swt.graphics.RGB; -import de.bmotionstudio.gef.editor.AttributeConstants; +import de.bmotionstudio.gef.editor.attribute.BAttributeConnection; import de.bmotionstudio.gef.editor.attribute.BAttributeConnectionSourceDecoration; +import de.bmotionstudio.gef.editor.attribute.BAttributeConnectionTargetDecoration; +import de.bmotionstudio.gef.editor.attribute.BAttributeForegroundColor; +import de.bmotionstudio.gef.editor.attribute.BAttributeLabel; import de.bmotionstudio.gef.editor.attribute.BAttributeLineStyle; +import de.bmotionstudio.gef.editor.attribute.BAttributeLineWidth; /** * @author Lukas Ladenberger @@ -39,18 +43,36 @@ public class Track extends BControl { @Override protected void initAttributes() { - initAttribute(AttributeConstants.ATTRIBUTE_LINEWIDTH, 1); - initAttribute(AttributeConstants.ATTRIBUTE_LINESTYLE, + BAttributeConnection aConnection = new BAttributeConnection(null); + initAttribute(aConnection); + + BAttributeLineWidth aLineWidth = new BAttributeLineWidth(1); + aLineWidth.setGroup(aConnection); + initAttribute(aLineWidth); + + BAttributeLineStyle aLineStyle = new BAttributeLineStyle( BAttributeLineStyle.SOLID_CONNECTION); - initAttribute(AttributeConstants.ATTRIBUTE_FOREGROUND_COLOR, - ColorConstants.black.getRGB()); - initAttribute( - AttributeConstants.ATTRIBUTE_CONNECTION_SOURCE_DECORATION, + aLineStyle.setGroup(aConnection); + initAttribute(aLineStyle); + + BAttributeForegroundColor aForegroundColor = new BAttributeForegroundColor( + new RGB(0, 0, 0)); + aForegroundColor.setGroup(aConnection); + initAttribute(aForegroundColor); + + BAttributeConnectionSourceDecoration aSourceDeco = new BAttributeConnectionSourceDecoration( BAttributeConnectionSourceDecoration.DECORATION_NONE); - initAttribute( - AttributeConstants.ATTRIBUTE_CONNECTION_TARGET_DECORATION, + aSourceDeco.setGroup(aConnection); + initAttribute(aSourceDeco); + + BAttributeConnectionTargetDecoration aTargetDeco = new BAttributeConnectionTargetDecoration( BAttributeConnectionSourceDecoration.DECORATION_NONE); - initAttribute(AttributeConstants.ATTRIBUTE_LABEL, "Label..."); + aTargetDeco.setGroup(aConnection); + initAttribute(aTargetDeco); + + BAttributeLabel aLabel = new BAttributeLabel("Label ..."); + aLabel.setGroup(aConnection); + initAttribute(aLabel); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/TrackNode.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/TrackNode.java index d72a116652e281360d20555f0012dcc4bf0e8f2c..1dc0156dcde6830fa159acdd134138290f0186fd 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/TrackNode.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/TrackNode.java @@ -12,9 +12,13 @@ import java.util.List; import org.eclipse.draw2d.ColorConstants; import de.bmotionstudio.gef.editor.Animation; -import de.bmotionstudio.gef.editor.AttributeConstants; import de.bmotionstudio.gef.editor.attribute.AbstractAttribute; +import de.bmotionstudio.gef.editor.attribute.BAttributeForegroundColor; +import de.bmotionstudio.gef.editor.attribute.BAttributeHeight; import de.bmotionstudio.gef.editor.attribute.BAttributeLineStyle; +import de.bmotionstudio.gef.editor.attribute.BAttributeLineWidth; +import de.bmotionstudio.gef.editor.attribute.BAttributeSize; +import de.bmotionstudio.gef.editor.attribute.BAttributeWidth; /** * @author Lukas Ladenberger @@ -41,17 +45,31 @@ public class TrackNode extends BControl { @Override protected void initAttributes() { - initAttribute(AttributeConstants.ATTRIBUTE_SIZE, null, false, false, - AbstractAttribute.ROOT); - initAttribute(AttributeConstants.ATTRIBUTE_WIDTH, 20, false, false, - AttributeConstants.ATTRIBUTE_SIZE); - initAttribute(AttributeConstants.ATTRIBUTE_HEIGHT, 20, false, false, - AttributeConstants.ATTRIBUTE_SIZE); - initAttribute(AttributeConstants.ATTRIBUTE_FOREGROUND_COLOR, - ColorConstants.black.getRGB()); - initAttribute(AttributeConstants.ATTRIBUTE_LINEWIDTH, 1); - initAttribute(AttributeConstants.ATTRIBUTE_LINESTYLE, - BAttributeLineStyle.SOLID_CONNECTION); + + BAttributeSize aSize = new BAttributeSize(null); + aSize.setGroup(AbstractAttribute.ROOT); + aSize.setShow(false); + aSize.setEditable(false); + initAttribute(aSize); + + BAttributeHeight aHeight = new BAttributeHeight(20); + aHeight.setGroup(BAttributeSize.ID); + aHeight.setShow(false); + aHeight.setEditable(false); + initAttribute(aHeight); + + BAttributeWidth aWidth = new BAttributeWidth(20); + aWidth.setGroup(BAttributeSize.ID); + aWidth.setShow(false); + aWidth.setEditable(false); + initAttribute(aWidth); + + initAttribute(new BAttributeForegroundColor( + ColorConstants.black.getRGB())); + initAttribute(new BAttributeLineStyle( + BAttributeLineStyle.SOLID_CONNECTION)); + initAttribute(new BAttributeLineWidth(1)); + } public List<Track> getSourceTracks() {