[isidorus-cvs] r572 - in branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets: base text views

lgiessmann at common-lisp.net lgiessmann at common-lisp.net
Wed Jul 6 20:36:02 UTC 2011


Author: lgiessmann
Date: Wed Jul  6 13:36:01 2011
New Revision: 572

Log:
gdl-frontend: Widgets: remove gdl:overlow from teh spec and impl

Modified:
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPsis.java
   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/TestClass.java
   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/views/GdlCreatorAssociationView.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlDefaultCreatorTopicView.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlEditorAssociationView.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlSpecialCreatorTopicView.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlSpecialEditorTopicView.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlView.java

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPsis.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPsis.java	Wed Jul  6 12:33:40 2011	(r571)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPsis.java	Wed Jul  6 13:36:01 2011	(r572)
@@ -128,7 +128,6 @@
 		public final static String gdlClear = gdl + "clear";
 		public final static String gdlFloat = gdl + "float";
 		public final static String gdlBackgroundColor = gdl + "background-color";
-		public final static String gdlOverflow = gdl + "overflow";
 		public final static String gdlOrdered = gdl + "ordered";
 		public final static String gdlListstyleType = gdl + "list-style-type";
 		public final static String gdlListStylePosition = gdl + "list-style-position";

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	Wed Jul  6 12:33:40 2011	(r571)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlVisibleObject.java	Wed Jul  6 13:36:01 2011	(r572)
@@ -1085,37 +1085,6 @@
 		}	
 	}
 
-
-	// returns an Overflow instance that represents the overflow property of this element.
-	// If a styleClass is set, only the corresponding value of the scoped occurrence is returned
-	// null, null otherwise. If the styleClass is null and no occurrence was found, the default value for this
-	// property is returned.
-	public Overflow getOverflow(String styleClass) throws InvalidGdlSchemaException {
-		Occurrence overflowOcc = null;
-		if(styleClass != null){
-			overflowOcc = getNoneOrOneScopedOccurrence(GdlPsis.OccurrenceType.gdlOverflow, styleClass);
-		} else {
-			overflowOcc = getNoneOrOneUnscopedOccurrence(GdlPsis.OccurrenceType.gdlOverflow);
-		}
-
-		if(overflowOcc == null && styleClass != null){
-			return null;
-		} else if(overflowOcc == null) {
-			return Overflow.SCROLL; 
-		} else {
-			String value = overflowOcc.getValue().toUpperCase();
-			if(value.equals("VISIBLE")){
-				return Overflow.VISIBLE;
-			}else if(value.equals("HIDDEN")){
-				return Overflow.HIDDEN;
-			}else if(value.equals("SCROLL")){
-				return Overflow.SCROLL;
-			}else {
-				throw new InvalidGdlSchemaException("overflow must be set to one of visible, hidden or scroll, but is " + overflowOcc.getValue());
-			}
-		}	
-	}
-
 	
 	// sets the id property of this element by using the GWT DOM class
 	public void setId(String id){
@@ -1316,16 +1285,7 @@
 	// sets the background-color style property of this element by using the GWT DOM class
 	public abstract void setBackgroundColor(Widget widget, ColorValue value, String styleClass)throws InvalidGdlSchemaException, ExecutionException;
 
-
-	// sets the width, height and overflow property of this element depending on the amount
-	// of sub-elements
-	protected abstract void adjustSize();
-	
 	
-	// sets the overflow style property of this element by using the GWT DOM class
-	public abstract void setOverflow(Widget widget, Overflow value, String styleClass)throws InvalidGdlSchemaException, ExecutionException;
-
-
 	// sets the passed css style porperty to the passed css value.
 	// If a styleClass is given, the style is applied to either active, hover or focus
 	protected void setCssProperty(String styleClass, String cssProperty, String cssValue)throws InvalidGdlSchemaException, ExecutionException{

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TestClass.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TestClass.java	Wed Jul  6 12:33:40 2011	(r571)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TestClass.java	Wed Jul  6 13:36:01 2011	(r572)
@@ -79,18 +79,14 @@
 			Topic gdlFocus = gdlPanel.getSchemaTm().createTopicBySubjectIdentifier(gdlPanel.getSchemaTm().createLocator(GdlPsis.Scope.gdlFocus));
 			Topic gdlReadonly = gdlPanel.getSchemaTm().createTopicBySubjectIdentifier(gdlPanel.getSchemaTm().createLocator(GdlPsis.OccurrenceType.gdlReadonly));
 			Topic gdlResize = gdlPanel.getSchemaTm().createTopicBySubjectIdentifier(gdlPanel.getSchemaTm().createLocator(GdlPsis.OccurrenceType.gdlResize));
-			Topic gdlOverflow = gdlPanel.getSchemaTm().createTopicBySubjectIdentifier(gdlPanel.getSchemaTm().createLocator(GdlPsis.OccurrenceType.gdlOverflow));
 			Topic gdlTextDecoration = gdlPanel.getSchemaTm().createTopicBySubjectIdentifier(gdlPanel.getSchemaTm().createLocator(GdlPsis.OccurrenceType.gdlTextDecoration));
 			
 			tmpRepresentative.createOccurrence(gdlId, "ID_1", null);
-			/*
 			tmpRepresentative.createOccurrence(gdlBackgroundColor, "red", null);
-			*/
 			tmpRepresentative.createOccurrence(gdlWidth, "300px", null);
 			tmpRepresentative.createOccurrence(gdlHeight, "300px", null);
 			tmpRepresentative.createOccurrence(gdlBorderRadius, "30px", null);
 			tmpRepresentative.createOccurrence(gdlBorderBottomRightRadius, "2%", null);
-			/*
 			tmpRepresentative.createOccurrence(gdlPadding, "5px", null);
 			tmpRepresentative.createOccurrence(gdlPaddingLeft, "5%", null);
 			tmpRepresentative.createOccurrence(gdlCursor, CursorValue.HELP.getCssValue(), null);
@@ -103,7 +99,6 @@
 			tmpRepresentative.createOccurrence(gdlBorderWidth, "5px", null);
 			tmpRepresentative.createOccurrence(gdlReadonly, "false", null);
 			tmpRepresentative.createOccurrence(gdlResize, "both", null);
-			tmpRepresentative.createOccurrence(gdlOverflow, "hidden", null);
 			tmpRepresentative.createOccurrence(gdlFontSize, "15pt", null);
 			tmpRepresentative.createOccurrence(gdlTextDecoration, "underline", null);
 			Occurrence bgcHover = tmpRepresentative.createOccurrence(gdlBackgroundColor, "green", null);
@@ -114,7 +109,6 @@
 			bgcFocus.addTheme(gdlFocus);
 			Occurrence fsHover = tmpRepresentative.createOccurrence(gdlFontSize, "25pt", null);
 			fsHover.addTheme(gdlHover);
-			*/
 			
 			
 			GdlText tmp = new GdlText(tmpRepresentative){};

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	Wed Jul  6 12:33:40 2011	(r571)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlText.java	Wed Jul  6 13:36:01 2011	(r572)
@@ -2,7 +2,6 @@
 
 import java.util.ArrayList;
 import com.google.gwt.dom.client.Style.FontStyle;
-import com.google.gwt.dom.client.Style.Overflow;
 import com.google.gwt.dom.client.Style.VerticalAlign;
 import com.google.gwt.event.dom.client.BlurHandler;
 import com.google.gwt.event.dom.client.ClickHandler;
@@ -87,13 +86,12 @@
 		elem.addBlurHandler(fsHandler);
 		this.textElements.add(elem);
 		super.mainPanel.add(elem);
-		this.adjustSize();
 		return elem;
 	}
 	
 	
 	// removes the passed element and all its handlers from the outer element
-	protected void removeTextArea(TextArea elem){
+	protected void removeTextArea(TextArea elem) throws InvalidGdlSchemaException, ExecutionException{
 		for (Pair<TextArea, ArrayList<EventHandler>> item : this.eventHandlers) {
 			if(item.getFirst().equals(elem)){
 				this.eventHandlers.remove(item);
@@ -102,7 +100,6 @@
 		}
 		this.textElements.remove(elem);
 		elem.removeFromParent();
-		this.adjustSize();
 	}
 	
 	
@@ -551,8 +548,6 @@
 		} else{
 			DOM.setStyleAttribute(widget.getElement(), "resize", value.getCssValue());
 		}
-		
-		// TODO: if resize == true => set width/height of the outer/container element after the resize operation
 	}
 	
 	
@@ -594,9 +589,6 @@
 
 		// rows is only treated if height is not set
 		if(heightOcc == null) ((TextArea)widget).setVisibleLines(value);
-		
-		// set the outer element (the panel to the correct size if it is not set
-		//TODO: super.setHeight(new AutoNumUnitValue(this.textElement.getOffsetHeight() + "px"), null);
 	}
 	
 	
@@ -607,9 +599,6 @@
 
 		// cols is only treated if width is not set
 		if(widthOcc == null) DOM.setElementAttribute(widget.getElement(), "cols", String.valueOf(value));
-		
-		// set the outer element (the panel to the correct size if it is not set
-		//TODO: super.setWidth(new AutoNumUnitValue(this.textElement.getOffsetWidth() + "px"), null);
 	}
 	
 	
@@ -921,11 +910,6 @@
 			super.setCssProperty(styleClass, "verticalAlign", value.getCssName());
 		}
 	}
-
-	
-	public void setOverflow(Widget widget, Overflow value, String styleClass)throws InvalidGdlSchemaException, ExecutionException {
-		if(value != null) this.setCssProperty((TextArea)widget, styleClass, "overflow", value.getCssName());
-	}
 	
 	
 	public void setGdlStyle(Widget widget) throws InvalidGdlSchemaException, ExecutionException {
@@ -938,9 +922,7 @@
 			this.setTextType(this.getTextType());
 			this.setRows(widget, this.getRows());
 			this.setCols(widget, this.getCols());
-			
-			this.setOverflow(widget, this.getOverflow(styleClass), styleClass);
-			
+						
 			this.setVerticalAlign(widget, this.getVerticalAlign(styleClass), styleClass);
 			
 			this.setMargin(widget, this.getMargin(styleClass), styleClass);
@@ -1008,32 +990,8 @@
 				this.setGdlStyle((Widget)item);
 			}
 		}
-		
-		this.adjustSize();
-	}
-	
-	
-	// resets the size of this element depending on the amount of inner sub-elements
-	@Override
-	protected void adjustSize(){
-		
-		
-		
-		// if width is not set => auto
-		// if width is set => offset width of the biggest sub-elements || width of sub-elements
-		// if min-width is not set => auto
-		// if min-width is set => offset width of the biggest sub-elements || min-width of sub-elements
-		// if max-width is not set => auto
-		// if max-width is set => offset width of the biggest sub-elements || max-width of sub-elements
-		
-		
-		
-		
-		
-		// TODO: set overflow of the element
 	}
 	
-	
 	// registers a passed mouse down handler to each text element of this item
 	@Override
 	public MultipleHandlerRegistration addMouseDownHandler(MouseDownHandler handler){

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlCreatorAssociationView.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlCreatorAssociationView.java	Wed Jul  6 12:33:40 2011	(r571)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlCreatorAssociationView.java	Wed Jul  6 13:36:01 2011	(r572)
@@ -385,10 +385,6 @@
 	}
 
 	
-	@Override
-	protected void adjustSize() {
-		// ignore this method, since all instances of gdl:View have a static size
-	}
 
 	@Override
 	public void onHoverStart(DomEvent event, HoverStyleHandler handler) {

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlDefaultCreatorTopicView.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlDefaultCreatorTopicView.java	Wed Jul  6 12:33:40 2011	(r571)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlDefaultCreatorTopicView.java	Wed Jul  6 13:36:01 2011	(r572)
@@ -421,11 +421,6 @@
 	}
 	
 	
-	@Override
-	protected void adjustSize() {
-		// ignore this method, since all instances of gdl:View have a static size
-	}
-
 
 	@Override
 	public void onHoverStart(DomEvent event, HoverStyleHandler handler) {

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlEditorAssociationView.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlEditorAssociationView.java	Wed Jul  6 12:33:40 2011	(r571)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlEditorAssociationView.java	Wed Jul  6 13:36:01 2011	(r572)
@@ -423,11 +423,6 @@
 	}
 	
 	
-	@Override
-	protected void adjustSize() {
-		// ignore this method, since all instances of gdl:View have a static size
-	}
-
 
 	@Override
 	public void onHoverStart(DomEvent event, HoverStyleHandler handler) {

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlSpecialCreatorTopicView.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlSpecialCreatorTopicView.java	Wed Jul  6 12:33:40 2011	(r571)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlSpecialCreatorTopicView.java	Wed Jul  6 13:36:01 2011	(r572)
@@ -425,12 +425,6 @@
 	
 	
 	@Override
-	protected void adjustSize() {
-		// ignore this method, since all instances of gdl:View have a static size
-	}
-
-
-	@Override
 	public void onHoverStart(DomEvent event, HoverStyleHandler handler) {
 		// TODO Auto-generated method stub
 		

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlSpecialEditorTopicView.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlSpecialEditorTopicView.java	Wed Jul  6 12:33:40 2011	(r571)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlSpecialEditorTopicView.java	Wed Jul  6 13:36:01 2011	(r572)
@@ -425,11 +425,6 @@
 		
 	}
 	
-	
-	@Override
-	protected void adjustSize() {
-		// ignore this method, since all instances of gdl:View have a static size
-	}
 
 
 	@Override

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlView.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlView.java	Wed Jul  6 12:33:40 2011	(r571)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlView.java	Wed Jul  6 13:36:01 2011	(r572)
@@ -74,11 +74,6 @@
 	}
 	
 	
-	@Override
-	public void setOverflow(Widget widget, Overflow value, String styleClass) throws InvalidGdlSchemaException, ExecutionException {
-		// TODO: implement
-	}
-	
 	
 	public void setContentOrientation(Widget widget, ContentOrientationValue value){
 		// do nothing - since all content elements are positioned vie the GDL positioning concept




More information about the Isidorus-cvs mailing list