Subversion Repositories eFlore/Archives.cel-v1

Compare Revisions

Problem with comparison.

Ignore whitespace Rev HEAD → Rev 11

/trunk/src/org/tela_botanica/client/TopPanel.java
New file
0,0 → 1,88
/*
* Copyright 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package org.tela_botanica.client;
 
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.DockPanel;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
 
/**
* Composite permet de wrapper des Widget pour creer un nouveau Widget cf methode initWidget()
*/
 
public class TopPanel extends Composite {
private NameAssistant nameAssistant = null;
private LocationAssistant locationAssistant = null;
 
public TopPanel(final Mediator mediator) {
VerticalPanel outer = new VerticalPanel();
VerticalPanel inner = new VerticalPanel();
 
nameAssistant = new NameAssistant(mediator);
locationAssistant = new LocationAssistant(mediator);
DockPanel namePanel = new DockPanel();
DockPanel locationPanel = new DockPanel();
HTML labelNameAssistant = new HTML("Nom: ");
namePanel.add(labelNameAssistant,DockPanel.WEST);
namePanel.add (nameAssistant,DockPanel.CENTER);
nameAssistant.setWidth("100%");
namePanel.setCellWidth(labelNameAssistant,"7%");
namePanel.setCellWidth(nameAssistant,"93%");
namePanel.setWidth("50%");
 
HTML labelLocationAssistant= new HTML("Lieu: ");
locationPanel.add(labelLocationAssistant,DockPanel.WEST);
locationPanel.add (locationAssistant,DockPanel.CENTER);
locationAssistant.setWidth("100%");
locationPanel.setCellWidth(locationAssistant,"7%");
locationPanel.setCellWidth(locationAssistant,"93%");
locationPanel.setWidth("50%");
inner.add(namePanel);
inner.add(locationPanel);
inner.setCellWidth(namePanel,"50%");
inner.setCellWidth(locationPanel,"50%");
 
 
outer.setHorizontalAlignment(HorizontalPanel.ALIGN_RIGHT);
 
outer.add(new HTML("<b>Carnet en ligne</b>"));
 
outer.setHorizontalAlignment(HorizontalPanel.ALIGN_LEFT);
 
outer.add(inner);
 
inner.setWidth("100%");
 
 
initWidget(outer);
}
 
}