/trunk/src/org/tela_botanica/client/InfoPopup.java |
---|
File deleted |
/trunk/src/org/tela_botanica/client/ImportDialog.java |
---|
80,7 → 80,7 |
// Validation bouton |
HTML okButton=new HTML("Oui"); |
HTML okButton=new HTML("Ok"); |
okButton.setStyleName("html_button"); |
okButton.addClickListener( |
new ClickListener() { |
93,7 → 93,7 |
// Annulation |
HTML cancelButton=new HTML("Non"); |
HTML cancelButton=new HTML("Annuler"); |
cancelButton.setStyleName("html_button"); |
cancelButton.addClickListener( |
new ClickListener() { |
160,9 → 160,6 |
/* +--Fin du code ---------------------------------------------------------------------------------------+ |
* $Log$ |
* Revision 1.1 2007-05-21 18:14:06 ddelon |
* Gestion importation releve locaux |
* |
* Revision 1.7 2007-05-21 11:47:30 ddelon |
* meta cvs |
* |
/trunk/src/org/tela_botanica/client/ActionPanel.java |
---|
30,8 → 30,8 |
public class ActionPanel extends Composite { |
private Mediator mediator=null; |
private HTML exportButton=null; |
Mediator mediator=null; |
public ActionPanel(final Mediator med) { |
38,8 → 38,6 |
mediator=med; |
mediator.registerActionPanel(this); |
HorizontalPanel outer = new HorizontalPanel(); |
HorizontalPanel buttons = new HorizontalPanel(); |
buttons.setSpacing(3); |
82,13 → 80,12 |
// Export de la totalité |
exportButton=new HTML("<a href=\""+mediator.getServiceBaseUrl()+"/InventoryExport/" |
+ mediator.getUser() + |
"\">"+"Export tableur</a>"); |
HTML exportButton=new HTML("<a href=\""+mediator.getServiceBaseUrl()+"/InventoryExport/" +mediator.getUser()+"\">"+"Tout exporter</a>"); |
buttons.add(exportButton); |
exportButton.setStyleName("html_button"); |
// Selections de l'affichage |
HorizontalPanel selections = new HorizontalPanel(); |
136,9 → 133,4 |
} |
public HTML getExportButton() { |
return exportButton; |
} |
} |
/trunk/src/org/tela_botanica/client/AutoCompleteAsyncTextBoxListenerCollection.java |
---|
3,13 → 3,11 |
import java.util.Iterator; |
import java.util.Vector; |
import com.google.gwt.user.client.ResponseTextHandler; |
public class AutoCompleteAsyncTextBoxListenerCollection extends Vector { |
private static final long serialVersionUID = -2767605614048989439L; |
/** |
* Fires a Text enter event to all listeners. |
* Fires a cellClicked event to all listeners. |
* |
* @param sender the widget sending the event |
* @param text the text sent |
20,19 → 18,4 |
listener.onValidate(sender, text, value); |
} |
} |
/** |
* Fires a Text complete event to all listeners. |
* |
* @param sender the widget sending the event |
* @param text the text sent |
*/ |
public void fireTextBoxComplete(ResponseTextHandler sender, String text, String value) { |
for (Iterator it = iterator(); it.hasNext();) { |
AutoCompleteAsyncTextBoxListener listener = (AutoCompleteAsyncTextBoxListener) it.next(); |
listener.onComplete(sender, text, value); |
} |
} |
} |
/trunk/src/org/tela_botanica/client/Cel.java |
---|
23,7 → 23,6 |
private EntryPanel entryPanel = null; |
private ActionPanel actionPanel = null; |
private SearchPanel searchPanel = null; |
private InfoPopup infoPopup = null; |
private VerticalPanel rightPanel = null; |
private Mediator mediator = null; |
47,7 → 46,6 |
centerPanel = new CenterPanel(mediator); |
topPanel = new TopPanel(mediator); |
leftPanel = new LeftPanel(mediator); |
57,8 → 55,6 |
actionPanel = new ActionPanel(mediator); |
searchPanel = new SearchPanel(mediator); |
rightPanel = new VerticalPanel(); |
infoPopup = new InfoPopup(mediator); |
// Information haut de page (nom application, connexion ... etc). |
// A regler |
104,9 → 100,10 |
mediator.onInit(); |
RootPanel.get().add(outer); |
// Call the window resized handler to get the initial sizes setup. Doing |
// this in a deferred command causes it to occur after all widgets' sizes |
// have been computed by the browser. |
/trunk/src/org/tela_botanica/client/Mediator.java |
---|
27,10 → 27,7 |
private LocationAssistant locationAssistant=null; |
private InventoryItem inventoryItem=null; |
private EntryPanel entryPanel=null; |
private ActionPanel actionPanel=null; |
private TopPanel topPanel=null; |
private LeftPanel leftPanel=null; |
private InfoPopup infoPopup=null; |
private TextBox date = null; |
private TextBox complementLocation = null; |
127,17 → 124,15 |
public void onLocationSelected(String loc) { |
inventoryItemList.setLocation(loc); |
// inventoryItemList.setDate("all"); |
// inventoryItemList.setStation("all"); |
inventoryItemList.setDate("all"); |
inventoryItemList.setStation("all"); |
inventoryItemList.updateCount(); |
// nameAssistant.setValue(null); |
dateList.setLocation(loc); |
// dateList.setDate("all"); |
dateList.setDate("all"); |
dateList.updateCount(); |
stationList.setLocation(loc); |
// stationList.setStation("all"); |
stationList.setStation("all"); |
stationList.updateCount(); |
} |
190,9 → 185,7 |
inventoryItemList.setStation(station); |
inventoryItemList.updateCount(); |
// nameAssistant.setValue(null); |
} |
206,21 → 199,12 |
inventoryItemList.setDate(date); |
inventoryItemList.updateCount(); |
// nameAssistant.setValue(null); |
} |
/** |
* Action suivant la complétion d'un nom |
* |
*/ |
public void onNameCompleted(String value) { |
infoPopup.setImageUrl(value); |
} |
/** |
* Action prealable à l'ajout d'une observation : controle presence champs requis et lancement mise a jour |
* |
309,18 → 293,6 |
/** |
* Declaration InfoPopup |
* @param infoPopup |
*/ |
public void registerInfoPopup(InfoPopup infoPopup) { |
this.infoPopup=infoPopup; |
} |
/** |
* Declaration StationList |
* @param locationList |
*/ |
393,12 → 365,8 |
} |
public void registerActionPanel(ActionPanel actionPanel) { |
this.actionPanel=actionPanel; |
} |
public void registerTopPanel(TopPanel topPanel) { |
this.topPanel=topPanel; |
} |
416,17 → 384,7 |
} |
/* Panneau gauche |
* |
*/ |
public void registerLeftPanel(LeftPanel leftPanel) { |
this.leftPanel=leftPanel; |
} |
/** |
* Recherche distante et asynchrone de l'utilisateur connecté, en retour lancement methode initialisation |
525,14 → 483,6 |
} |
public LeftPanel getLeftPanel() { |
return leftPanel; |
} |
public InfoPopup getInfoPopup() { |
return infoPopup; |
} |
public void setConnected(boolean connected) { |
this.connected=connected; |
543,10 → 493,5 |
return this.connected; |
} |
public ActionPanel getActionPanel() { |
return this.actionPanel; |
} |
} |
/trunk/src/org/tela_botanica/client/InventoryItemList.java |
---|
135,9 → 135,7 |
} |
private static final int VISIBLE_TAXON_COUNT = 15; |
private Grid header = new Grid(1, 3); |
private FlexTable table = new FlexTable(); |
221,13 → 219,12 |
}); |
//updateCount(); |
// update() |
initWidget(panel); |
} |
256,22 → 253,6 |
} |
/** |
* Action lancee par la completion d'un nom dans l'assistant de saisie |
* Recherche d'information complémentaires .... |
* |
* @return void |
*/ |
public void onComplete(ResponseTextHandler sender, String str, String value) { |
if (sender instanceof NameAssistant) { |
mediator.onNameCompleted(value); |
} |
} |
/** |
284,14 → 265,9 |
public void onValidate(SourcesAutoCompleteAsyncTextBoxEvents sender, |
String str, String value) { |
if (mediator.getEntryPanel().getOrdre()==null) { |
mediator.onAddInventoryItem(); |
} |
else { |
mediator.onModifyInventoryItem(mediator.getEntryPanel().getOrdre()); |
mediator.getEntryPanel().setOrdre(null); |
} |
mediator.onAddInventoryItem(); |
} |
659,18 → 635,7 |
public void update() { |
// Mise a jour boutton export feuille de calcul |
mediator.getActionPanel().getExportButton().setHTML("<a href=\""+mediator.getServiceBaseUrl()+"/InventoryExport/" |
+ user + "/" |
+ location + "/" |
+ station + "/" |
+ search + "/" |
+ date + |
"\">"+"Export tableur</a>"); |
// table.setBorderWidth(1); |
setStatusDisabled(); |
1053,7 → 1018,9 |
} |
} |
/trunk/src/org/tela_botanica/client/LeftPanel.java |
---|
28,14 → 28,9 |
private LocationList locationList = null; |
private DateList dateList = null; |
private StationList stationList = null; |
private Mediator mediator=null; |
public LeftPanel(Mediator med) { |
public LeftPanel(Mediator mediator) { |
mediator=med; |
mediator.registerLeftPanel(this); |
dateList = new DateList(mediator); |
locationList = new LocationList(mediator); |
stationList = new StationList(mediator); |
/trunk/src/org/tela_botanica/client/AutoCompleteAsyncTextBox.java |
---|
315,15 → 315,10 |
// add selected item to textbox |
protected void complete() |
{ |
if(choices.getItemCount() > 0) |
{ |
this.setText(choices.getItemText(choices.getSelectedIndex())); |
currentValue=choices.getValue(choices.getSelectedIndex()); |
if (autoCompleteAsyncTextBoxListeners!= null) { |
autoCompleteAsyncTextBoxListeners.fireTextBoxComplete(responseTextHandler,this.getText(),currentValue); |
} |
} |
visible=false; |
358,6 → 353,7 |
this.currentValue=value; |
} |
} |
/trunk/src/org/tela_botanica/client/EntryPanel.java |
---|
86,22 → 86,17 |
private Button dateSelector = new Button("..."); |
boolean visible=false; |
private Mediator mediator=null; |
private String user= null; |
private String ordre =null; |
private CalendarWidget calendar = null; // Lazy instantiation |
private PopupPanel choicesPopup = null; // Lazy instantiation |
public EntryPanel(final Mediator med) { |
Grid inner = new Grid(3,4); |
mediator=med; |
user=mediator.getUser(); |
118,6 → 113,7 |
outer.add(new HTML("<b>Saisir un relevé :</b>")); |
Grid inner = new Grid(3,4); |
for (int i=0; i<3;i++) { |
inner.getCellFormatter().setWidth(i, 0, "3%"); |
124,11 → 120,9 |
inner.getCellFormatter().setWidth(i, 1, "47%"); |
inner.getCellFormatter().setWidth(i, 2, "3%"); |
inner.getCellFormatter().setWidth(i, 3, "47%"); |
} |
} |
nameAssistant = new NameAssistant(mediator); |
locationAssistant = new LocationAssistant(mediator); |
283,7 → 277,7 |
} |
); |
Button validButton = new Button("Valider"); |
357,6 → 351,7 |
} |
initWidget(outer); |
411,8 → 406,7 |
String ann=((JSONString) jsonArray .get(3)).stringValue(); |
if (ann.compareTo("0")!=0) { |
nameAssistant.setValue(ann); |
mediator.getInfoPopup().setImageUrl(ann); |
nameAssistant.setValue(null); |
} |
else { |
nameAssistant.setValue(null); |
470,15 → 464,11 |
public void setUser(String user) { |
this.user = user; |
} |
} |
/* +--Fin du code ---------------------------------------------------------------------------------------+ |
* $Log$ |
* Revision 1.5 2007-05-22 14:27:08 ddelon |
* reglage modification |
* |
* Revision 1.4 2007-05-21 21:01:35 ddelon |
* Modification comportement boutons |
* |
/trunk/src/org/tela_botanica/client/AutoCompleteAsyncTextBoxListener.java |
---|
1,8 → 1,6 |
package org.tela_botanica.client; |
import com.google.gwt.user.client.ResponseTextHandler; |
/** |
* Event listener interface for table events. |
*/ |
15,13 → 13,4 |
* @param text : text selected |
*/ |
void onValidate(SourcesAutoCompleteAsyncTextBoxEvents sender, String text, String value); |
/** |
* Fired when a AutoCompleteBox is completed (selection) |
* |
* @param sender the widget sending the event |
* @param text : text selected |
*/ |
void onComplete(ResponseTextHandler sender, String text, String value); |
} |