24,6 → 24,8 |
private LocationAssistant locationAssistant=null; |
private InventoryItem inventoryItem=null; |
private EntryPanel entryPanel=null; |
private ActionPanel actionPanel=null; |
private SearchPanel searchPanel=null; |
|
private TextBox date = null; |
private TextBox complementLocation = null; |
62,12 → 64,37 |
|
} |
|
|
|
/** |
* Action sur selection d'une observation : affichage du detail |
*/ |
|
public void onInventoryItemSelected(String ordre) { |
|
entryPanel.setOrdre(ordre); |
entryPanel.update(); |
|
|
} |
|
public void onEntryClick() { |
|
/** |
* Action sur selection d'un lieu : affichage de la liste des taxons correspondants |
*/ |
|
public void onSearch(String search) { |
|
if (search.trim().compareTo("")==0) { |
search="all"; |
} |
inventoryItemList.setSearch(search); |
inventoryItemList.updateCount(); |
|
this.entryPanel.show(); |
} |
|
|
|
/** |
* Action sur selection d'un lieu : affichage de la liste des taxons correspondants |
*/ |
78,16 → 105,13 |
inventoryItemList.setDate("all"); |
inventoryItemList.updateCount(); |
|
if (entryPanel!=null) { |
|
if ((loc.compareTo("000null")==0) || (loc.compareTo("all")==0)) { |
locationAssistant.setText(""); |
} |
else { |
locationAssistant.setText(loc); |
} |
|
if ((loc.compareTo("000null")==0) || (loc.compareTo("all")==0)) { |
locationAssistant.setText(""); |
} |
else { |
locationAssistant.setText(loc); |
} |
|
} |
|
102,7 → 126,6 |
inventoryItemList.updateCount(); |
|
/* |
if (entryPanel!=null) { |
|
if ((loc.compareTo("000null")==0) || (loc.compareTo("all")==0)) { |
locationAssistant.setText(""); |
111,7 → 134,6 |
locationAssistant.setText(loc); |
} |
|
} |
*/ |
|
} |
151,12 → 173,25 |
public void onAddInventoryItem() { |
|
// TODO : singleton ? |
registerInventoryItem(new InventoryItem(nameAssistant.getText(),nameAssistant.getValue(),locationAssistant.getText(),locationAssistant.getValue(),date.getText(),complementLocation.getText(),comment.getText())); |
registerInventoryItem(new InventoryItem(nameAssistant.getText(),nameAssistant.getValue(),locationAssistant.getText(),locationAssistant.getValue(),date.getText(),complementLocation.getText(),comment.getText(),"null")); |
inventoryItemList.addelement(); |
|
} |
|
|
/** |
* Action prealable à la modification d'une observation : controle presence champs requis et lancement mise a jour |
* |
*/ |
|
public void onModifyInventoryItem(String ordre) { |
|
// TODO : singleton ? |
registerInventoryItem(new InventoryItem(nameAssistant.getText(),nameAssistant.getValue(),locationAssistant.getText(),locationAssistant.getValue(),date.getText(),complementLocation.getText(),comment.getText(),ordre)); |
inventoryItemList.updateElement(); |
|
} |
|
|
public boolean inventoryItemIsValid() { |
// TODO : controle date |
278,7 → 313,19 |
this.entryPanel=entryPanel; |
} |
|
|
|
public void registerActionPanel(ActionPanel actionPanel) { |
this.actionPanel=actionPanel; |
} |
|
|
|
public void registerSearchPanel(SearchPanel searchPanel) { |
this.searchPanel=searchPanel; |
} |
|
|
/** |
* Declaration commentaire |
* @param commentaire |