Author: lgiessmann
Date: Fri Jul 15 09:50:21 2011
New Revision: 631
Log:
gdl-frontend: Widgets: fixed a bug when setting a GdlView's padding property
Modified:
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlVisibleObject.java
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlListBox.java
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlReference.java
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlText.java
branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/gdl_widgets/test.gdl.jtm
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlVisibleObject.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlVisibleObject.java Fri Jul 15 08:12:14 2011 (r630)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlVisibleObject.java Fri Jul 15 09:50:21 2011 (r631)
@@ -1455,6 +1455,12 @@
this.setMarginBottom(widget, this.getMarginBottom(styleClass), styleClass);
this.setMarginLeft(widget, this.getMarginLeft(styleClass), styleClass);
+ this.setPadding(widget, this.getPadding(styleClass), styleClass);
+ this.setPaddingTop(widget, this.getPaddingTop(styleClass), styleClass);
+ this.setPaddingRight(widget, this.getPaddingRight(styleClass), styleClass);
+ this.setPaddingBottom(widget, this.getPaddingBottom(styleClass), styleClass);
+ this.setPaddingLeft(widget, this.getPaddingLeft(styleClass), styleClass);
+
this.setBorderColor(widget, this.getBorderColor(styleClass), styleClass);
this.setBorderTopColor(widget, this.getBorderTopColor(styleClass), styleClass);
this.setBorderRightColor(widget, this.getBorderRightColor(styleClass), styleClass);
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlListBox.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlListBox.java Fri Jul 15 08:12:14 2011 (r630)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlListBox.java Fri Jul 15 09:50:21 2011 (r631)
@@ -3,7 +3,6 @@
import java.util.ArrayList;
import com.google.gwt.event.shared.EventHandler;
-import com.google.gwt.i18n.client.HasDirection.Direction;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.ui.ListBox;
import com.google.gwt.user.client.ui.Widget;
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlReference.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlReference.java Fri Jul 15 08:12:14 2011 (r630)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlReference.java Fri Jul 15 09:50:21 2011 (r631)
@@ -185,6 +185,7 @@
}
+
// this class wraps a Label that is used as
protected class Reference extends Label implements HasFocusHandlers, HasBlurHandlers {
public Reference(){
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlText.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlText.java Fri Jul 15 08:12:14 2011 (r630)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlText.java Fri Jul 15 09:50:21 2011 (r631)
@@ -48,6 +48,12 @@
super(tmRepresentative);
// TODO: create a text element for each TM-elem
this.createNewTextArea().setText("Text"); // TODO: remove only for debugging
+ //NumUnitValue val = this.getPaddingBottom(null); // TODO: remove
+ //String str = "null";
+ //if(val != null) str = val.getCssValue();
+ //if(val != null) DOM.setStyleAttribute(this.subElements.get(0).getElement(), "paddingBottom", str);
+ //DOM.setStyleAttribute(this.subElements.get(0).getElement(), "paddingBottom", "20px");
+ //Window.alert(">> " + str);
}
@@ -652,6 +658,12 @@
this.setMarginRight(source, this.getMarginRight(null), null);
this.setMarginBottom(source, this.getMarginBottom(null), null);
this.setMarginLeft(source, this.getMarginLeft(null), null);
+
+ this.setPadding(source, this.getPadding(null), null);
+ this.setPaddingTop(source, this.getPaddingTop(null), null);
+ this.setPaddingRight(source, this.getPaddingRight(null), null);
+ this.setPaddingBottom(source, this.getPaddingBottom(null), null);
+ this.setPaddingLeft(source, this.getPaddingLeft(null), null);
this.setBorderColor(source, this.getBorderColor(null), null);
this.setBorderTopColor(source, this.getBorderTopColor(null), null);
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/gdl_widgets/test.gdl.jtm
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/gdl_widgets/test.gdl.jtm Fri Jul 15 08:12:14 2011 (r630)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/gdl_widgets/test.gdl.jtm Fri Jul 15 09:50:21 2011 (r631)
@@ -27,23 +27,31 @@
{"subject_identifiers":["[gdl:Text-Object]"]},
{"subject_identifiers":["[gdl:Position]"]},
{"subject_identifiers":["[gdl:position]"], "instance_of":["si:[tmcl:association-type]"]},
+ {"subject_identifiers":["[gdl:margin-left]"], "instance_of":["si:[tmcl:occurrence-type]"]},
+ {"subject_identifiers":["[gdl:margin-top]"], "instance_of":["si:[tmcl:occurrence-type]"]},
+ {"subject_identifiers":["[gdl:margin-bottom]"], "instance_of":["si:[tmcl:occurrence-type]"]},
+ {"subject_identifiers":["[gdl:padding]"], "instance_of":["si:[tmcl:occurrence-type]"]},
+ {"subject_identifiers":["[gdl:padding-bottom]"], "instance_of":["si:[tmcl:occurrence-type]"]},
+ {"subject_identifiers":["[gdl:readonly]"], "instance_of":["si:[tmcl:occurrence-type]"]},
+ {"subject_identifiers":["[gdl:margin]"], "instance_of":["si:[tmcl:occurrence-type]"]},
+ {"subject_identifiers":["[gdl:text-decoration]"], "instance_of":["si:[tmcl:occurrence-type]"]},
{"subject_identifiers":["[gdl:nth-element]"], "instance_of":["si:[tmcl:role-type]"]},
{"subject_identifiers":["[gdl:background-color]"], "instance_of":["si:[tmcl:occurrence-type]"]},
{"subject_identifiers":["[gdl:width]"], "instance_of":["si:[tmcl:occurrence-type]"]},
{"subject_identifiers":["[gdl:height]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[doc:default-creator-topic-view-1]"], "instance_of":["si:[gdl:Default-Creator-Topic-View]"], "names":[{"value": "Def. Creator View 1", "type":"si:[gdl:view-name]"}], "occurrences":[{"type":"si:[gdl:id]", "value":"default_creator_topic_view_1_id", "datatype":"[xsd:ID]"}, {"type":"si:[gdl:background-color]", "value":"blue"}, {"type":"si:[gdl:width]", "value":"500px"}, {"type":"si:[gdl:height]", "value":"600px"}]},
+ {"subject_identifiers":["[doc:default-creator-topic-view-1]"], "instance_of":["si:[gdl:Default-Creator-Topic-View]"], "names":[{"value": "Def. Creator View 1", "type":"si:[gdl:view-name]"}], "occurrences":[{"type":"si:[gdl:id]", "value":"default_creator_topic_view_1_id", "datatype":"[xsd:ID]"}, {"type":"si:[gdl:background-color]", "value":"#ccc"}, {"type":"si:[gdl:width]", "value":"500px"}, {"type":"si:[gdl:height]", "value":"600px"}]},
{"subject_identifiers":["[gdl:View]"]},
{"subject_identifiers":["[gdl:Text]"]},
{"subject_identifiers":["[gdl:Title]"]},
{"subject_identifiers":["[gdl:Reference]"]},
{"subject_identifiers":["[gdl:List]"]},
- {"subject_identifiers":["[doc:list-item-1]"], "instance_of":["si:[gdl:Text]"], "occurrences":[{"type":"si:[gdl:id]", "value":"list_item_1_id", "datatype":"[xsd:ID]"}]},
- {"subject_identifiers":["[doc:list-item-3]"], "instance_of":["si:[gdl:Text]"], "occurrences":[{"type":"si:[gdl:id]", "value":"list_item_3_id", "datatype":"[xsd:ID]"}]},
- {"subject_identifiers":["[doc:list-item-2]"], "instance_of":["si:[gdl:Text]"], "occurrences":[{"type":"si:[gdl:id]", "value":"list_item_2_id", "datatype":"[xsd:ID]"}]},
+ {"subject_identifiers":["[doc:list-item-1]"], "instance_of":["si:[gdl:Text]"], "occurrences":[{"type":"si:[gdl:id]", "value":"list_item_1_id", "datatype":"[xsd:ID]"}, {"type":"si:[gdl:padding-bottom]", "value":"5px"}, {"type":"si:[gdl:margin-bottom]", "value":"5px"}]},
+ {"subject_identifiers":["[doc:list-item-3]"], "instance_of":["si:[gdl:Text]"], "occurrences":[{"type":"si:[gdl:id]", "value":"list_item_3_id", "datatype":"[xsd:ID]"}, {"type":"si:[gdl:padding-bottom]", "value":"5px"}]},
+ {"subject_identifiers":["[doc:list-item-2]"], "instance_of":["si:[gdl:Text]"], "occurrences":[{"type":"si:[gdl:id]", "value":"list_item_2_id", "datatype":"[xsd:ID]"}, {"type":"si:[gdl:padding]", "value":"5px"}, {"type":"si:[gdl:margin-top]", "value":"5px"}]},
{"subject_identifiers":["[gdl:List-Box]"]},
- {"subject_identifiers":["[doc:text-1]"], "instance_of":["si:[gdl:Text]"], "occurrences":[{"type":"si:[gdl:id]", "value":"text_1_id", "datatype":"[xsd:ID]"}]},
- {"subject_identifiers":["[doc:title-1]"], "instance_of":["si:[gdl:Title]"], "occurrences":[{"type":"si:[gdl:id]", "value":"title_1_id", "datatype":"[xsd:ID]"}]},
- {"subject_identifiers":["[doc:reference-1]"], "instance_of":["si:[gdl:Reference]"], "occurrences":[{"type":"si:[gdl:id]", "value":"reference_1_id", "datatype":"[xsd:ID]"}]},
+ {"subject_identifiers":["[doc:text-1]"], "instance_of":["si:[gdl:Text]"], "occurrences":[{"type":"si:[gdl:id]", "value":"text_1_id", "datatype":"[xsd:ID]"}, {"type":"si:[gdl:readonly]", "value":"false", "datatype":"[xsd:boolean]"}]},
+ {"subject_identifiers":["[doc:title-1]"], "instance_of":["si:[gdl:Title]"], "occurrences":[{"type":"si:[gdl:id]", "value":"title_1_id", "datatype":"[xsd:ID]"}, {"type":"si:[gdl:text-decoration]", "value":"underline"}, {"type":"si:[gdl:background-color]", "value":"#ccc"}]},
+ {"subject_identifiers":["[doc:reference-1]"], "instance_of":["si:[gdl:Reference]"], "occurrences":[{"type":"si:[gdl:id]", "value":"reference_1_id", "datatype":"[xsd:ID]"}, {"type":"si:[gdl:margin-left]", "value":"200px"}, {"type":"si:[gdl:background-color]", "value":"#ccc"}]},
{"subject_identifiers":["[doc:list-box-1]"], "instance_of":["si:[gdl:List-Box]"], "occurrences":[{"type":"si:[gdl:id]", "value":"list_box_1_id", "datatype":"[xsd:ID]"}]},
{"subject_identifiers":["[gdl:Value]"], "instance_of":["si:[tmcl:topic-type]"]},
{"subject_identifiers":["[doc:pos-of-title-1]"], "instance_of":["si:[gdl:Position]"]},
@@ -64,7 +72,7 @@
{"subject_identifiers":["[doc:nth-elem-3]"], "instance_of":["si:[gdl:Nth-Element]"], "occurrences":[{"type":"si:[gdl:nth-value]", "value":"8"}]},
{"subject_identifiers":["[gdl:TM-Instance-Value]"]},
{"subject_identifiers":["[gdl:TM-Multiple-Type-Value]"]},
- {"subject_identifiers":["[doc:person-list]"], "instance_of":["si:[gdl:List]"], "occurrences":[{"type":"si:[gdl:id]", "value":"person_list_1_id", "datatype":"[xsd:ID]"}]},
+ {"subject_identifiers":["[doc:person-list]"], "instance_of":["si:[gdl:List]"], "occurrences":[{"type":"si:[gdl:id]", "value":"person_list_1_id", "datatype":"[xsd:ID]"}, {"type":"si:[gdl:margin]", "value":"50px"}, {"type":"si:[gdl:background-color]", "value":"#ccc"}]},
{"subject_identifiers":["[gdl:tm-binding]"], "instance_of":["si:[tmcl:association-type]"]},
{"subject_identifiers":["[gdl:id]"], "instance_of":["si:[tmcl:occurrence-type]"]},
{"subject_identifiers":["[gdl:topic-view-binding]"], "instance_of":["si:[tmcl:association-type]"]},