[isidorus-cvs] r797 - in branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets: . base button complexData container text view

lgiessmann at common-lisp.net lgiessmann at common-lisp.net
Mon Aug 29 08:28:53 UTC 2011


Author: lgiessmann
Date: Mon Aug 29 01:28:52 2011
New Revision: 797

Log:
gdl-frontend: Widgets: implemented the handling of default/fixed-default values

Modified:
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/TODO.txt
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlSpace.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/base/TmHelper.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlActionButton.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlCheckBox.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlRadioButton.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlAudio.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlDatePicker.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlDateTimePicker.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlImage.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlTimePicker.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlVideo.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/container/GdlList.java
   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/GdlInfo.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/src/us/isidor/gdl/anaToMia/Widgets/text/GdlTitle.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlView.java

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/TODO.txt
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/TODO.txt	Mon Aug 29 01:03:07 2011	(r796)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/TODO.txt	Mon Aug 29 01:28:52 2011	(r797)
@@ -1,12 +1,4 @@
 * finalise the GDL-Schema for creating and editing instances of tgm:Hash-Object => Hidden-Value (type-occurrence) + otherrole
-* Implement all IHasValueGroup to:
-    * GdlText
-    * GdlInfo
-    * GdlTitle
-    * GdlReference
-    * GdlButton
-    * GdlComplexData
-    * GdlListBox
 * implement the handling of default-values
 * Implement TopicMaps data consumption
 * Implement TopicMaps data generation

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlSpace.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlSpace.java	Mon Aug 29 01:03:07 2011	(r796)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlSpace.java	Mon Aug 29 01:28:52 2011	(r797)
@@ -30,7 +30,15 @@
 	
 	
 	@Override
+	@Deprecated
 	public ArrayList<Pair<Construct, TopicMapsTypes>> getContent(){
 		return null;
 	}
+	
+	
+	@Override
+	@Deprecated
+	public void fixValue(){
+		// has no effect on this element
+	}
 }

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	Mon Aug 29 01:03:07 2011	(r796)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlVisibleObject.java	Mon Aug 29 01:28:52 2011	(r797)
@@ -103,6 +103,10 @@
 	protected boolean displayByConstraintSet = false;
 	protected ArrayList<String> literals = new ArrayList<String>();
 	protected boolean literalsSet = false;
+	protected int cardMin = 0;
+	protected boolean cardMinSet = false;
+	protected int cardMax = 0;
+	protected boolean cardMaxSet = false;
 	
 
 	// some constructors
@@ -1877,6 +1881,11 @@
 	}
 	
 	
+	// if this method is called the user cannot change the represented value
+	// of this control
+	public abstract void fixValue();
+	
+	
 	// sets the fields for the received data
 	protected void setReceivedData() throws InvalidGdlSchemaException, ExecutionException {
 		if(receivedData == null) return;
@@ -1943,22 +1952,51 @@
 	protected void setDefaultValue() throws InvalidGdlSchemaException, ExecutionException {
 		if(this.getDefaultLiteralValue() != null && this.getDefaultTmValue() != null) throw new InvalidGdlSchemaException("the topic " + TmHelper.getAnyIdOfTopic(this.getValueGroup()) + " must be bound to maximal one " + PSIs.GDL.TopicType.gdlDefaultValue + ", but is: 2");
 		
-		// TODO: check if the valus is fixed => fix the element, so that the
-		//       user cannot change the value => implement an abstract method therefore
 		if(this.getDefaultLiteralValue() != null){
 			TopicMap tm = this.getDefaultLiteralValue().getTopicMap();
 			Topic occType = TmHelper.getTopicByPsi(PSIs.GDL.OccurrenceType.gdlLiteralValue, tm);
 			JsArray<Occurrence> vals = this.getDefaultLiteralValue().getOccurrences(occType);
+			
 			if(vals.length() != 1) throw new InvalidGdlSchemaException("the topic " + TmHelper.getAnyIdOfTopic(this.getDefaultLiteralValue()) + " must be bound exactly once to a " + PSIs.GDL.OccurrenceType.gdlLiteralValue + " occurrence, but is: " + vals.length());
 			
-			this.addSubItem(vals.get(0).getValue());
+			int minValues = this.getCardMin() == 0 ? 1 : this.getCardMin();
+			for(int i = 0; i < minValues; ++i)
+				this.addSubItem(vals.get(0).getValue());
+			if(this.fixedDefaultValue()) this.fixValue();
 		} else if(this.getDefaultTmValue() != null){
-			// TODO: set default-tm-value
+			ArrayList<Topic> values = TmHelper.getValuesForTmValue(this.getDefaultTmValue());
+			
+			if(values.size() != 1) throw new InvalidGdlSchemaException("the default value " + TmHelper.getAnyIdOfTopic(this.getDefaultValue()) + " represetns more than one value");
+
+			int minValues = this.getCardMin() == 0 ? 1 : this.getCardMin();
+			for(int i = 0; i < minValues; ++i)
+				this.addSubItem(this.getTopicRepresentation(this.getDefaultTmValue(), this.getDisplayByOfTmValue(this.getDefaultTmValue()), this.getPreferredScopeOfTmValue(this.getDefaultTmValue())));
+			if(this.fixedDefaultValue()) this.fixValue();
 		} else {
 			this.addSubItem("");
 		}
 	}
 	
+	
+	public int getCardMin() throws InvalidGdlSchemaException {
+		if(this.cardMinSet){
+			return this.cardMin;
+		} else {
+			this.cardMaxSet = true;
+			return TmHelper.getCardMin(this.getRootConstraint());
+		}
+	}
+	
+	
+	public int getCardMax() throws InvalidGdlSchemaException {
+		if(this.cardMaxSet){
+			return this.cardMax;
+		} else {
+			this.cardMaxSet = true;
+			return TmHelper.getCardMax(this.getRootConstraint());
+		}
+	}
+	
 	
 	// returns the topic instance of gdlt:Value-Group that is bound to this
 	// visible element, or null if it is unbound

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	Mon Aug 29 01:03:07 2011	(r796)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TestClass.java	Mon Aug 29 01:28:52 2011	(r797)
@@ -2,6 +2,8 @@
 
 
 
+import java.util.ArrayList;
+
 import us.isidor.gdl.anaToMia.TmEngine.jtmsBasedEngine.JtmsTmEngine;
 import us.isidor.gdl.anaToMia.Widgets.environment.Pair;
 import us.isidor.gdl.anaToMia.Widgets.environment.TopicIdentifierTypes;
@@ -27,22 +29,21 @@
 			mainPanel.setBorderWidth(1);
 			mainPanel.setPixelSize(1000, 600);
 			
-			//ArrayList<Pair<String, TopicIdentifierTypes>> requestedTopicsToCreate = new ArrayList<Pair<String,TopicIdentifierTypes>>();
-			//requestedTopicsToCreate.add(new Pair<String, TopicIdentifierTypes>("http://textgrid.org/serviceregistry/model/types/Hash-Object", TopicIdentifierTypes.SubjectIdentifier));
+			ArrayList<Pair<String, TopicIdentifierTypes>> requestedTopicsToCreate = new ArrayList<Pair<String,TopicIdentifierTypes>>();
+			requestedTopicsToCreate.add(new Pair<String, TopicIdentifierTypes>("http://textgrid.org/serviceregistry/model/types/Hash-Object", TopicIdentifierTypes.SubjectIdentifier));
 			//requestedTopicsToCreate.add(new Pair<String, TopicIdentifierTypes>("http://textgrid.org/serviceregistry/model/types/Environment", TopicIdentifierTypes.SubjectIdentifier));
 			//requestedTopicsToCreate.add(new Pair<String, TopicIdentifierTypes>("http://psi.test.org/gdl-test/Poet", TopicIdentifierTypes.SubjectIdentifier));
 			//requestedTopicsToCreate.add(new Pair<String, TopicIdentifierTypes>("http://psi.test.org/gdl-test/Musician", TopicIdentifierTypes.SubjectIdentifier));
 			
 			//Pair<String, TopicIdentifierTypes> requestedTopicToEdit = new Pair<String, TopicIdentifierTypes>("http://textgrid.org/serviceregistry/model/types/test-env", TopicIdentifierTypes.SubjectIdentifier);
-			//Pair<String, TopicIdentifierTypes> requestedTopicToEdit = new Pair<String, TopicIdentifierTypes>("http://textgrid.org/serviceregistry/model/types/test-hash", TopicIdentifierTypes.SubjectIdentifier);
-			Pair<String, TopicIdentifierTypes> requestedTopicToEdit = new Pair<String, TopicIdentifierTypes>("http://textgrid.org/serviceregistry/test-hash-2", TopicIdentifierTypes.SubjectIdentifier);
+			//Pair<String, TopicIdentifierTypes> requestedTopicToEdit = new Pair<String, TopicIdentifierTypes>("http://textgrid.org/serviceregistry/test-hash-2", TopicIdentifierTypes.SubjectIdentifier);
 			GdlPanel.addClickHandler("unit_1_text_create_button_id", new ClickHandler() {
 				@Override
 				public void onClick(ClickEvent event) {
 					Window.alert("you clicked " + ((Button)event.getSource()).getText());
 				}
 			});
-			gdlPanel = new GdlPanel(requestedTopicToEdit, null);
+			gdlPanel = new GdlPanel(null, requestedTopicsToCreate);
 			mainPanel.add(gdlPanel);
 			gdlPanel.setTmEngine(new JtmsTmEngine());
 			gdlPanel.setLoadSchemaCallback(new LoadSchemaCallback());

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TmHelper.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TmHelper.java	Mon Aug 29 01:03:07 2011	(r796)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TmHelper.java	Mon Aug 29 01:28:52 2011	(r797)
@@ -768,7 +768,7 @@
 	// E.g. a value group may be bound to a gdl:Type constraint and this constraint may be bound
 	// to a tmcl:constraint, the root constraint is the instance of the tmcl:constraint
 	public static Topic getRootConstraintOfValueGroup(Topic valueGroup, Topic currentConstraint) throws InvalidGdlSchemaException {
-		if(valueGroup == null) return null;
+		if(valueGroup == null || currentConstraint == null) return null;
 		
 		Topic localCurrentConstraint = currentConstraint == null ? getConstraintOfValueGroup(valueGroup) : currentConstraint;
 		TopicMap tm = valueGroup.getTopicMap();
@@ -790,7 +790,7 @@
 			
 			if(nextTmclConstraints.size() == 1) return nextTmclConstraints.get(0);
 			else if(nextGdlConstraints.size() == 1) return getRootConstraintOfValueGroup(valueGroup, nextGdlConstraints.get(0));
-			else throw new InvalidGdlSchemaException("the value group " + getAnyIdOfTopic(valueGroup) + " must be bound to exaclty on root constraint of the type " + PSIs.TMCL.tmclConstraint + " but is unbound");
+			else throw new InvalidGdlSchemaException("the value group " + getAnyIdOfTopic(valueGroup) + " must be bound to exaclty one root constraint of the type " + PSIs.TMCL.tmclConstraint + " but is unbound");
 		}
 	}
 
@@ -821,10 +821,9 @@
 		Topic valueBindingAssocTopic = getTopicByPsi(PSIs.GDL.AssociationType.gdlValueBinding, tm);
 		Topic valueGroupRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlValueGroup, tm);
 		Topic valueRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlValue, tm);
-		Topic defaultLiteralValueType = getTopicByPsi(PSIs.GDL.TopicType.gdlDefaultLiteralValue, tm);
-		
+		Topic defaultLiteralValueType = getTopicByPsi(PSIs.GDL.TopicType.gdlDefaultLiteralValue, tm);		
 		ArrayList<Topic> defaultTmValues = getOtherPlayerOfBinaryAssociation(valueGroup, valueGroupRoleType, valueBindingAssocTopic, null, defaultLiteralValueType, valueRoleType);
-		
+
 		if(defaultTmValues.size() == 1) return defaultTmValues.get(0);
 		else if(defaultTmValues.size() == 0) return null;
 		else throw new InvalidGdlSchemaException("the topic " + getAnyIdOfTopic(valueGroup) + " must be bound none or once to a " + PSIs.GDL.TopicType.gdlDefaultLiteralValue + ", but is: " + defaultTmValues.size());
@@ -1193,6 +1192,39 @@
 		}
 	}
 
+	
+	// returns an integer representing the tmcl:card-min value
+	public static int getCardMin(Topic constraint) throws InvalidGdlSchemaException {
+		if(constraint == null) return 0;
+		Occurrence occ = getSingleOccurrence(constraint, getTopicByPsi(PSIs.TMCL.tmclCardMin, constraint.getTopicMap()));
+		if(occ == null){
+			return 0;
+		} else {
+			try{
+				return Integer.parseInt(occ.getValue());
+			}catch(NumberFormatException e){
+				throw new InvalidGdlSchemaException("the occurrence " + PSIs.TMCL.tmclCardMin + " of the constraint " + getAnyIdOfTopic(constraint) + " must be an integer, but is: " + occ.getValue());
+			}
+		}
+	}
+	
+	
+	// returns an integer representing the tmcl:card-max value or -1
+	// if infinite
+	public static int getCardMax(Topic constraint) throws InvalidGdlSchemaException {
+		if(constraint == null) return 0;
+		Occurrence occ = getSingleOccurrence(constraint, getTopicByPsi(PSIs.TMCL.tmclCardMax, constraint.getTopicMap()));
+		if(occ == null){
+			return 0;
+		} else {
+			try{
+				return Integer.parseInt(occ.getValue());
+			}catch(NumberFormatException e){
+				throw new InvalidGdlSchemaException("the occurrence " + PSIs.TMCL.tmclCardMax + " of the constraint " + getAnyIdOfTopic(constraint) + " must be an integer, but is: " + occ.getValue());
+			}
+		}
+	}
+	
 
 	// returns the actual list of values for a TM-Value instance, i.e.
 	// *(Default-)TM-Type-Value: returns all topic instances that are

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlActionButton.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlActionButton.java	Mon Aug 29 01:03:07 2011	(r796)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlActionButton.java	Mon Aug 29 01:28:52 2011	(r797)
@@ -31,8 +31,8 @@
 	
 	public GdlActionButton(Topic tmRepresentative, Construct receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
 		super(tmRepresentative, receivedData, gdlParent);
-		
-		this.createNewButton().setText("Action-Button"); // TODO: remove set text
+
+		this.setDefaultValue();
 		this.setClickHandlers();
 	}
 	
@@ -260,7 +260,15 @@
 	
 	
 	@Override
+	@Deprecated
 	public ArrayList<Pair<Construct, TopicMapsTypes>> getContent(){
 		return null;
 	}
+	
+	
+	@Override
+	@Deprecated
+	public void fixValue(){
+		// has no effect on this element
+	}
 }

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlCheckBox.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlCheckBox.java	Mon Aug 29 01:03:07 2011	(r796)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlCheckBox.java	Mon Aug 29 01:28:52 2011	(r797)
@@ -49,4 +49,10 @@
 		// TODO: implement
 		return null;
 	}
+	
+	
+	@Override
+	public void fixValue(){
+		// TODO: implement
+	}
 }

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlRadioButton.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlRadioButton.java	Mon Aug 29 01:03:07 2011	(r796)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlRadioButton.java	Mon Aug 29 01:28:52 2011	(r797)
@@ -48,4 +48,10 @@
 		// TODO: implement
 		return null;
 	}
+	
+	
+	@Override
+	public void fixValue(){
+		// TODO: implement
+	}
 }

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlAudio.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlAudio.java	Mon Aug 29 01:03:07 2011	(r796)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlAudio.java	Mon Aug 29 01:28:52 2011	(r797)
@@ -23,4 +23,10 @@
 	public void addSubItem(String value) throws InvalidGdlSchemaException, ExecutionException {
 		// TODO: implement
 	}
+	
+	
+	@Override
+	public void fixValue(){
+		// TODO: implement
+	}
 }

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlDatePicker.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlDatePicker.java	Mon Aug 29 01:03:07 2011	(r796)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlDatePicker.java	Mon Aug 29 01:28:52 2011	(r797)
@@ -92,6 +92,12 @@
 	}
 	
 	
+	@Override
+	public void fixValue(){
+		// TODO: implement
+	}
+	
+	
 	protected class DateWidget extends DatePicker implements HasFocusHandlers, HasBlurHandlers, HasMouseDownHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseUpHandlers {
 		public void setId(String id){
 			DOM.setElementAttribute(this.getElement(), "id", id);

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlDateTimePicker.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlDateTimePicker.java	Mon Aug 29 01:03:07 2011	(r796)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlDateTimePicker.java	Mon Aug 29 01:28:52 2011	(r797)
@@ -25,6 +25,12 @@
 	@Override
 	public void addSubItem(String value) throws InvalidGdlSchemaException, ExecutionException {
 		// TODO: implement
-		
+	}
+	
+	
+	@Override
+	@Deprecated
+	public void fixValue(){
+		// TODO: implement
 	}
 }

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlImage.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlImage.java	Mon Aug 29 01:03:07 2011	(r796)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlImage.java	Mon Aug 29 01:28:52 2011	(r797)
@@ -22,6 +22,11 @@
 	@Override
 	public void addSubItem(String value) throws InvalidGdlSchemaException, ExecutionException {
 		// TODO: implement
-		
+	}
+	
+	
+	@Override
+	public void fixValue(){
+		// TODO: implement
 	}
 }

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlTimePicker.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlTimePicker.java	Mon Aug 29 01:03:07 2011	(r796)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlTimePicker.java	Mon Aug 29 01:28:52 2011	(r797)
@@ -25,6 +25,11 @@
 	@Override
 	public void addSubItem(String value) throws InvalidGdlSchemaException, ExecutionException {
 		// TODO: implement
-		
+	}
+	
+	
+	@Override
+	public void fixValue(){
+		// TODO: implement
 	}
 }

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlVideo.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlVideo.java	Mon Aug 29 01:03:07 2011	(r796)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlVideo.java	Mon Aug 29 01:28:52 2011	(r797)
@@ -22,6 +22,12 @@
 	@Override
 	public void addSubItem(String value) throws InvalidGdlSchemaException, ExecutionException {
 		// TODO: implement
-		
+	}
+	
+	
+	@Override
+	@Deprecated
+	public void fixValue(){
+		// TODO: implement
 	}
 }

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/container/GdlList.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/container/GdlList.java	Mon Aug 29 01:03:07 2011	(r796)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/container/GdlList.java	Mon Aug 29 01:28:52 2011	(r797)
@@ -443,7 +443,15 @@
 	
 	
 	@Override
+	@Deprecated
 	public ArrayList<Pair<Construct, TopicMapsTypes>> getContent(){
 		return null;
 	}
+	
+	
+	@Override
+	@Deprecated
+	public void fixValue(){
+		// has no effect on this element
+	}
 }

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	Mon Aug 29 01:03:07 2011	(r796)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/container/GdlUnit.java	Mon Aug 29 01:28:52 2011	(r797)
@@ -228,6 +228,13 @@
 	
 	
 	@Override
+	@Deprecated
+	public void fixValue(){
+		// has no effect on this element
+	}
+	
+	
+	@Override
 	public void addSubItem(String value) throws InvalidGdlSchemaException, ExecutionException {
 		// this method has no effect on this class
 	}

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlInfo.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlInfo.java	Mon Aug 29 01:03:07 2011	(r796)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlInfo.java	Mon Aug 29 01:28:52 2011	(r797)
@@ -54,6 +54,13 @@
 	}
 	
 	
+	@Override
+	@Deprecated
+	public void fixValue(){
+		// has no effect on this element
+	}
+	
+	
 	private void setParentListener(){
 		if(this.parent != null && !this.parentListenerSet){
 			parent.addMouseOverHandler(new MouseOverHandler() {

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	Mon Aug 29 01:03:07 2011	(r796)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlListBox.java	Mon Aug 29 01:28:52 2011	(r797)
@@ -9,6 +9,7 @@
 import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Occurrence;
 import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
 import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.TopicMapsTypes;
+import us.isidor.gdl.anaToMia.Widgets.base.ButtonableObject;
 import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
 import us.isidor.gdl.anaToMia.Widgets.base.PSIs;
 import us.isidor.gdl.anaToMia.Widgets.base.TmHelper;
@@ -164,6 +165,21 @@
 		// directly when calling the ListBox constructor
 	}
 	
+	
+	@Override
+	public void fixValue(){
+		for (Widget ctrl : this.subElements) {
+			if(ctrl instanceof ButtonableObject){
+				Widget lb = ((ButtonableObject) ctrl).getMainObject();
+				if(lb instanceof ListBox){
+					((ListBox)lb).setEnabled(false);
+				}
+			}
+		}
+		
+		// TODO: implement
+	}
+	
 		
 	// sets the css properties, by calling the super class's method and the local
 	// method, which sets some specific properties for the GdlText instance

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	Mon Aug 29 01:03:07 2011	(r796)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlReference.java	Mon Aug 29 01:28:52 2011	(r797)
@@ -54,6 +54,13 @@
 	}
 	
 	
+	@Override
+	@Deprecated
+	public void fixValue(){
+		// has no effect on this element
+	}
+	
+	
 	private ReferenceWidget createReference() throws InvalidGdlSchemaException, ExecutionException {
 		ReferenceWidget reference = new ReferenceWidget();
 		DOM.setElementAttribute(reference.getElement(), "id", this.getId() + "__GDL_" + this.subElements.size());

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	Mon Aug 29 01:03:07 2011	(r796)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlText.java	Mon Aug 29 01:28:52 2011	(r797)
@@ -64,6 +64,19 @@
 	}
 	
 	
+	@Override
+	public void fixValue(){
+		for (Widget ctrl : this.subElements) {
+			if(ctrl instanceof ButtonableObject){
+				Widget mo = ((ButtonableObject) ctrl).getMainObject();
+				if(mo instanceof TextArea){
+					((TextArea)mo).setReadOnly(true);
+				}
+			}
+		}
+	}
+	
+	
 	// creates a new TextArea item, adds it to the subElements array,
 	// and applies the styles on it
 	protected TextArea createNewTextArea() throws InvalidGdlSchemaException, ExecutionException {

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlTitle.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlTitle.java	Mon Aug 29 01:03:07 2011	(r796)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlTitle.java	Mon Aug 29 01:28:52 2011	(r797)
@@ -442,6 +442,13 @@
 	}
 	
 	
+	@Override
+	@Deprecated
+	public void fixValue(){
+		// has no effect on this element
+	}
+	
+	
 	// this class represents the acutal content of this widget, i.e.
 	// it wraps a h1, h2, h3 or h4 element
 	protected class TitleWidget extends Composite implements HasMouseDownHandlers, HasMouseUpHandlers, HasMouseOverHandlers, HasMouseOutHandlers, HasBlurHandlers, HasFocusHandlers{

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlView.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlView.java	Mon Aug 29 01:03:07 2011	(r796)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlView.java	Mon Aug 29 01:28:52 2011	(r797)
@@ -31,11 +31,19 @@
 	
 	
 	@Override
+	@Deprecated
 	public void addSubItem(String value) throws InvalidGdlSchemaException, ExecutionException {
 		//this method has no effect on this class
 	}
 	
 	
+	@Override
+	@Deprecated
+	public void fixValue(){
+		// has no effect on this element
+	}
+	
+	
 	public String getViewName()throws InvalidGdlSchemaException {
 		JsArray<Name> viewNames = super.tmRepresentative.getNames(tm.getTopicBySubjectIdentifier(tm.createLocator(PSIs.GDL.NameType.gdlViewName)));
 		if(viewNames.length() != 1){




More information about the Isidorus-cvs mailing list