Changeset 949 for branches


Ignore:
Timestamp:
09/21/11 10:08:03 (14 years ago)
Author:
lgiessmann
Message:

gdl-frontend: Widgets: fixed some bugs in the GdlWebPage? class

Location:
branches/gdl-frontend/src/anaToMia/GDL_Widgets
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/DeleteCallback.java

    r948 r949  
    3636        private final String TM_SPARQL_QUERY_PART_2 = ".\n}";
    3737        private GdlWebPage gdlWebPage = null;
    38         private HashObjectPsiContainer hashObjectPsiContainer = new HashObjectPsiContainer(null);
     38        private HashObjectPsiContainer hashObjectPsiContainer = new HashObjectPsiContainer();
    3939       
    4040       
     
    124124                        }
    125125                        DeleteCallback.this.gdlWebPage.removeLoadScreenPanel();
    126                        
    127                        
    128                        
    129                         // TODO: check the user's input
    130                         // TODO: delete all hash-objects
    131                         // TODO: delete the environment
    132126                }
    133127               
  • TabularUnified branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/GdlWebPage.java

    r948 r949  
    7979        public void resetPage() {
    8080                this.removeLoadScreenPanel();
    81                 if(gdlPanel != null) this.gdlPanel.removeFromParent();
     81                if(this.hashObjectPsicontainer != null) this.hashObjectPsicontainer.removeFromParent();
     82                if(this.gdlPanel != null) this.gdlPanel.removeFromParent();
    8283                if(this.psiContainer != null) this.psiContainer.removeFromParent();
    8384                if(this.createNewButton != null) this.createNewButton.removeFromParent();
     
    102103        public void setGdlPanel(GdlPanel gdlPanel){
    103104                if(this.gdlPanel != null) this.gdlPanel.removeFromParent();
     105                if(this.hashObjectPsicontainer != null) this.hashObjectPsicontainer.removeFromParent();
    104106                this.gdlPanel = gdlPanel;
    105107                if(this.gdlPanel != null) this.contentPanel.add(this.gdlPanel);
  • TabularUnified branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/HashObjectPsiContainer.java

    r948 r949  
    44
    55import java.util.ArrayList;
     6
     7import com.google.gwt.event.dom.client.ClickEvent;
    68import com.google.gwt.event.dom.client.ClickHandler;
     9import com.google.gwt.user.client.Window;
    710import com.google.gwt.user.client.ui.Button;
    811import com.google.gwt.user.client.ui.CheckBox;
     
    1619        private ArrayList<CheckBox> psiCheckBoxes = new ArrayList<CheckBox>();
    1720        private VerticalPanel containerPanel = new VerticalPanel();
    18         private Button commitButton = new Button("delete");
     21        private Button commitButton = new Button("delete the Environment topic and all its Hash-Object topics");
     22        private final String ERROR_STYLE_CLASS = "bad_input";
    1923       
    2024       
    21         private HashObjectPsiContainer(){
     25        public HashObjectPsiContainer(){
    2226                this.initWidget(this.containerPanel);
    2327                this.containerPanel.add(this.commitButton);
    24         }
    25        
    26        
    27         public HashObjectPsiContainer(ClickHandler buttonClikcHandler){
    28                 this();
    29                
    30                 if(buttonClikcHandler != null) this.commitButton.addClickHandler(buttonClikcHandler);
     28                this.commitButton.addClickHandler(new HashObjectPsiContainerClickHandler());
    3129        }
    3230       
     
    5149                this.containerPanel.insert(this.commitButton, this.containerPanel.getWidgetCount());
    5250        }
     51       
     52       
     53        private class HashObjectPsiContainerClickHandler implements ClickHandler {
     54                public HashObjectPsiContainerClickHandler(){}
     55               
     56               
     57                @Override
     58                public void onClick(ClickEvent event) {
     59                        boolean allValuesChecked = true;
     60                        for (CheckBox cbx : HashObjectPsiContainer.this.psiCheckBoxes) {
     61                                if(!cbx.getValue()){
     62                                        cbx.addStyleName(HashObjectPsiContainer.this.ERROR_STYLE_CLASS);
     63                                        allValuesChecked = false;
     64                                }
     65                        }
     66                       
     67                        if(!allValuesChecked){
     68                                Window.alert("to delete the an environment topic, please select explicit all associated hash-object topics to be deleted!");
     69                        } else {
     70                                // TODO: delete all hash-objects
     71                                // TODO: delete the environment
     72                        }
     73                }
     74        }
    5375}
  • TabularUnified branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/GDL_Widgets.css

    r920 r949  
    7272  margin-bottom: 2em;
    7373}
     74
     75
     76.bad_input {
     77  color: red;   
     78}
Note: See TracChangeset for help on using the changeset viewer.