Author: lgiessmann Date: Thu Sep 22 04:41:54 2011 New Revision: 959
Log: gdl-frontend: Widgets: added a "wait-screen" whenthe user is committing data., so it is ensured that a button can be clicked only once during one operation
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/CommitCallback.java branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/GdlWebPage.java
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/CommitCallback.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/CommitCallback.java Wed Sep 21 07:22:50 2011 (r958) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/CommitCallback.java Thu Sep 22 04:41:54 2011 (r959) @@ -36,19 +36,29 @@ public final String DELETE_REUQEST_URL = IsidorusConstants.DELETE_REQUEST_URL; public final String COMMIT_REQUEST_URL = IsidorusConstants.COMMIT_REQUEST_URL; public final String GET_REQUEST_URL = IsidorusConstants.GET_FRAGMENT_REQUEST_URL; + private GdlWebPage gdlWebPage = null; - public CommitCallback(){} + @SuppressWarnings("unused") + private CommitCallback(){} + + + public CommitCallback(GdlWebPage gdlWebPage){ + this.gdlWebPage = gdlWebPage; + } @Override public void commitTmConstruct(ArrayList<Pair<Construct, TopicMapsTypes>> constructs, String buttonId, TmEngine tmEngine) { try{ if("creator_hash_object_commit_button_id".equals(buttonId)){ + if(this.gdlWebPage != null) this.gdlWebPage.createLoadScreenPanel("Committing Data", "committing the currently created Hash-Object topic to " + this.COMMIT_REQUEST_URL); this.commitCreatedHashObject(constructs, tmEngine, false); }else if("editor_hash_object_commit_button_id".equals(buttonId)){ + if(this.gdlWebPage != null) this.gdlWebPage.createLoadScreenPanel("Updating Data", "updating the currently changed Hash-Object topic on " + this.COMMIT_REQUEST_URL); this.commitCreatedHashObject(constructs, tmEngine, true); } else if("environment_commit_button_id".equals(buttonId)){ + if(this.gdlWebPage != null) this.gdlWebPage.createLoadScreenPanel("Committing Data", "committing the currently created Environment topic to " + this.COMMIT_REQUEST_URL); this.commitCreatedEnvironment(constructs, tmEngine); } }catch(Exception e){
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/GdlWebPage.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/GdlWebPage.java Wed Sep 21 07:22:50 2011 (r958) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/GdlWebPage.java Thu Sep 22 04:41:54 2011 (r959) @@ -168,7 +168,7 @@ GdlPanel gdlPanel = new GdlPanel(null, topicsToCreate, 362, 160); gdlPanel.setTmEngine(new JtmsTmEngine()); gdlPanel.setLoadSchemaCallback(new LoadSchemaCallback(GdlWebPage.this)); - gdlPanel.setCommitCallback(new CommitCallback()); + gdlPanel.setCommitCallback(new CommitCallback(GdlWebPage.this)); gdlPanel.setDeleteCallback(new DeleteCallback(GdlWebPage.this)); gdlPanel.addStyleName(GdlWebPage.this.GDL_PANEL_STYLE_NAME); GdlWebPage.this.setGdlPanel(gdlPanel); @@ -192,7 +192,7 @@ GdlPanel gdlPanel = new GdlPanel(new Pair<String, TopicIdentifierTypes>(source.getText(), TopicIdentifierTypes.SubjectIdentifier), null, 362, 160); gdlPanel.setTmEngine(new JtmsTmEngine()); gdlPanel.setLoadSchemaCallback(new LoadSchemaCallback(GdlWebPage.this)); - gdlPanel.setCommitCallback(new CommitCallback()); + gdlPanel.setCommitCallback(new CommitCallback(GdlWebPage.this)); gdlPanel.setDeleteCallback(new DeleteCallback(GdlWebPage.this)); GdlWebPage.this.setGdlPanel(gdlPanel); gdlPanel.loadSchema();