Subversion Repositories eFlore/Applications.coel

Rev

Rev 516 | Go to most recent revision | Blame | Last modification | View Log | RSS feed

package org.tela_botanica.client.composants;

import org.tela_botanica.client.RegistreId;
import org.tela_botanica.client.images.Images;

import com.extjs.gxt.ui.client.GXT;
import com.extjs.gxt.ui.client.Registry;
import com.extjs.gxt.ui.client.Version;
import com.extjs.gxt.ui.client.widget.TabItem;
import com.extjs.gxt.ui.client.widget.TabPanel;
import com.extjs.gxt.ui.client.widget.Window;
import com.extjs.gxt.ui.client.widget.layout.FitData;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.google.gwt.core.client.GWT;

public class ParametreFenetre extends Window {

        public ParametreFenetre() {
                setSize(500, 300);
                setPlain(true);
                setHeading("Paramêtres et préférences");
                setIcon(Images.ICONES.application());
                setLayout(new FitLayout());
                
                TabPanel panneaux = new TabPanel();
                panneaux.setBorders(false);
                TabItem parametresOnglet = new TabItem("Paramêtres");
                parametresOnglet.setIcon(Images.ICONES.engrenages());
                parametresOnglet.addText("Paramêtres de l'application...");
                parametresOnglet.addStyleName("pad-text");
                
                TabItem preferencesOnglet = new TabItem("Préférences");
                preferencesOnglet.addText("Préférences de l'application...");
                preferencesOnglet.setIcon(Images.ICONES.groupeEngrenage());
                preferencesOnglet.addStyleName("pad-text");
                
                TabItem aproposOnglet = new TabItem("A propos...");
                aproposOnglet.setIcon(Images.ICONES.information());
                aproposOnglet.addText("<h1>"+(String) Registry.get(RegistreId.APPLI_NOM)+"</h1>");
                aproposOnglet.addText("Code : "+(String) Registry.get(RegistreId.APPLI_CODE));
                aproposOnglet.addText("Version : "+(String) Registry.get(RegistreId.APPLI_VERSION));
                aproposOnglet.addText("Révision : "+(String) Registry.get(RegistreId.APPLI_REVISION));
                aproposOnglet.addText("<hr />");
                aproposOnglet.addText("<h1>"+"Compilation"+"</h1>");
                aproposOnglet.addText("Date : "+(String) Registry.get(RegistreId.APPLI_COMPILATION_DATE_HEURE));
                aproposOnglet.addText("Version de Java : "+(String) Registry.get(RegistreId.APPLI_COMPILATION_JAVA_VERSION));
                aproposOnglet.addText("<hr />");
                aproposOnglet.addText("<h1>"+"Cadre de travail"+"</h1>");
                aproposOnglet.addText("GWT : v"+GWT.getVersion());
                Version gxtVersion = GXT.getVersion();
                aproposOnglet.addText("GXT : v"+gxtVersion.getRelease());
                aproposOnglet.addText("<hr />");
                aproposOnglet.addText("<h1>"+"Navigateur"+"</h1>");
                aproposOnglet.addText("COEL fonctionne actuellement dans : "+GXT.getUserAgent());
                
                aproposOnglet.addStyleName("pad-text");
                
                panneaux.add(parametresOnglet);
                panneaux.add(preferencesOnglet);
                panneaux.add(aproposOnglet);
                
                add(panneaux, new FitData(4));
        }

}