Subversion Repositories eFlore/Archives.cel-v1

Rev

Rev 12 | Rev 14 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12 Rev 13
Line 22... Line 22...
22
		private DateList dateList = null;
22
		private DateList dateList = null;
23
		private NameAssistant nameAssistant=null;
23
		private NameAssistant nameAssistant=null;
24
		private LocationAssistant locationAssistant=null;
24
		private LocationAssistant locationAssistant=null;
25
		private InventoryItem inventoryItem=null;
25
		private InventoryItem inventoryItem=null;
26
		private EntryPanel entryPanel=null;
26
		private EntryPanel entryPanel=null;
-
 
27
		private ActionPanel actionPanel=null;
-
 
28
		private SearchPanel searchPanel=null;
Line 27... Line 29...
27
		
29
		
28
		private TextBox date = null; 
30
		private TextBox date = null; 
29
		private TextBox complementLocation = null; 
31
		private TextBox complementLocation = null; 
Line 61... Line 63...
61
			this.onLocationSelected("all");
63
			this.onLocationSelected("all");
Line 62... Line 64...
62
			
64
			
Line 63... Line -...
63
		}
-
 
Line -... Line 65...
-
 
65
		}
-
 
66
		
-
 
67
		
-
 
68
		
-
 
69
		/**
-
 
70
		 * Action sur selection d'une observation : affichage du detail
-
 
71
		 */
64
		
72
		
-
 
73
		public void onInventoryItemSelected(String ordre) {
-
 
74
		
-
 
75
			entryPanel.setOrdre(ordre);
-
 
76
			entryPanel.update();
-
 
77
			
-
 
78
			
-
 
79
		}
-
 
80
 
-
 
81
		
-
 
82
		/**
-
 
83
		 * Action sur selection d'un lieu : affichage de la liste des taxons correspondants
-
 
84
		 */
-
 
85
		
-
 
86
		public void onSearch(String search) {
-
 
87
	
-
 
88
			if (search.trim().compareTo("")==0) {
-
 
89
				search="all";
65
 
90
			}
Line -... Line 91...
-
 
91
			inventoryItemList.setSearch(search);
-
 
92
			inventoryItemList.updateCount();
66
		public void onEntryClick() {
93
			
67
			
94
		}
68
			this.entryPanel.show();
95
 
Line 69... Line 96...
69
		}
96
		
Line 70... Line 97...
70
		
97
		
71
		/**
98
		/**
72
		 * Action sur selection d'un lieu : affichage de la liste des taxons correspondants
99
		 * Action sur selection d'un lieu : affichage de la liste des taxons correspondants
Line 73... Line -...
73
		 */
-
 
Line 74... Line 100...
74
		
100
		 */
75
		public void onLocationSelected(String loc) {
101
		
76
		
102
		public void onLocationSelected(String loc) {
77
			inventoryItemList.setLocation(loc);
103
		
78
			inventoryItemList.setDate("all");
104
			inventoryItemList.setLocation(loc);
79
			inventoryItemList.updateCount();
105
			inventoryItemList.setDate("all");
Line 80... Line 106...
80
			
106
			inventoryItemList.updateCount();
Line 81... Line -...
81
			if (entryPanel!=null) {
-
 
82
			
-
 
Line 83... Line 107...
83
				if ((loc.compareTo("000null")==0) || (loc.compareTo("all")==0)) {
107
			
84
					locationAssistant.setText("");
108
			
85
				}
109
			if ((loc.compareTo("000null")==0) || (loc.compareTo("all")==0)) {
Line 100... Line 124...
100
 
124
 
101
			inventoryItemList.setDate(date);
125
			inventoryItemList.setDate(date);
Line 102... Line 126...
102
			inventoryItemList.updateCount();
126
			inventoryItemList.updateCount();
103
 
-
 
Line 104... Line 127...
104
			/*
127
 
105
			if (entryPanel!=null) {
128
			/*
106
			
129
			
107
				if ((loc.compareTo("000null")==0) || (loc.compareTo("all")==0)) {
130
				if ((loc.compareTo("000null")==0) || (loc.compareTo("all")==0)) {
108
					locationAssistant.setText("");
131
					locationAssistant.setText("");
109
				}
132
				}
Line 110... Line -...
110
				else {
-
 
111
					locationAssistant.setText(loc);
133
				else {
Line 112... Line 134...
112
				}
134
					locationAssistant.setText(loc);
Line 149... Line 171...
149
		 */
171
		 */
Line 150... Line 172...
150
		
172
		
Line 151... Line 173...
151
		public void onAddInventoryItem() {
173
		public void onAddInventoryItem() {
152
		
174
		
153
			// TODO : singleton ?
175
			// TODO : singleton ?
Line 154... Line 176...
154
			registerInventoryItem(new InventoryItem(nameAssistant.getText(),nameAssistant.getValue(),locationAssistant.getText(),locationAssistant.getValue(),date.getText(),complementLocation.getText(),comment.getText()));
176
			registerInventoryItem(new InventoryItem(nameAssistant.getText(),nameAssistant.getValue(),locationAssistant.getText(),locationAssistant.getValue(),date.getText(),complementLocation.getText(),comment.getText(),"null"));
Line -... Line 177...
-
 
177
			inventoryItemList.addelement();
-
 
178
			
-
 
179
		}
-
 
180
 
-
 
181
		
-
 
182
		/**
-
 
183
		 * Action prealable à la modification d'une observation : controle presence champs requis et lancement mise a jour 
-
 
184
		 * 
-
 
185
		 */
-
 
186
 
-
 
187
		public void onModifyInventoryItem(String ordre) {
-
 
188
 
-
 
189
		// TODO : singleton ?
Line 155... Line 190...
155
			inventoryItemList.addelement();
190
		registerInventoryItem(new InventoryItem(nameAssistant.getText(),nameAssistant.getValue(),locationAssistant.getText(),locationAssistant.getValue(),date.getText(),complementLocation.getText(),comment.getText(),ordre));
156
			
191
		inventoryItemList.updateElement();
Line 157... Line 192...
157
		}
192
 
Line 277... Line 312...
277
	    public void  registerEntryPanel(EntryPanel entryPanel) {
312
	    public void  registerEntryPanel(EntryPanel entryPanel) {
278
	    	this.entryPanel=entryPanel;
313
	    	this.entryPanel=entryPanel;
279
		}
314
		}
Line -... Line 315...
-
 
315
 
-
 
316
	    
-
 
317
		
-
 
318
	    public void  registerActionPanel(ActionPanel actionPanel) {
-
 
319
	    	this.actionPanel=actionPanel;
-
 
320
		}
-
 
321
 
-
 
322
	
-
 
323
		
-
 
324
	    public void  registerSearchPanel(SearchPanel searchPanel) {
-
 
325
	    	this.searchPanel=searchPanel;
-
 
326
		}
280
 
327
 
281
		
328
 
282
		/**
329
		/**
283
		 * Declaration commentaire 
330
		 * Declaration commentaire