Subversion Repositories eFlore/Archives.cel-v1

Rev

Rev 11 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11 Rev 12
1
/*
1
/*
2
 * Copyright 2006 Google Inc.
2
 * Copyright 2006 Google Inc.
3
 * 
3
 * 
4
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
4
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5
 * use this file except in compliance with the License. You may obtain a copy of
5
 * use this file except in compliance with the License. You may obtain a copy of
6
 * the License at
6
 * the License at
7
 * 
7
 * 
8
 * http://www.apache.org/licenses/LICENSE-2.0
8
 * http://www.apache.org/licenses/LICENSE-2.0
9
 * 
9
 * 
10
 * Unless required by applicable law or agreed to in writing, software
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13
 * License for the specific language governing permissions and limitations under
13
 * License for the specific language governing permissions and limitations under
14
 * the License.
14
 * the License.
15
 */
15
 */
16
package org.tela_botanica.client;
16
package org.tela_botanica.client;
17
 
17
 
18
import com.google.gwt.user.client.ui.Composite;
18
import com.google.gwt.user.client.ui.Composite;
19
import com.google.gwt.user.client.ui.DockPanel;
-
 
20
import com.google.gwt.user.client.ui.HTML;
19
import com.google.gwt.user.client.ui.HTML;
21
import com.google.gwt.user.client.ui.HorizontalPanel;
20
import com.google.gwt.user.client.ui.HorizontalPanel;
22
import com.google.gwt.user.client.ui.VerticalPanel;
21
import com.google.gwt.user.client.ui.VerticalPanel;
23
 
22
 
24
/**
23
/**
25
 * Composite permet de wrapper des Widget pour creer un nouveau Widget cf methode initWidget()
24
 * Composite permet de wrapper des Widget pour creer un nouveau Widget cf methode initWidget()
26
 */
25
 */
27
 
26
 
28
public class TopPanel extends Composite {
27
public class TopPanel extends Composite {
29
	
-
 
30
  private NameAssistant nameAssistant = null;
-
 
31
  private LocationAssistant locationAssistant = null;
-
 
32
 
-
 
33
  public TopPanel(final Mediator mediator) {
-
 
34
	  
-
 
35
	  
-
 
36
   VerticalPanel outer = new VerticalPanel();
-
 
37
    
-
 
38
   VerticalPanel inner = new VerticalPanel();
-
 
39
    
-
 
40
 
-
 
41
	nameAssistant = new NameAssistant(mediator);
-
 
42
	locationAssistant = new LocationAssistant(mediator);
-
 
43
	
-
 
44
	DockPanel namePanel = new DockPanel();
-
 
45
	DockPanel locationPanel = new DockPanel();
-
 
46
	       
-
 
47
     HTML labelNameAssistant = new HTML("Nom: ");
-
 
48
     namePanel.add(labelNameAssistant,DockPanel.WEST);
-
 
49
     namePanel.add (nameAssistant,DockPanel.CENTER);
-
 
50
	 
-
 
51
	 nameAssistant.setWidth("100%");
-
 
52
	 namePanel.setCellWidth(labelNameAssistant,"7%");
-
 
53
	 namePanel.setCellWidth(nameAssistant,"93%");
-
 
54
	 namePanel.setWidth("50%");
-
 
55
 
-
 
56
	 
-
 
57
     HTML labelLocationAssistant= new HTML("Lieu: ");
-
 
58
     locationPanel.add(labelLocationAssistant,DockPanel.WEST);
-
 
59
     locationPanel.add (locationAssistant,DockPanel.CENTER);
-
 
60
	 
-
 
61
	 locationAssistant.setWidth("100%");
-
 
62
	 locationPanel.setCellWidth(locationAssistant,"7%");
-
 
63
	 locationPanel.setCellWidth(locationAssistant,"93%");
-
 
64
	 locationPanel.setWidth("50%");
-
 
65
	 
-
 
66
	 inner.add(namePanel);
28
 
67
	 inner.add(locationPanel);
-
 
-
 
29
	
68
	
30
	
-
 
31
  public TopPanel(final Mediator med) {
69
	 inner.setCellWidth(namePanel,"50%");
32
	 
70
	 inner.setCellWidth(locationPanel,"50%");
33
   
71
 
34
   VerticalPanel outer = new VerticalPanel();
72
 
35
   
73
		
36
    
74
	outer.setHorizontalAlignment(HorizontalPanel.ALIGN_RIGHT);
37
	outer.setHorizontalAlignment(HorizontalPanel.ALIGN_RIGHT);
75
 
38
 
76
	 outer.add(new HTML("<b>Carnet en ligne</b>"));
39
	 outer.add(new HTML("<b>Carnet en ligne</b>"));
77
 
-
 
78
	 outer.setHorizontalAlignment(HorizontalPanel.ALIGN_LEFT);
-
 
79
 
-
 
80
	 outer.add(inner);
-
 
81
 
-
 
82
	 inner.setWidth("100%");
40
 
83
 
41
 
84
 
42
 
85
    initWidget(outer);
43
    initWidget(outer);
86
  }
44
  }
87
 
45
 
88
}
46
}