comparison flys-client/src/main/java/de/intevation/flys/client/client/FLYS.java @ 4603:7b8063c2d589

Use the FLYSHeader instead of the MainMenu The MainMenu is obsolete now and got completely replaced by the FLYSHeader.
author Björn Ricks <bjoern.ricks@intevation.de>
date Fri, 30 Nov 2012 09:59:07 +0100
parents 16c19d4f1833
children 488db475613d
comparison
equal deleted inserted replaced
4602:33bb8bf3899a 4603:7b8063c2d589
29 import de.intevation.flys.client.client.services.UserServiceAsync; 29 import de.intevation.flys.client.client.services.UserServiceAsync;
30 import de.intevation.flys.client.client.ui.CollectionView; 30 import de.intevation.flys.client.client.ui.CollectionView;
31 import de.intevation.flys.client.client.ui.FLYSHeader; 31 import de.intevation.flys.client.client.ui.FLYSHeader;
32 import de.intevation.flys.client.client.ui.FLYSView; 32 import de.intevation.flys.client.client.ui.FLYSView;
33 import de.intevation.flys.client.client.ui.FLYSWorkspace; 33 import de.intevation.flys.client.client.ui.FLYSWorkspace;
34 import de.intevation.flys.client.client.ui.MainMenu;
35 import de.intevation.flys.client.client.ui.ProjectList; 34 import de.intevation.flys.client.client.ui.ProjectList;
36 import de.intevation.flys.client.shared.model.Artifact; 35 import de.intevation.flys.client.shared.model.Artifact;
37 import de.intevation.flys.client.shared.model.Collection; 36 import de.intevation.flys.client.shared.model.Collection;
38 import de.intevation.flys.client.shared.model.CollectionItem; 37 import de.intevation.flys.client.shared.model.CollectionItem;
39 import de.intevation.flys.client.shared.model.River; 38 import de.intevation.flys.client.shared.model.River;
75 74
76 /** The CreateCollectionServiceAsync used to create a new collection */ 75 /** The CreateCollectionServiceAsync used to create a new collection */
77 protected CreateCollectionServiceAsync collectionService = 76 protected CreateCollectionServiceAsync collectionService =
78 GWT.create(CreateCollectionService.class); 77 GWT.create(CreateCollectionService.class);
79 78
80 /** The menu bar at the top of the application. */ 79 /** The content window. It takes the whole space beneath the header. */
81 protected MainMenu menu;
82
83 /** The content window. It takes the whole space beneath the menu bar. */
84 protected FLYSView view; 80 protected FLYSView view;
85 81
86 /** The project list that displays the projects of the user. */ 82 /** The project list that displays the projects of the user. */
87 protected ProjectList projectList; 83 protected ProjectList projectList;
88 84
95 /** The list of rivers supported by the server. */ 91 /** The list of rivers supported by the server. */
96 protected River[] rivers; 92 protected River[] rivers;
97 93
98 /** This list is used to track the opened projects. */ 94 /** This list is used to track the opened projects. */
99 protected List<String> openProjects; 95 protected List<String> openProjects;
96
97 private FLYSHeader header;
100 98
101 99
102 public static String getExceptionString(FLYSConstants msg, Throwable caught) { 100 public static String getExceptionString(FLYSConstants msg, Throwable caught) {
103 try { 101 try {
104 return msg.getString(caught.getMessage()); 102 return msg.getString(caught.getMessage());
129 VLayout vertical = new VLayout(); 127 VLayout vertical = new VLayout();
130 vertical.setLayoutMargin(1); 128 vertical.setLayoutMargin(1);
131 vertical.setWidth100(); 129 vertical.setWidth100();
132 vertical.setHeight100(); 130 vertical.setHeight100();
133 131
134 menu = new MainMenu(this);
135 view = new FLYSView(); 132 view = new FLYSView();
136 133 header = new FLYSHeader(this);
137 vertical.addMember(new FLYSHeader()); 134
138 vertical.addMember(menu); 135 vertical.addMember(header);
139 vertical.addMember(view); 136 vertical.addMember(view);
140 137
141 vertical.draw(); 138 vertical.draw();
142 139
143 initConfiguration(); 140 initConfiguration();
156 @Override 153 @Override
157 public void onSuccess(User user) { 154 public void onSuccess(User user) {
158 GWT.log("Found a user. Set '"+ user.getName() + "'"); 155 GWT.log("Found a user. Set '"+ user.getName() + "'");
159 setCurrentUser(user); 156 setCurrentUser(user);
160 157
161 menu.setCurrentUser(user); 158 header.setCurrentUser(user);
162 159
163 projectList = new ProjectList(FLYS.this, user); 160 projectList = new ProjectList(FLYS.this, user);
164 workspace = new FLYSWorkspace(); 161 workspace = new FLYSWorkspace();
165 view.setProjectList(projectList); 162 view.setProjectList(projectList);
166 view.setFLYSWorkspace(workspace); 163 view.setFLYSWorkspace(workspace);

http://dive4elements.wald.intevation.org