Author: lgiessmann Date: Wed Jul 20 11:21:32 2011 New Revision: 653
Log: gdl-frontend: Widgets: fixed some bugs in the UnitWidget
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/container/GdlUnit.java branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlTextObject.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/container/GdlUnit.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/container/GdlUnit.java Wed Jul 20 10:01:42 2011 (r652) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/container/GdlUnit.java Wed Jul 20 11:21:32 2011 (r653) @@ -1,7 +1,6 @@ package us.isidor.gdl.anaToMia.Widgets.container;
import java.util.ArrayList; - import com.google.gwt.user.client.Element; import com.google.gwt.event.dom.client.BlurEvent; import com.google.gwt.event.dom.client.BlurHandler; @@ -26,6 +25,7 @@ import com.google.gwt.user.client.ui.AbsolutePanel; import com.google.gwt.user.client.ui.CaptionPanel; import com.google.gwt.user.client.ui.Composite; +import com.google.gwt.user.client.ui.SimplePanel; import com.google.gwt.user.client.ui.Widget; import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Occurrence; import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic; @@ -836,7 +836,7 @@ // sets the border-width style property of this element by using the GWT DOM class public void setUnitBorderWidth(Widget widget, AbsoluteNumValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setBorderWidth(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderWidth(value.getCssValue()); else this.addStyleToStore(styleClass, "borderWidth", value.getCssValue()); } } @@ -845,7 +845,7 @@ // sets the border-width style property of this element by using the GWT DOM class public void setUnitBorderTopWidth(Widget widget, AbsoluteNumValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setBorderWidth(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderWidth(value.getCssValue()); else this.addStyleToStore(styleClass, "borderTopWidth", value.getCssValue()); } } @@ -854,7 +854,7 @@ // sets the border-width style property of this element by using the GWT DOM class@Override public void setUnitBorderRightWidth(Widget widget, AbsoluteNumValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setBorderWidth(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderWidth(value.getCssValue()); else this.addStyleToStore(styleClass, "borderRightWidth", value.getCssValue()); } } @@ -863,7 +863,7 @@ // sets the border-width style property of this element by using the GWT DOM class public void setUnitBorderBottomWidth(Widget widget, AbsoluteNumValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setBorderWidth(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderWidth(value.getCssValue()); else this.addStyleToStore(styleClass, "borderBottomWidth", value.getCssValue()); } } @@ -872,7 +872,7 @@ // sets the border-width style property of this element by using the GWT DOM class public void setUnitBorderLeftWidth(Widget widget, AbsoluteNumValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setBorderWidth(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderWidth(value.getCssValue()); else this.addStyleToStore(styleClass, "borderLeftWidth", value.getCssValue()); } } @@ -881,7 +881,7 @@ // sets the border-color style property of this element by using the GWT DOM class public void setUnitBorderColor(Widget widget, ColorValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setBorderColor(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderColor(value.getCssValue()); else this.addStyleToStore(styleClass, "borderColor", value.getCssValue()); } } @@ -890,7 +890,7 @@ // sets the border-color style property of this element by using the GWT DOM class public void setUnitBorderTopColor(Widget widget, ColorValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setBorderColor(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderColor(value.getCssValue()); else this.addStyleToStore(styleClass, "borderTopColor", value.getCssValue()); } } @@ -899,7 +899,7 @@ // sets the border-color style property of this element by using the GWT DOM class@Override public void setUnitBorderRightColor(Widget widget, ColorValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setBorderColor(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderColor(value.getCssValue()); else this.addStyleToStore(styleClass, "borderRightColor", value.getCssValue()); } } @@ -908,7 +908,7 @@ // sets the border-color style property of this element by using the GWT DOM class public void setUnitBorderBottomColor(Widget widget, ColorValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setBorderColor(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderColor(value.getCssValue()); else this.addStyleToStore(styleClass, "borderBottomColor", value.getCssValue()); } } @@ -917,7 +917,7 @@ // sets the border-color style property of this element by using the GWT DOM class public void setUnitBorderLeftColor(Widget widget, ColorValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setBorderColor(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderColor(value.getCssValue()); else this.addStyleToStore(styleClass, "borderLeftColor", value.getCssValue()); } } @@ -926,7 +926,7 @@ // sets the border-style style property of this element by using the GWT DOM class public void setUnitBorderStyle(Widget widget, BorderStyleValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setBorderStyle(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderStyle(value.getCssValue()); else this.addStyleToStore(styleClass, "borderStyle", value.getCssValue()); } } @@ -935,7 +935,7 @@ // sets the border-style style property of this element by using the GWT DOM class public void setUnitBorderTopStyle(Widget widget, BorderStyleValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setBorderStyle(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderStyle(value.getCssValue()); else this.addStyleToStore(styleClass, "borderTopStyle", value.getCssValue()); } } @@ -944,7 +944,7 @@ // sets the border-style style property of this element by using the GWT DOM class@Override public void setUnitBorderRightStyle(Widget widget, BorderStyleValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setBorderStyle(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderStyle(value.getCssValue()); else this.addStyleToStore(styleClass, "borderRightStyle", value.getCssValue()); } } @@ -953,7 +953,7 @@ // sets the border-style style property of this element by using the GWT DOM class public void setUnitBorderBottomStyle(Widget widget, BorderStyleValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setBorderStyle(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderStyle(value.getCssValue()); else this.addStyleToStore(styleClass, "borderBottomStyle", value.getCssValue()); } } @@ -962,7 +962,7 @@ // sets the border-style style property of this element by using the GWT DOM class public void setUnitBorderLeftStyle(Widget widget, BorderStyleValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setBorderStyle(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderStyle(value.getCssValue()); else this.addStyleToStore(styleClass, "borderLeftStyle", value.getCssValue()); } } @@ -971,7 +971,7 @@ // sets the border-padding style property of this element by using the GWT DOM class public void setUnitBorderPadding(Widget widget, NumUnitValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setPadding(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderPadding(value.getCssValue()); else this.addStyleToStore(styleClass, "padding", value.getCssValue()); } } @@ -980,7 +980,7 @@ // sets the border-padding style property of this element by using the GWT DOM class public void setUnitBorderTopPadding(Widget widget, NumUnitValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setPaddingTop(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderTopPadding(value.getCssValue()); else this.addStyleToStore(styleClass, "paddingTop", value.getCssValue()); } } @@ -989,7 +989,7 @@ // sets the border-padding style property of this element by using the GWT DOM class@Override public void setUnitBorderRightPadding(Widget widget, NumUnitValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setPaddingRight(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderRightPadding(value.getCssValue()); else this.addStyleToStore(styleClass, "paddingRight", value.getCssValue()); } } @@ -998,7 +998,7 @@ // sets the border-padding style property of this element by using the GWT DOM class public void setUnitBorderBottomPadding(Widget widget, NumUnitValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setPaddingBottom(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderBottomPadding(value.getCssValue()); else this.addStyleToStore(styleClass, "paddingBottom", value.getCssValue()); } } @@ -1007,7 +1007,7 @@ // sets the border-padding style property of this element by using the GWT DOM class public void setUnitBorderLeftPadding(Widget widget, NumUnitValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setPaddingLeft(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderLeftPadding(value.getCssValue()); else this.addStyleToStore(styleClass, "paddingLeft", value.getCssValue()); } } @@ -1016,7 +1016,7 @@ // sets the border-margin style property of this element by using the GWT DOM class public void setUnitBorderMargin(Widget widget, NumUnitValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setMargin(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderMargin(value.getCssValue()); else this.addStyleToStore(styleClass, "margin", value.getCssValue()); } } @@ -1025,7 +1025,7 @@ // sets the border-margin style property of this element by using the GWT DOM class public void setUnitBorderTopMargin(Widget widget, NumUnitValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setMarginTop(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderTopMargin(value.getCssValue()); else this.addStyleToStore(styleClass, "marginTop", value.getCssValue()); } } @@ -1034,7 +1034,7 @@ // sets the border-margin style property of this element by using the GWT DOM class@Override public void setUnitBorderRightMargin(Widget widget, NumUnitValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setMarginRight(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderRightMargin(value.getCssValue()); else this.addStyleToStore(styleClass, "marginRight", value.getCssValue()); } } @@ -1043,7 +1043,7 @@ // sets the border-margin style property of this element by using the GWT DOM class public void setUnitBorderBottomMargin(Widget widget, NumUnitValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setMarginBottom(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderBottomMargin(value.getCssValue()); else this.addStyleToStore(styleClass, "marginBottom", value.getCssValue()); } } @@ -1052,7 +1052,7 @@ // sets the border-margin style property of this element by using the GWT DOM class public void setUnitBorderLeftMargin(Widget widget, NumUnitValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setMarginLeft(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderLeftMargin(value.getCssValue()); else this.addStyleToStore(styleClass, "marginLeft", value.getCssValue()); } } @@ -1061,7 +1061,7 @@ // sets the border-radius style property of this element by using the GWT DOM class public void setUnitBorderRadius(Widget widget, NumUnitValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setBorderRadius(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderRadius(value.getCssValue()); else this.addStyleToStore(styleClass, "borderRadius", value.getCssValue()); } } @@ -1070,7 +1070,7 @@ // sets the border-top-right-radius style property of this element by using the GWT DOM class public void setUnitBorderTopRightRadius(Widget widget, NumUnitValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setBorderTopRightRadius(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderTopRightRadius(value.getCssValue()); else this.addStyleToStore(styleClass, "borderTopRightRadius", value.getCssValue()); } } @@ -1079,7 +1079,7 @@ // sets the border-bottom-right-radius style property of this element by using the GWT DOM class public void setUnitBorderBottomRightRadius(Widget widget, NumUnitValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setBorderBottomRightRadius(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderBottomRightRadius(value.getCssValue()); else this.addStyleToStore(styleClass, "borderBottomRightRadius", value.getCssValue()); } } @@ -1088,7 +1088,7 @@ // sets the border-bottom-left-radius style property of this element by using the GWT DOM class public void setUnitBorderBottomLeftRadius(Widget widget, NumUnitValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setBorderBottomLeftRadius(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderBottomLeftRadius(value.getCssValue()); else this.addStyleToStore(styleClass, "borderBottomLeftRadius", value.getCssValue()); } } @@ -1097,7 +1097,7 @@ // sets the border-top-left-radius style property of this element by using the GWT DOM class public void setUnitBorderTopLeftRadius(Widget widget, NumUnitValue value, String styleClass) throws InvalidGdlSchemaException, ExecutionException { if(value != null){ - if(styleClass == null)((UnitWidget)widget).setBorderTopLeftRadius(value.getCssValue()); + if(styleClass == null)((UnitWidget)widget).setUnitBorderTopLeftRadius(value.getCssValue()); else this.addStyleToStore(styleClass, "borderTopLeftRadius", value.getCssValue()); } } @@ -1290,13 +1290,15 @@ protected class UnitWidget extends Composite implements HasFocusHandlers, HasBlurHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseDownHandlers, HasMouseUpHandlers{ - private CaptionPanel basePanel = new CaptionPanel(); + private SimplePanel basePanel = new SimplePanel(); + private CaptionPanel innerPanel = new CaptionPanel(); private Topic tmRepresentative = null; private ArrayList<Widget> subElements = new ArrayList<Widget>(); private UnitWidget(){ initWidget(this.basePanel); + this.basePanel.add(this.innerPanel); } @@ -1328,15 +1330,15 @@ this.subElements.add(newObj); if(this.getTmRepresentative().equals(ancestor)){ - this.basePanel.add(newObj); + this.innerPanel.add(newObj); } else{ Element elemBefore = oldObj.getElement(); Element elemAfter = DOM.getNextSibling(elemBefore); // insert before seems to be a more accepted and stable // way of inserting new child elements than insertAfter - if(elemAfter == null) this.basePanel.add(newObj); - else this.basePanel.getElement().insertBefore(newObj.getElement(), elemAfter); + if(elemAfter == null) this.innerPanel.add(newObj); + else this.innerPanel.getElement().insertBefore(newObj.getElement(), elemAfter); } position.setAttributes(newObj); return newObj; @@ -1379,163 +1381,163 @@ } - public void setBorderWidth(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "borderWidth", value); + public void setUnitBorderWidth(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "borderWidth", value); } - public void setBorderTopWidth(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "borderTopWidth", value); + public void setUnitBorderTopWidth(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "borderTopWidth", value); } - public void setBorderRightWidth(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "borderRightWidth", value); + public void setUnitBorderRightWidth(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "borderRightWidth", value); } - public void setBorderBottomWidth(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "borderBottomWidth", value); + public void setUnitBorderBottomWidth(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "borderBottomWidth", value); } - public void setBorderLeftWidth(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "borderLeftWidth", value); + public void setUnitBorderLeftWidth(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "borderLeftWidth", value); }
- public void setBorderColor(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "borderColor", value); + public void setUnitBorderColor(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "borderColor", value); } - public void setBorderTopColor(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "borderTopColor", value); + public void setUnitBorderTopColor(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "borderTopColor", value); } - public void setBorderRightColor(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "borderRightColor", value); + public void setUnitBorderRightColor(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "borderRightColor", value); }
public void setTextDecoration(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "textDecoration", value); + DOM.setStyleAttribute(this.innerPanel.getElement(), "textDecoration", value); } - public void setBorderBottomColor(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "borderBottomColor", value); + public void setUnitBorderBottomColor(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "borderBottomColor", value); } - public void setBorderLeftColor(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "borderLeftColor", value); + public void setUnitBorderLeftColor(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "borderLeftColor", value); } - public void setBorderStyle(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "borderStyle", value); + public void setUnitBorderStyle(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "borderStyle", value); } - public void setBorderTopStyle(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "borderTopStyle", value); + public void setUnitBorderTopStyle(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "borderTopStyle", value); } - public void setBorderRightStyle(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "borderRightStyle", value); + public void setUnitBorderRightStyle(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "borderRightStyle", value); } - public void setBorderBottomStyle(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "borderBottomStyle", value); + public void setUnitBorderBottomStyle(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "borderBottomStyle", value); } - public void setBorderLeftStyle(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "borderLeftStyle", value); + public void setUnitBorderLeftStyle(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "borderLeftStyle", value); } - public void setPadding(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "padding", value); + public void setUnitBorderPadding(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "padding", value); } - public void setPaddingTop(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "paddingTop", value); + public void setUnitBorderTopPadding(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "paddingTop", value); } - public void setPaddingRight(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "paddingRight", value); + public void setUnitBorderRightPadding(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "paddingRight", value); } - public void setPaddingBottom(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "paddingBottom", value); + public void setUnitBorderBottomPadding(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "paddingBottom", value); } - public void setPaddingLeft(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "paddingLeft", value); + public void setUnitBorderLeftPadding(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "paddingLeft", value); }
- public void setMargin(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "margin", value); + public void setUnitBorderMargin(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "margin", value); } - public void setMarginTop(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "marginTop", value); + public void setUnitBorderTopMargin(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "marginTop", value); } - public void setMarginRight(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "marginRight", value); + public void setUnitBorderRightMargin(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "marginRight", value); } - public void setMarginBottom(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "marginBottom", value); + public void setUnitBorderBottomMargin(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "marginBottom", value); } - public void setMarginLeft(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "marginLeft", value); + public void setUnitBorderLeftMargin(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "marginLeft", value); } - public void setBorderRadius(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "borderRadius", value); + public void setUnitBorderRadius(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "borderRadius", value); } - public void setBorderTopRightRadius(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "borderTopRightRadius", value); + public void setUnitBorderTopRightRadius(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "borderTopRightRadius", value); } - public void setBorderBottomRightRadius(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "borderBottomRightRadius", value); + public void setUnitBorderBottomRightRadius(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "borderBottomRightRadius", value); } - public void setBorderBottomLeftRadius(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "borderBottomLeftRadius", value); + public void setUnitBorderBottomLeftRadius(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "borderBottomLeftRadius", value); } - public void setBorderTopLeftRadius(String value){ - DOM.setStyleAttribute(this.basePanel.getElement(), "borderTopLeftRadius", value); + public void setUnitBorderTopLeftRadius(String value){ + DOM.setStyleAttribute(this.innerPanel.getElement(), "borderTopLeftRadius", value); } public String getCaption() { - return this.basePanel.getCaptionText(); + return this.innerPanel.getCaptionText(); } @@ -1543,10 +1545,10 @@ // the legend element is set to non-visible public void setCaption(String caption) { if(caption == null || caption.length() == 0){ - this.basePanel.setCaptionText(caption); + this.innerPanel.setCaptionText(caption); //DOM.setStyleAttribute(this.legend, "display", "none"); } else { - this.basePanel.setCaptionText(caption); + this.innerPanel.setCaptionText(caption); //DOM.setStyleAttribute(this.legend, "display", "inline"); } } @@ -1605,6 +1607,7 @@ return this.addDomHandler(handler, FocusEvent.getType()); } } + /* // wraps a fieldset with a legend item that represent a group-element
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlTextObject.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlTextObject.java Wed Jul 20 10:01:42 2011 (r652) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlTextObject.java Wed Jul 20 11:21:32 2011 (r653) @@ -118,7 +118,7 @@ return TextDecorationValue.NONE; } else { try{ - return TextDecorationValue.valueOf(decorationOcc.getValue().toUpperCase()); + return TextDecorationValue.valueOf(decorationOcc.getValue().toUpperCase().replace("-", "_")); }catch(IllegalArgumentException e){ throw new InvalidGdlSchemaException("The occurrence " + GdlPsis.OccurrenceType.gdlTextDecoration + " must be set to one of "underline", "overline", "line-through", "blink" or "none", but is "" + decorationOcc.getValue() + """); }
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 Wed Jul 20 10:01:42 2011 (r652) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/gdl_widgets/test.gdl.jtm Wed Jul 20 11:21:32 2011 (r653) @@ -22,12 +22,14 @@ {"subject_identifiers":["[gdl:schema-name]"], "instance_of":["si:[tmcl:name-type]"]}, {"subject_identifiers":["[gdl:view-name]"], "instance_of":["si:[tmcl:name-type]"]}, {"subject_identifiers":["[gdl:Descriptor]"], "instance_of":["si:[tmcl:topic-type]"]}, + {"subject_identifiers":["[gdl:border-width]"], "instance_of":["si:[tmcl:occurrence-type]"]}, {"subject_identifiers":["[doc:test-schema]"], "instance_of":["si:[gdl:Schema]"], "names":[{"value": "Test GDL Schema", "type":"si:[gdl:schema-name]"}]}, {"subject_identifiers":["[gdl:Visible-Object]"]}, {"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:border-style]"], "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]"]}, @@ -52,7 +54,7 @@ {"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]"}, {"type":"si:[gdl:readonly]", "value":"false", "datatype":"[xsd:boolean]"}]}, - {"subject_identifiers":["[doc:unit-1]"], "instance_of":["si:[gdl:Unit]"], "occurrences":[{"type":"si:[gdl:id]", "value":"unit_1_id", "datatype":"[xsd:ID]"}, {"type":"si:[gdl:unit-name]", "value":"unit 1"}]}, + {"subject_identifiers":["[doc:unit-1]"], "instance_of":["si:[gdl:Unit]"], "occurrences":[{"type":"si:[gdl:id]", "value":"unit_1_id", "datatype":"[xsd:ID]"}, {"type":"si:[gdl:unit-name]", "value":"unit 1"}, {"type":"si:[gdl:width]", "value":"100px"}, {"type":"si:[gdl:height]", "value":"50px"}, {"type":"si:[gdl:border-style]", "value":"dashed"}, {"type":"si:[gdl:border-width]", "value":"1px"}, {"type":"si:[gdl:text-decoration]", "value":"line-through"}]}, {"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"}, {"type":"si:[gdl:font-weight]", "value":"bold"}]}, {"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":"yellow"}]}, {"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]"}]},