Author: lgiessmann
Date: Fri Aug 26 01:58:36 2011
New Revision: 792
Log:
gdl-frontend: Widgets: implemented a method that return the parental GdlVisibleObject of each element; implmented a recusrive method that returns the actual GdlPanel that is the root panel of each GdlVisible-Element
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/GdlPanel.java
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/button/GdlActionButton.java
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlButton.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/GdlCommitButton.java
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlCreateButton.java
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlDeleteButton.java
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlInputButton.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/button/GdlValidateButton.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/GdlComplexData.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/environment/GdlInstantiator.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/GdlTextObject.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/GdlAssociationView.java
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlCreatorAssociationView.java
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlDefaultCreatorTopicView.java
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlDefaultEditorTopicView.java
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlDefaultTopicView.java
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlEditorAssociationView.java
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlSpecialCreatorTopicView.java
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlSpecialEditorTopicView.java
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlSpecialTopicView.java
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlTopicView.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 Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/TODO.txt Fri Aug 26 01:58:36 2011 (r792)
@@ -7,7 +7,7 @@
* GdlButton
* GdlComplexData
* GdlListBox
-* implement the ahndling of default-values
+* implement the handling of default-values
* Implement TopicMaps data consumption
* Implement TopicMaps data generation
* Implement HiddenValue
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPanel.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPanel.java Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPanel.java Fri Aug 26 01:58:36 2011 (r792)
@@ -276,9 +276,9 @@
public void createView(){
try{
if(this.requestedTopicsToCreate != null && this.requestedTopicsToCreate.size() != 0)
- this.view = GdlInstantiator.instantiateDefaultCreatorTopicView(this.requestedTopicsToCreate, this.requestedSchemaTm);
+ this.view = GdlInstantiator.instantiateDefaultCreatorTopicView(this);
else if(this.requestedTopicToEdit != null)
- this.view = GdlInstantiator.instantiateDefaultEditorTopicView(this.requestedTopicToEdit, this.requestedSchemaTm);
+ this.view = GdlInstantiator.instantiateDefaultEditorTopicView(this);
mainPanel.add(view);
}catch(Exception e){
Window.alert("could not create a view (" + e.getClass() + "): " + e.getMessage());
@@ -294,4 +294,14 @@
public void clear(){
this.mainPanel.clear();
}
+
+
+ public ArrayList<Pair<String, TopicIdentifierTypes>> getReqeustedTopicsToCreate(){
+ return this.requestedTopicsToCreate;
+ }
+
+
+ public Pair<String, TopicIdentifierTypes> getRequestedTopicToEdit(){
+ return this.requestedTopicToEdit;
+ }
}
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 Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlSpace.java Fri Aug 26 01:58:36 2011 (r792)
@@ -12,8 +12,8 @@
}
- public GdlSpace(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
- super(tmRepresentative, receivedData);
+ public GdlSpace(Topic tmRepresentative, Construct receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
+ super(tmRepresentative, receivedData, gdlParent);
this.setGdlStyle(this);
}
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 Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlVisibleObject.java Fri Aug 26 01:58:36 2011 (r792)
@@ -70,6 +70,7 @@
public abstract class GdlVisibleObject extends Composite implements GdlDescriptor, HasClickHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasFocusHandlers, HasMouseDownHandlers, HasMouseUpHandlers, HasBlurHandlers{
+ private GdlVisibleObject gdlParent = null;
protected AbsolutePanel mainPanel = new AbsolutePanel();
protected Panel containerPanel = null;
protected Topic tmRepresentative = null;
@@ -109,17 +110,13 @@
initWidget(this.mainPanel);
DOM.setStyleAttribute(this.mainPanel.getElement(), "overflow", "visible");
}
-
-
- // this method takes a string and creates a new sub-element within
- // an instance of GdlVisibleObject with the passed string value
- public abstract void addSubItem(String value) throws InvalidGdlSchemaException, ExecutionException;
- public GdlVisibleObject(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
+ public GdlVisibleObject(Topic tmRepresentative, Construct receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
this();
this.tmRepresentative = tmRepresentative;
this.tm = this.tmRepresentative.getTopicMap();
+ this.gdlParent = gdlParent;
if(!(receivedData instanceof Topic) && !(receivedData instanceof Association) && !(receivedData instanceof Name) && !(receivedData instanceof Variant) && !(receivedData instanceof Occurrence) && !(receivedData instanceof Role) && receivedData != null) throw new ExecutionException("receivedData must be either a Topic, Association, Topic-Name, Name-Variant, Topic-Occurrence or Association-Role, but is: " + receivedData.getClass());
this.receivedData = receivedData;
@@ -128,6 +125,27 @@
this.setGdlStyle();
}
+
+ public GdlVisibleObject getGdlParent(){
+ return this.gdlParent;
+ }
+
+
+ public int getSubElementsCount(){
+ if(this.subElements == null) return 0;
+ return this.subElements.size();
+ }
+
+
+ public GdlPanel getRoot(){
+ return this.getGdlParent().getRoot();
+ }
+
+
+ // this method takes a string and creates a new sub-element within
+ // an instance of GdlVisibleObject with the passed string value
+ public abstract void addSubItem(String value) throws InvalidGdlSchemaException, ExecutionException;
+
// returns the topic that represents this element
public Topic getTmRepresentative(){
@@ -140,7 +158,7 @@
ArrayList<Topic> infos = TmHelper.topicContainsInfo(this.tmRepresentative);
for (Topic info : infos){
- GdlInfo elem = (GdlInfo)GdlInstantiator.instantiate(info, this.receivedData);
+ GdlInfo elem = (GdlInfo)GdlInstantiator.instantiate(info, this.receivedData, this);
this.infoElements.add(elem);
elem.setPosition(this);
}
@@ -189,7 +207,7 @@
// add buttons that are not bound to the current sub element, but belong to it
for (Topic currentButton : currentButtons)
- if(!((ButtonableObject)this.subElements.get(i)).containsButton(currentButton)) ((ButtonableObject)this.subElements.get(i)).addButton((GdlActionButton)GdlInstantiator.instantiate(currentButton, null));
+ if(!((ButtonableObject)this.subElements.get(i)).containsButton(currentButton)) ((ButtonableObject)this.subElements.get(i)).addButton((GdlActionButton)GdlInstantiator.instantiate(currentButton, null, this));
}
}
@@ -1925,6 +1943,8 @@
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);
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 Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlActionButton.java Fri Aug 26 01:58:36 2011 (r792)
@@ -4,11 +4,11 @@
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.ui.Button;
-
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Occurrence;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
import us.isidor.gdl.anaToMia.Widgets.base.GdlPanel;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.base.PSIs;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
@@ -21,16 +21,15 @@
import us.isidor.gdl.anaToMia.Widgets.value.TextAlignValue;
public class GdlActionButton extends GdlButton {
-
+
protected GdlActionButton(){
super();
}
- public GdlActionButton(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
- super(tmRepresentative, receivedData);
+ public GdlActionButton(Topic tmRepresentative, Construct receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
+ super(tmRepresentative, receivedData, gdlParent);
- // TODO: set all tm values
this.createNewButton().setText("Action-Button"); // TODO: remove set text
this.setClickHandlers();
}
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlButton.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlButton.java Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlButton.java Fri Aug 26 01:58:36 2011 (r792)
@@ -2,6 +2,7 @@
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
import us.isidor.gdl.anaToMia.Widgets.text.GdlTextObject;
@@ -12,7 +13,7 @@
}
- public GdlButton(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
- super(tmRepresentative, receivedData);
+ public GdlButton(Topic tmRepresentative, Construct receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
+ super(tmRepresentative, receivedData, gdlParent);
}
}
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 Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlCheckBox.java Fri Aug 26 01:58:36 2011 (r792)
@@ -4,6 +4,7 @@
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
@@ -13,8 +14,8 @@
}
- public GdlCheckBox(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
- super(tmRepresentative, receivedData);
+ public GdlCheckBox(Topic tmRepresentative, Construct receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
+ super(tmRepresentative, receivedData, gdlParent);
// TODO: create a check box for each tm construct
this.createcheckBox().setText("Check Box 1");
this.createcheckBox().setText("Check Box 2");
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlCommitButton.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlCommitButton.java Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlCommitButton.java Fri Aug 26 01:58:36 2011 (r792)
@@ -2,6 +2,7 @@
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
import com.google.gwt.user.client.ui.Button;
@@ -14,8 +15,8 @@
}
- public GdlCommitButton(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
- super(tmRepresentative, receivedData);
+ public GdlCommitButton(Topic tmRepresentative, Construct receivedData, GdlVisibleObject parent) throws InvalidGdlSchemaException, ExecutionException{
+ super(tmRepresentative, receivedData, parent);
((Button)this.subElements.get(0)).setText("commit");
}
}
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlCreateButton.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlCreateButton.java Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlCreateButton.java Fri Aug 26 01:58:36 2011 (r792)
@@ -2,6 +2,7 @@
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
import com.google.gwt.user.client.ui.Button;
@@ -14,8 +15,8 @@
}
- public GdlCreateButton(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
- super(tmRepresentative, receivedData);
+ public GdlCreateButton(Topic tmRepresentative, Construct receivedData, GdlVisibleObject parent) throws InvalidGdlSchemaException, ExecutionException{
+ super(tmRepresentative, receivedData, parent);
((Button)this.subElements.get(0)).setText("create");
}
}
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlDeleteButton.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlDeleteButton.java Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlDeleteButton.java Fri Aug 26 01:58:36 2011 (r792)
@@ -1,10 +1,15 @@
package us.isidor.gdl.anaToMia.Widgets.button;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
@@ -16,8 +21,24 @@
}
- public GdlDeleteButton(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
- super(tmRepresentative, receivedData);
+ public GdlDeleteButton(Topic tmRepresentative, Construct receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
+ super(tmRepresentative, receivedData, gdlParent);
((Button)this.subElements.get(0)).setText("delete");
+ this.getButton().addClickHandler(new DeleteButtonClickHandler(this));
+ }
+
+
+ protected class DeleteButtonClickHandler implements ClickHandler {
+ private GdlDeleteButton owner = null;
+
+ public DeleteButtonClickHandler(GdlDeleteButton owner){
+ this.owner = owner;
+ }
+
+
+ @Override
+ public void onClick(ClickEvent event) {
+
+ }
}
}
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlInputButton.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlInputButton.java Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlInputButton.java Fri Aug 26 01:58:36 2011 (r792)
@@ -2,6 +2,7 @@
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
@@ -11,8 +12,8 @@
}
- public GdlInputButton(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
- super(tmRepresentative, receivedData);
+ public GdlInputButton(Topic tmRepresentative, Construct receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
+ super(tmRepresentative, receivedData, gdlParent);
}
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 Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlRadioButton.java Fri Aug 26 01:58:36 2011 (r792)
@@ -5,6 +5,7 @@
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
@@ -14,8 +15,8 @@
}
- public GdlRadioButton(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
- super(tmRepresentative, receivedData);
+ public GdlRadioButton(Topic tmRepresentative, Construct receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
+ super(tmRepresentative, receivedData, gdlParent);
// TODO: create a radio button for each tm construct
this.createRadioButton().setText("Radio Button 1");
this.createRadioButton().setText("Radio Button 2");
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlValidateButton.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlValidateButton.java Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlValidateButton.java Fri Aug 26 01:58:36 2011 (r792)
@@ -4,6 +4,7 @@
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
@@ -15,8 +16,8 @@
}
- public GdlValidateButton(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
- super(tmRepresentative, receivedData);
+ public GdlValidateButton(Topic tmRepresentative, Construct receivedData, GdlVisibleObject parent) throws InvalidGdlSchemaException, ExecutionException{
+ super(tmRepresentative, receivedData, parent);
((Button)this.subElements.get(0)).setText("validate");
}
}
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 Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlAudio.java Fri Aug 26 01:58:36 2011 (r792)
@@ -2,6 +2,7 @@
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.base.PSIs;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
@@ -13,7 +14,7 @@
}
- public GdlAudio(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
+ public GdlAudio(Topic tmRepresentative, Construct receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
this();
}
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlComplexData.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlComplexData.java Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlComplexData.java Fri Aug 26 01:58:36 2011 (r792)
@@ -13,7 +13,7 @@
}
- public GdlComplexData(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
- super(tmRepresentative, receivedData);
+ public GdlComplexData(Topic tmRepresentative, Construct receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
+ super(tmRepresentative, receivedData, gdlParent);
}
}
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 Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlDatePicker.java Fri Aug 26 01:58:36 2011 (r792)
@@ -28,6 +28,7 @@
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
import us.isidor.gdl.anaToMia.Widgets.base.ButtonableObject;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.environment.ActiveStyleHandler;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
import us.isidor.gdl.anaToMia.Widgets.environment.FocusStyleHandler;
@@ -44,8 +45,8 @@
}
- public GdlDatePicker(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
- super(tmRepresentative, receivedData);
+ public GdlDatePicker(Topic tmRepresentative, Construct receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
+ super(tmRepresentative, receivedData, gdlParent);
// create a date widget for each tm-construct
this.createNewDateWidget();
this.setNthButtons();
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 Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlDateTimePicker.java Fri Aug 26 01:58:36 2011 (r792)
@@ -2,6 +2,7 @@
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
@@ -15,8 +16,8 @@
}
- public GdlDateTimePicker(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
- super(tmRepresentative, receivedData);
+ public GdlDateTimePicker(Topic tmRepresentative, Construct receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
+ super(tmRepresentative, receivedData, gdlParent);
// create a date-time widget for each tm-construct
}
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 Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlImage.java Fri Aug 26 01:58:36 2011 (r792)
@@ -2,6 +2,7 @@
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.base.PSIs;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
@@ -13,7 +14,7 @@
}
- public GdlImage(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
+ public GdlImage(Topic tmRepresentative, Construct receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
this();
}
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 Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlTimePicker.java Fri Aug 26 01:58:36 2011 (r792)
@@ -2,6 +2,7 @@
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
@@ -15,8 +16,8 @@
}
- public GdlTimePicker(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
- super(tmRepresentative, receivedData);
+ public GdlTimePicker(Topic tmRepresentative, Construct receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
+ super(tmRepresentative, receivedData, gdlParent);
// create a time widget for each tm-construct
}
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 Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlVideo.java Fri Aug 26 01:58:36 2011 (r792)
@@ -2,6 +2,7 @@
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.base.PSIs;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
@@ -13,7 +14,7 @@
}
- public GdlVideo(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
+ public GdlVideo(Topic tmRepresentative, Construct receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
this();
}
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 Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/container/GdlList.java Fri Aug 26 01:58:36 2011 (r792)
@@ -58,8 +58,8 @@
}
- public GdlList(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
- super(tmRepresentative, receivedData);
+ public GdlList(Topic tmRepresentative, Construct receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
+ super(tmRepresentative, receivedData, gdlParent);
this.createNewList();
ArrayList<Topic> objectsContained = this.contains();
@@ -416,7 +416,7 @@
for (Pair<Topic, Integer> pair : this.storedItems) if(pair.getFirst().equals(current)) idx = pair.getSecond();
ListWidget list = (ListWidget)((ButtonableObject)this.subElements.get(0)).getMainObject();
- GdlVisibleObject newObj = GdlInstantiator.instantiate(current, this.receivedData);
+ GdlVisibleObject newObj = GdlInstantiator.instantiate(current, this.receivedData, GdlList.this);
list.insertWidget(newObj, idx);
return newObj;
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 Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/container/GdlUnit.java Fri Aug 26 01:58:36 2011 (r792)
@@ -60,8 +60,8 @@
}
- public GdlUnit(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
- super(tmRepresentative, receivedData);
+ public GdlUnit(Topic tmRepresentative, Construct receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
+ super(tmRepresentative, receivedData, gdlParent);
// create a unit for each tm-element and set the current element, e.g. current topic, occurrence, name, ...
this.createUnit(null);
this.setNthButtons();
@@ -262,7 +262,7 @@
if(ancestor == null || current == null) throw new ExecutionException("to append \"" + TmHelper.getAnyIdOfTopic(current) + "\" on \"" + TmHelper.getAnyIdOfTopic(ancestor) + "\" both topics must be present");
GdlPosition position = new GdlPosition(TmHelper.getPositionOf(ancestor, current));
- GdlVisibleObject newObj = GdlInstantiator.instantiate(current, this.currentElement);
+ GdlVisibleObject newObj = GdlInstantiator.instantiate(current, this.currentElement, GdlUnit.this);
GdlVisibleObject oldObj = null;
for (Widget widget : this.subElements){
if(((GdlVisibleObject)widget).getTmRepresentative().equals(ancestor)){
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/GdlInstantiator.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/GdlInstantiator.java Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/GdlInstantiator.java Fri Aug 26 01:58:36 2011 (r792)
@@ -10,6 +10,7 @@
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.TopicMap;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Variant;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlPanel;
import us.isidor.gdl.anaToMia.Widgets.base.GdlSpace;
import us.isidor.gdl.anaToMia.Widgets.base.PSIs;
import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
@@ -46,63 +47,63 @@
public class GdlInstantiator {
// returns a java instance of a GdlVisibleObject that corresponds to the
// set topic type of the passed topic instance
- public static GdlVisibleObject instantiate(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
+ public static GdlVisibleObject instantiate(Topic tmRepresentative, Construct receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
if(!(receivedData instanceof Topic) && !(receivedData instanceof Association) && !(receivedData instanceof Name) && !(receivedData instanceof Variant) && !(receivedData instanceof Occurrence) && !(receivedData instanceof Role) && receivedData != null) throw new ExecutionException("receivedData must be either a Topic, Association, Topic-Name, Name-Variant, Topic-Occurrence or Association-Role, but is: " + receivedData.getClass());
if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlSpace)){
- return new GdlSpace(tmRepresentative, receivedData);
+ return new GdlSpace(tmRepresentative, receivedData, gdlParent);
}else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlTitle)){
- return new GdlTitle(tmRepresentative, receivedData);
+ return new GdlTitle(tmRepresentative, receivedData, gdlParent);
}else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlInfo)){
- return new GdlInfo(tmRepresentative, receivedData);
+ return new GdlInfo(tmRepresentative, receivedData, gdlParent);
}else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlReference)){
- return new GdlReference(tmRepresentative, receivedData);
+ return new GdlReference(tmRepresentative, receivedData, gdlParent);
}else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlRadioButton)){
- return new GdlRadioButton(tmRepresentative, receivedData);
+ return new GdlRadioButton(tmRepresentative, receivedData, gdlParent);
}else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlCheckBox)){
- return new GdlCheckBox(tmRepresentative, receivedData);
+ return new GdlCheckBox(tmRepresentative, receivedData, gdlParent);
}else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlValidateButton)){
- return new GdlValidateButton(tmRepresentative, receivedData);
+ return new GdlValidateButton(tmRepresentative, receivedData, gdlParent);
}else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlCreateButton)){
- return new GdlCreateButton(tmRepresentative, receivedData);
+ return new GdlCreateButton(tmRepresentative, receivedData, gdlParent);
}else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlDeleteButton)){
- return new GdlDeleteButton(tmRepresentative, receivedData);
+ return new GdlDeleteButton(tmRepresentative, receivedData, gdlParent);
}else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlCommitButton)){
- return new GdlCommitButton(tmRepresentative, receivedData);
+ return new GdlCommitButton(tmRepresentative, receivedData, gdlParent);
}else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlActionButton)){
- return new GdlActionButton(tmRepresentative, receivedData);
+ return new GdlActionButton(tmRepresentative, receivedData, gdlParent);
}else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlImage)){
- return new GdlImage(tmRepresentative, receivedData);
+ return new GdlImage(tmRepresentative, receivedData, gdlParent);
}else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlVideo)){
- return new GdlVideo(tmRepresentative, receivedData);
+ return new GdlVideo(tmRepresentative, receivedData, gdlParent);
}else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlAudio)){
- return new GdlAudio(tmRepresentative, receivedData);
+ return new GdlAudio(tmRepresentative, receivedData, gdlParent);
}else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlDatePicker)){
- return new GdlDatePicker(tmRepresentative, receivedData);
+ return new GdlDatePicker(tmRepresentative, receivedData, gdlParent);
}else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlTimePicker)){
- return new GdlTimePicker(tmRepresentative, receivedData);
+ return new GdlTimePicker(tmRepresentative, receivedData, gdlParent);
}else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlDateTimePicker)){
- return new GdlDateTimePicker(tmRepresentative, receivedData);
+ return new GdlDateTimePicker(tmRepresentative, receivedData, gdlParent);
}else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlUnit)){
- return new GdlUnit(tmRepresentative, receivedData);
+ return new GdlUnit(tmRepresentative, receivedData, gdlParent);
}else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlText)){
- return new GdlText(tmRepresentative, receivedData);
+ return new GdlText(tmRepresentative, receivedData, gdlParent);
}else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlList)){
- return new GdlList(tmRepresentative, receivedData);
+ return new GdlList(tmRepresentative, receivedData, gdlParent);
}else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlListBox)){
- return new GdlListBox(tmRepresentative, receivedData);
+ return new GdlListBox(tmRepresentative, receivedData, gdlParent);
}else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlDefaultCreatorTopicView)){
- return new GdlDefaultCreatorTopicView(tmRepresentative);
+ return new GdlDefaultCreatorTopicView(tmRepresentative, gdlParent, null);
}else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlDefaultEditorTopicView)){
- return new GdlDefaultEditorTopicView(tmRepresentative, (Topic)receivedData);
+ return new GdlDefaultEditorTopicView(tmRepresentative, (Topic)receivedData, gdlParent, null);
}else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlSpecialCreatorTopicView)){
- return new GdlSpecialCreatorTopicView(tmRepresentative);
+ return new GdlSpecialCreatorTopicView(tmRepresentative, gdlParent);
}else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlSpecialEditorTopicView)){
- return new GdlSpecialEditorTopicView(tmRepresentative, (Topic)receivedData);
+ return new GdlSpecialEditorTopicView(tmRepresentative, (Topic)receivedData, gdlParent);
}else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlCreatorAssociationview)){
- return new GdlCreatorAssociationView(tmRepresentative, (Topic)receivedData);
+ return new GdlCreatorAssociationView(tmRepresentative, (Topic)receivedData, gdlParent);
}else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlEditorAssociationView)){
- return new GdlEditorAssociationView(tmRepresentative, (Topic)receivedData);
+ return new GdlEditorAssociationView(tmRepresentative, (Topic)receivedData, gdlParent);
}else{
String values = "";
for(int i = 0; i != tmRepresentative.getTypes().length(); ++i){
@@ -118,12 +119,13 @@
// returns a GdlDefaultCreatorTopicView that corresponds to the passed arguments
- public static GdlDefaultCreatorTopicView instantiateDefaultCreatorTopicView(ArrayList<Pair<String, TopicIdentifierTypes>> requestedTopics, TopicMap schemaTm) throws InvalidGdlSchemaException, ExecutionException{
- ArrayList<Topic> views = getViewTopics(requestedTopics, TmHelper.getTopicByPsi(PSIs.GDL.TopicType.gdlDefaultCreatorTopicView, schemaTm), schemaTm);
+ public static GdlDefaultCreatorTopicView instantiateDefaultCreatorTopicView(GdlPanel panel) throws InvalidGdlSchemaException, ExecutionException{
+ if(panel == null) return null;
+ ArrayList<Topic> views = getViewTopics(panel.getReqeustedTopicsToCreate(), TmHelper.getTopicByPsi(PSIs.GDL.TopicType.gdlDefaultCreatorTopicView, panel.getSchemaTm()), panel.getSchemaTm());
if(views.size() != 1){
String values = "";
- for (Pair<String, TopicIdentifierTypes> pair : requestedTopics)
+ for (Pair<String, TopicIdentifierTypes> pair : panel.getReqeustedTopicsToCreate())
values += ", " + pair.getFirst();
if(values.length() >= 2 )values = values.substring(2);
String bindings = "";
@@ -134,7 +136,7 @@
throw new InvalidGdlSchemaException("the combination of topics requested (" + values + ") must be bound exactly once to a " + PSIs.GDL.TopicType.gdlDefaultCreatorTopicView + " but is bound to " + bindings);
}
- return new GdlDefaultCreatorTopicView(views.get(0));
+ return new GdlDefaultCreatorTopicView(views.get(0), null, panel);
}
@@ -188,24 +190,24 @@
// returns a GdlDefaultEditorTopicView that corresponds to the passed arguments
- public static GdlDefaultEditorTopicView instantiateDefaultEditorTopicView(Pair<String, TopicIdentifierTypes> requestedTopic, TopicMap schemaTm) throws InvalidGdlSchemaException, ExecutionException{
- if(requestedTopic == null || schemaTm == null) return null;
+ public static GdlDefaultEditorTopicView instantiateDefaultEditorTopicView(GdlPanel panel) throws InvalidGdlSchemaException, ExecutionException{
+ if(panel == null) return null;
// request the topic that is passed by the user
- Topic requestedTop = TmHelper.getTopicByAnyIdentifier(requestedTopic, schemaTm);
- if(requestedTop == null) throw new InvalidGdlSchemaException("the topic " + requestedTopic.getFirst() + " was not found!");
+ Topic requestedTop = TmHelper.getTopicByAnyIdentifier(panel.getRequestedTopicToEdit(), panel.getSchemaTm());
+ if(requestedTop == null) throw new InvalidGdlSchemaException("the topic " + panel.getRequestedTopicToEdit().getFirst() + " was not found!");
// get all tm-instance-value topics bound to the requested topic
- Topic tmConstruct = TmHelper.getTopicByPsi(PSIs.GDL.RoleType.gdlTmConstruct, schemaTm);
- Topic tmBinding = TmHelper.getTopicByPsi(PSIs.GDL.AssociationType.gdlTmBinding, schemaTm);
- Topic descriptor = TmHelper.getTopicByPsi(PSIs.GDL.RoleType.gdlDescriptor, schemaTm);
+ Topic tmConstruct = TmHelper.getTopicByPsi(PSIs.GDL.RoleType.gdlTmConstruct, panel.getSchemaTm());
+ Topic tmBinding = TmHelper.getTopicByPsi(PSIs.GDL.AssociationType.gdlTmBinding, panel.getSchemaTm());
+ Topic descriptor = TmHelper.getTopicByPsi(PSIs.GDL.RoleType.gdlDescriptor, panel.getSchemaTm());
ArrayList<Topic> tmInstanceValues = TmHelper.getOtherPlayerOfBinaryAssociation(requestedTop, tmConstruct, tmBinding, null, descriptor);
// get all views bound to the found tm-instance-values
- Topic defaultEditorTopicView = TmHelper.getTopicByPsi(PSIs.GDL.TopicType.gdlDefaultEditorTopicView, schemaTm);
- Topic tmValue = TmHelper.getTopicByPsi(PSIs.GDL.RoleType.gdlTmValue, schemaTm);
- Topic topicViewBinding = TmHelper.getTopicByPsi(PSIs.GDL.AssociationType.gdlTopicViewBinding, schemaTm);
+ Topic defaultEditorTopicView = TmHelper.getTopicByPsi(PSIs.GDL.TopicType.gdlDefaultEditorTopicView, panel.getSchemaTm());
+ Topic tmValue = TmHelper.getTopicByPsi(PSIs.GDL.RoleType.gdlTmValue, panel.getSchemaTm());
+ Topic topicViewBinding = TmHelper.getTopicByPsi(PSIs.GDL.AssociationType.gdlTopicViewBinding, panel.getSchemaTm());
ArrayList<Topic> views = new ArrayList<Topic>();
for (Topic tmInstanceValue : tmInstanceValues) {
ArrayList<Topic> tmpViews = TmHelper.getOtherPlayerOfBinaryAssociation(tmInstanceValue, tmValue, topicViewBinding, null, defaultEditorTopicView, descriptor);
@@ -213,19 +215,19 @@
}
if(views.size() == 1){
- return new GdlDefaultEditorTopicView(views.get(0), requestedTop);
+ return new GdlDefaultEditorTopicView(views.get(0), requestedTop, null, panel);
}else if(views.size() > 1){
String bindings = "";
for (Topic top : views)
bindings += ", " + TmHelper.getAnyIdOfTopic(top);
if(bindings.length() >= 2)bindings = bindings.substring(2);
- throw new InvalidGdlSchemaException("the topic " + requestedTopic.getFirst() + " requested for editing must be bound to exaclty one " + PSIs.GDL.TopicType.gdlDefaultEditorTopicView + ", but is bound to " + bindings);
+ throw new InvalidGdlSchemaException("the topic " + panel.getRequestedTopicToEdit().getFirst() + " requested for editing must be bound to exaclty one " + PSIs.GDL.TopicType.gdlDefaultEditorTopicView + ", but is bound to " + bindings);
}else {
ArrayList<Pair<String, TopicIdentifierTypes>> typesOfRequestedTopic = new ArrayList<Pair<String,TopicIdentifierTypes>>();
for(int i = 0; i != requestedTop.getTypes().length(); ++i)
typesOfRequestedTopic.add(TmHelper.getAnyIdenditfierOfTopic(requestedTop.getTypes().get(i)));
- views = getViewTopics(typesOfRequestedTopic, defaultEditorTopicView, schemaTm);
+ views = getViewTopics(typesOfRequestedTopic, defaultEditorTopicView, panel.getSchemaTm());
if(views.size() != 1){
String values = "";
@@ -237,10 +239,10 @@
bindings += ", " + TmHelper.getAnyIdOfTopic(top);
if(bindings.length() >= 2)bindings = bindings.substring(2) + "]";
else bindings = "[ ]";
- throw new InvalidGdlSchemaException("the combination of topic types (" + values + ") for the requested topic " + requestedTopic.getFirst() + " must be bound exactly once to a " + PSIs.GDL.TopicType.gdlDefaultEditorTopicView + " but is bound to " + bindings);
+ throw new InvalidGdlSchemaException("the combination of topic types (" + values + ") for the requested topic " + panel.getRequestedTopicToEdit().getFirst() + " must be bound exactly once to a " + PSIs.GDL.TopicType.gdlDefaultEditorTopicView + " but is bound to " + bindings);
}
- return new GdlDefaultEditorTopicView(views.get(0), requestedTop);
+ return new GdlDefaultEditorTopicView(views.get(0), requestedTop, null, panel);
}
}
}
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 Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlInfo.java Fri Aug 26 01:58:36 2011 (r792)
@@ -25,8 +25,8 @@
}
- public GdlInfo(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
- super(tmRepresentative, receivedData);
+ public GdlInfo(Topic tmRepresentative, Construct receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
+ super(tmRepresentative, receivedData, gdlParent);
RootPanel.get().add(this);
super.setGdlStyle();
// TODO: create an info element for each tm construct
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 Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlListBox.java Fri Aug 26 01:58:36 2011 (r792)
@@ -8,6 +8,7 @@
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Occurrence;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.base.PSIs;
import us.isidor.gdl.anaToMia.Widgets.base.TmHelper;
import us.isidor.gdl.anaToMia.Widgets.environment.ActiveStyleHandler;
@@ -24,8 +25,8 @@
}
- public GdlListBox(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
- super(tmRepresentative, receivedData);
+ public GdlListBox(Topic tmRepresentative, Construct receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
+ super(tmRepresentative, receivedData, gdlParent);
if(receivedData != null && this.getConstraint() != null) this.setReceivedData();
else this.setDefaultValue();
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 Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlReference.java Fri Aug 26 01:58:36 2011 (r792)
@@ -16,6 +16,7 @@
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Occurrence;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.base.PSIs;
import us.isidor.gdl.anaToMia.Widgets.environment.ActiveStyleHandler;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
@@ -33,8 +34,8 @@
super();
}
- public GdlReference(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
- super(tmRepresentative, receivedData);
+ public GdlReference(Topic tmRepresentative, Construct receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
+ super(tmRepresentative, receivedData, gdlParent);
// TODO: create a Reference element for each TM-elem
ReferenceWidget ref = this.createReference(); // TODO: remove
ref.setText("Reference"); // TODO: remove
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 Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlText.java Fri Aug 26 01:58:36 2011 (r792)
@@ -16,6 +16,7 @@
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Occurrence;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
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.environment.ActiveStyleHandler;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
@@ -42,8 +43,8 @@
}
- public GdlText(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
- super(tmRepresentative, receivedData);
+ public GdlText(Topic tmRepresentative, Construct receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
+ super(tmRepresentative, receivedData, gdlParent);
// If the receivedData is set and the tmRepresentative is bound to a value-group
// that is bound to a constraint, the received data is consumed.
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 Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlTextObject.java Fri Aug 26 01:58:36 2011 (r792)
@@ -27,8 +27,8 @@
}
- public GdlTextObject(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
- super(tmRepresentative, receivedData);
+ public GdlTextObject(Topic tmRepresentative, Construct receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
+ super(tmRepresentative, receivedData, gdlParent);
super.setGdlStyle();
}
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 Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlTitle.java Fri Aug 26 01:58:36 2011 (r792)
@@ -5,6 +5,7 @@
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Occurrence;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.base.PSIs;
import us.isidor.gdl.anaToMia.Widgets.environment.ActiveStyleHandler;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
@@ -57,8 +58,8 @@
}
- public GdlTitle(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
- super(tmRepresentative, receivedData);
+ public GdlTitle(Topic tmRepresentative, Construct receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
+ super(tmRepresentative, receivedData, gdlParent);
// TODO: create a Title element for each TM-elem
this.createNewTitle().setText("Title");
this.setNthButtons();
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlAssociationView.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlAssociationView.java Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlAssociationView.java Fri Aug 26 01:58:36 2011 (r792)
@@ -11,6 +11,7 @@
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.TopicMap;
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;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
@@ -39,8 +40,8 @@
}
- public GdlAssociationView(Topic tmRepresentative, Topic receivedData) throws InvalidGdlSchemaException, ExecutionException {
- super(tmRepresentative, receivedData);
+ public GdlAssociationView(Topic tmRepresentative, Topic receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException {
+ super(tmRepresentative, receivedData, gdlParent);
}
@@ -195,9 +196,9 @@
}
- public AssociationItem(Topic tmRepresentative, Association receivedData, int indexInParent) throws InvalidGdlSchemaException, ExecutionException{
- super(tmRepresentative, receivedData);
- this.indexInParent = indexInParent;
+ public AssociationItem(Topic tmRepresentative, Association receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
+ super(tmRepresentative, receivedData, gdlParent);
+ this.indexInParent = this.getGdlParent().getSubElementsCount();
ArrayList<Topic> objectsContained = this.contains();
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlCreatorAssociationView.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlCreatorAssociationView.java Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlCreatorAssociationView.java Fri Aug 26 01:58:36 2011 (r792)
@@ -2,14 +2,15 @@
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.TopicMap;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
public class GdlCreatorAssociationView extends GdlAssociationView {
- public GdlCreatorAssociationView(Topic tmRepresentative, Topic receivedData) throws InvalidGdlSchemaException, ExecutionException {
- super(tmRepresentative, receivedData);
+ public GdlCreatorAssociationView(Topic tmRepresentative, Topic receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException {
+ super(tmRepresentative, receivedData, gdlParent);
// TODO Auto-generated constructor stub
}
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlDefaultCreatorTopicView.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlDefaultCreatorTopicView.java Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlDefaultCreatorTopicView.java Fri Aug 26 01:58:36 2011 (r792)
@@ -3,15 +3,18 @@
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.TopicMap;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlPanel;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
public class GdlDefaultCreatorTopicView extends GdlDefaultTopicView{
- // TODO: implement
+ private GdlPanel rootPanel = null;
- public GdlDefaultCreatorTopicView(Topic tmRepresentative) throws InvalidGdlSchemaException, ExecutionException {
- super(tmRepresentative, null);
+ public GdlDefaultCreatorTopicView(Topic tmRepresentative, GdlVisibleObject gdlParent, GdlPanel rootPanel) throws InvalidGdlSchemaException, ExecutionException {
+ super(tmRepresentative, null, gdlParent);
+ this.rootPanel = rootPanel;
// TODO Auto-generated constructor stub
}
@@ -21,4 +24,10 @@
// TODO Auto-generated method stub
return null;
}
+
+
+ @Override
+ public GdlPanel getRoot(){
+ return this.rootPanel;
+ }
}
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlDefaultEditorTopicView.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlDefaultEditorTopicView.java Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlDefaultEditorTopicView.java Fri Aug 26 01:58:36 2011 (r792)
@@ -2,14 +2,18 @@
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.TopicMap;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlPanel;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
public class GdlDefaultEditorTopicView extends GdlDefaultTopicView {
+ private GdlPanel rootPanel = null;
- public GdlDefaultEditorTopicView(Topic tmRepresentative, Topic receivedData) throws InvalidGdlSchemaException, ExecutionException {
- super(tmRepresentative, receivedData);
+ public GdlDefaultEditorTopicView(Topic tmRepresentative, Topic receivedData, GdlVisibleObject gdlParent, GdlPanel rootPanel) throws InvalidGdlSchemaException, ExecutionException {
+ super(tmRepresentative, receivedData, gdlParent);
+ this.rootPanel = rootPanel;
// TODO Auto-generated constructor stub
}
@@ -18,4 +22,10 @@
// TODO Auto-generated method stub
return null;
}
+
+
+ @Override
+ public GdlPanel getRoot(){
+ return this.rootPanel;
+ }
}
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlDefaultTopicView.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlDefaultTopicView.java Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlDefaultTopicView.java Fri Aug 26 01:58:36 2011 (r792)
@@ -1,13 +1,14 @@
package us.isidor.gdl.anaToMia.Widgets.view;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
public abstract class GdlDefaultTopicView extends GdlTopicView {
- public GdlDefaultTopicView(Topic tmRepresentative, Topic receivedData) throws InvalidGdlSchemaException, ExecutionException {
- super(tmRepresentative, receivedData);
+ public GdlDefaultTopicView(Topic tmRepresentative, Topic receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException {
+ super(tmRepresentative, receivedData, gdlParent);
// TODO Auto-generated constructor stub
}
// TODO: implement
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlEditorAssociationView.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlEditorAssociationView.java Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlEditorAssociationView.java Fri Aug 26 01:58:36 2011 (r792)
@@ -7,6 +7,7 @@
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Role;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.TopicMap;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.base.TmHelper;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
@@ -18,13 +19,13 @@
protected boolean associationsToRepresentSet = false;
- public GdlEditorAssociationView(Topic tmRepresentative, Topic receivedData) throws InvalidGdlSchemaException, ExecutionException {
- super(tmRepresentative, receivedData);
+ public GdlEditorAssociationView(Topic tmRepresentative, Topic receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException {
+ super(tmRepresentative, receivedData, gdlParent);
// create an association item for each association that must be represetned
// by this view
for (int i = 0; i != this.getAssociationsToRepresent().size(); ++i){
- this.addToContainerPanel(new AssociationItem(this.tmRepresentative, this.getAssociationsToRepresent().get(i), i));
+ this.addToContainerPanel(new AssociationItem(this.tmRepresentative, this.getAssociationsToRepresent().get(i), this));
}
}
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlSpecialCreatorTopicView.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlSpecialCreatorTopicView.java Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlSpecialCreatorTopicView.java Fri Aug 26 01:58:36 2011 (r792)
@@ -3,14 +3,15 @@
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.TopicMap;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
public class GdlSpecialCreatorTopicView extends GdlSpecialTopicView{
// TODO: implement
- public GdlSpecialCreatorTopicView(Topic tmRepresentative) throws InvalidGdlSchemaException, ExecutionException {
- super(tmRepresentative, null);
+ public GdlSpecialCreatorTopicView(Topic tmRepresentative, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException {
+ super(tmRepresentative, null, gdlParent);
// TODO Auto-generated constructor stub
}
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlSpecialEditorTopicView.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlSpecialEditorTopicView.java Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlSpecialEditorTopicView.java Fri Aug 26 01:58:36 2011 (r792)
@@ -2,6 +2,7 @@
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.TopicMap;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
@@ -10,8 +11,8 @@
// TODO: implement
- public GdlSpecialEditorTopicView(Topic tmRepresentative, Topic receivedData) throws InvalidGdlSchemaException, ExecutionException {
- super(tmRepresentative, receivedData);
+ public GdlSpecialEditorTopicView(Topic tmRepresentative, Topic receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException {
+ super(tmRepresentative, receivedData, gdlParent);
// TODO Auto-generated constructor stub
}
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlSpecialTopicView.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlSpecialTopicView.java Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlSpecialTopicView.java Fri Aug 26 01:58:36 2011 (r792)
@@ -1,13 +1,14 @@
package us.isidor.gdl.anaToMia.Widgets.view;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
public abstract class GdlSpecialTopicView extends GdlTopicView {
- public GdlSpecialTopicView(Topic tmRepresentative, Topic receivedData) throws InvalidGdlSchemaException, ExecutionException {
- super(tmRepresentative, receivedData);
+ public GdlSpecialTopicView(Topic tmRepresentative, Topic receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException {
+ super(tmRepresentative, receivedData, gdlParent);
// TODO Auto-generated constructor stub
}
// TODO: implement
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlTopicView.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlTopicView.java Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlTopicView.java Fri Aug 26 01:58:36 2011 (r792)
@@ -4,6 +4,7 @@
import com.google.gwt.user.client.ui.Widget;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
import us.isidor.gdl.anaToMia.Widgets.base.ButtonableObject;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
import us.isidor.gdl.anaToMia.Widgets.base.TmHelper;
import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
@@ -12,8 +13,8 @@
public abstract class GdlTopicView extends GdlView {
- public GdlTopicView(Topic tmRepresentative, Topic receivedData) throws InvalidGdlSchemaException, ExecutionException{
- super(tmRepresentative, receivedData);
+ public GdlTopicView(Topic tmRepresentative, Topic receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
+ super(tmRepresentative, receivedData, gdlParent);
ArrayList<Topic> objectsContained = this.contains();
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 Fri Aug 26 00:15:10 2011 (r791)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlView.java Fri Aug 26 01:58:36 2011 (r792)
@@ -25,8 +25,8 @@
}
- public GdlView(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{
- super(tmRepresentative, receivedData);
+ public GdlView(Topic tmRepresentative, Construct receivedData, GdlVisibleObject gdlParent) throws InvalidGdlSchemaException, ExecutionException{
+ super(tmRepresentative, receivedData, gdlParent);
}
@@ -70,7 +70,7 @@
if(ancestor == null || current == null) throw new ExecutionException("to append \"" + TmHelper.getAnyIdOfTopic(current) + "\" on \"" + TmHelper.getAnyIdOfTopic(ancestor) + "\" both topics must be present");
GdlPosition position = new GdlPosition(TmHelper.getPositionOf(ancestor, current));
- GdlVisibleObject newObj = GdlInstantiator.instantiate(current, this.receivedData);
+ GdlVisibleObject newObj = GdlInstantiator.instantiate(current, this.receivedData, this);
GdlVisibleObject oldObj = null;
for (Widget widget : super.subElements){
if(((GdlVisibleObject)widget).getTmRepresentative().equals(ancestor)){