Commit 5b5e160a authored by Unknown's avatar Unknown
Browse files

Ajout

git-svn-id: https://scmforge.ifremer.fr/authscm/lp1ee9d/svn/reefdb/trunk@378 cd918a83-917d-4a2a-92d7-bc1d03929fc5
parent 34636b7a
BeanFilterableComboBox {
showReset: true;
filterable: true;
}
#menuPanel {
border: {BorderFactory.createTitledBorder(BorderFactory.createLoweredBevelBorder(), t("reefdb.config.menu.title"))};
}
#programmeLabel {
text: "reefdb.config.programmes.menu.programme.label";
labelFor: {programmeCombo};
}
#effacerBouton{
actionIcon: reset;
text: "reefdb.config.menu.effacer.label";
toolTipText: "reefdb.config.menu..effacer.tip";
_applicationAction: {fr.ifremer.reefdb.ui.swing.content.config.administrer.programmes.menu.actions.EffacerAction.class};
}
#rechercherBouton {
actionIcon: find;
text: "reefdb.config.menu.rechercher.label";
toolTipText: "reefdb.config.menu..rechercher.tip";
_applicationAction: {fr.ifremer.reefdb.ui.swing.content.config.administrer.programmes.menu.actions.RechercherAction.class};
}
\ No newline at end of file
<Table fill="horizontal" decorator='help' implements='fr.ifremer.reefdb.ui.swing.util.ReefDbUI&lt;ProgrammeMenuUIModel, ProgrammeMenuUIHandler&gt;'>
<import>
fr.ifremer.reefdb.ui.swing.ReefDbHelpBroker
fr.ifremer.reefdb.ui.swing.ReefDbUIContext
fr.ifremer.reefdb.ui.swing.util.ReefDbUI
fr.ifremer.reefdb.ui.swing.util.ReefDbUIUtil
fr.ifremer.reefdb.dto.programme.ProgrammeDTO
fr.ifremer.reefdb.ui.swing.content.config.administrer.programmes.AdminProgrammesUI
java.awt.FlowLayout
javax.swing.Box
javax.swing.BoxLayout
java.awt.BorderLayout
javax.swing.SwingConstants
jaxx.runtime.swing.editor.bean.BeanFilterableComboBox
static org.nuiton.i18n.I18n.*
static org.nuiton.i18n.I18n.t;
</import>
<!--getContextValue est une méthode interne JAXX-->
<ProgrammeMenuUIModel id='model' initializer='getContextValue(ProgrammeMenuUIModel.class)'/>
<ReefDbHelpBroker id='broker' constructorParams='"reefdb.home.help"'/>
<script><![CDATA[
private AdminProgrammesUI parentUI;
//Le parent est très utile pour intervenir sur les frères
public ProgrammeMenuUI(ReefDbUI parentUI) {
this.parentUI = (AdminProgrammesUI) parentUI;
ReefDbUIUtil.setParentUI(this, parentUI);
}
public AdminProgrammesUI getParentUI() {
return parentUI;
}
]]></script>
<row>
<cell weightx="1" weighty="0" fill="both">
<Table id="menuPanel" fill="both">
<row>
<cell>
<JPanel id='programmePanel' layout='{new BorderLayout()}'>
<JLabel id='programmeLabel' constraints='BorderLayout.PAGE_START'/>
<BeanFilterableComboBox id='programmeCombo' constructorParams='this' constraints='BorderLayout.CENTER' genericType='ProgrammeDTO'/>
</JPanel>
</cell>
</row>
<row>
<cell>
<JSeparator constructorParams='SwingConstants.HORIZONTAL'/>
</cell>
</row>
<row>
<cell>
<JPanel layout='{new FlowLayout()}'>
<JButton id='effacerBouton' alignmentX='{Component.CENTER_ALIGNMENT}'/>
<JButton id='rechercherBouton' alignmentX='{Component.CENTER_ALIGNMENT}'/>
</JPanel>
</cell>
</row>
</Table>
</cell>
</row>
<row>
<cell weightx="1" weighty="1" fill="both">
<JLabel/>
</cell>
</row>
</Table>
\ No newline at end of file
package fr.ifremer.reefdb.ui.swing.content.config.administrer.programmes.menu;
import java.beans.PropertyChangeListener;
import javax.swing.JComponent;
import jaxx.runtime.validator.swing.SwingValidator;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import fr.ifremer.reefdb.ui.swing.util.AbstractReefDbUIHandler;
/**
* Controlleur du menu de l'onglet prelevements mesures.
*/
public class ProgrammeMenuUIHandler extends AbstractReefDbUIHandler<ProgrammeMenuUIModel, ProgrammeMenuUI> {
/**
* Logger.
*/
private static final Log log = LogFactory.getLog(ProgrammeMenuUIHandler.class);
@Override
public void beforeInit(final ProgrammeMenuUI ui) {
super.beforeInit(ui);
// create model and register to the JAXX context
final ProgrammeMenuUIModel model = new ProgrammeMenuUIModel();
ui.setContextValue(model);
}
@Override
public void afterInit(final ProgrammeMenuUI ui) {
initUI(ui);
// Initialiser les combobox
initialiserComboBox();
}
@Override
public void onCloseUI() {
if (log.isDebugEnabled()) {
log.debug("closing: " + getUI());
}
PropertyChangeListener[] listeners = getModel().getPropertyChangeListeners();
for (PropertyChangeListener listener : listeners) {
getModel().removePropertyChangeListener(listener);
}
clearValidators();
}
@Override
public SwingValidator<ProgrammeMenuUIModel> getValidator() {
return null;
}
@Override
protected JComponent getComponentToFocus() {
return null;
}
/**
* Initialisation des combobox
*/
private void initialiserComboBox() {
// Initialisation des groupe de taxons pere
initBeanFilterableComboBox(
getUI().getProgrammeCombo(),
getContext().getReferentielService().getProgrammes(null),
null);
// Taile minimale de la combo
getUI().getProgrammeCombo().setSize(100, 25);
}
}
\ No newline at end of file
package fr.ifremer.reefdb.ui.swing.content.config.administrer.programmes.menu;
import java.util.Collection;
import org.nuiton.util.beans.Binder;
import org.nuiton.util.beans.BinderFactory;
import fr.ifremer.reefdb.dto.ReefDbBeanFactory;
import fr.ifremer.reefdb.dto.observation.mesures.PrelevementsMesuresDTO;
import fr.ifremer.reefdb.dto.referentiel.EquipementPrelevementDTO;
import fr.ifremer.reefdb.dto.referentiel.pmfm.PmfmDTO;
import fr.ifremer.reefdb.ui.swing.util.AbstractReefDbBeanUIModel;
/**
* Modele du menu de l onglet prelevements mesures.
*/
public class ProgrammeMenuUIModel extends AbstractReefDbBeanUIModel<PrelevementsMesuresDTO, ProgrammeMenuUIModel> implements PrelevementsMesuresDTO {
private static Binder<ProgrammeMenuUIModel, PrelevementsMesuresDTO> toBeanBinder =
BinderFactory.newBinder(ProgrammeMenuUIModel.class, PrelevementsMesuresDTO.class);
private static Binder<PrelevementsMesuresDTO, ProgrammeMenuUIModel> fromBeanBinder =
BinderFactory.newBinder(PrelevementsMesuresDTO.class, ProgrammeMenuUIModel.class);
/**
* Constructeur.
*/
public ProgrammeMenuUIModel() {
super(fromBeanBinder, toBeanBinder);
}
@Override
protected PrelevementsMesuresDTO newBean() {
return ReefDbBeanFactory.newPrelevementsMesuresDTO();
}
@Override
public PmfmDTO getPmfmColonne(int index) {
return delegateObject.getPmfmColonne(index);
}
@Override
public boolean isPmfmColonneEmpty() {
return delegateObject.isPmfmColonneEmpty();
}
@Override
public int sizePmfmColonne() {
return delegateObject.sizePmfmColonne();
}
@Override
public void addPmfmColonne(PmfmDTO pmfmColonne) {
delegateObject.addPmfmColonne(pmfmColonne);
}
@Override
public void addAllPmfmColonne(Collection<PmfmDTO> pmfmColonne) {
delegateObject.addAllPmfmColonne(pmfmColonne);
}
@Override
public boolean removePmfmColonne(PmfmDTO pmfmColonne) {
return delegateObject.removePmfmColonne(pmfmColonne);
}
@Override
public boolean removeAllPmfmColonne(Collection<PmfmDTO> pmfmColonne) {
return delegateObject.removeAllPmfmColonne(pmfmColonne);
}
@Override
public boolean containsPmfmColonne(PmfmDTO pmfmColonne) {
return delegateObject.containsPmfmColonne(pmfmColonne);
}
@Override
public boolean containsAllPmfmColonne(Collection<PmfmDTO> pmfmColonne) {
return delegateObject.containsAllPmfmColonne(pmfmColonne);
}
@Override
public Collection<PmfmDTO> getPmfmColonne() {
return delegateObject.getPmfmColonne();
}
@Override
public void setPmfmColonne(Collection<PmfmDTO> pmfmColonne) {
delegateObject.setPmfmColonne(pmfmColonne);
}
@Override
public PmfmDTO getPmfmLigne(int index) {
return delegateObject.getPmfmLigne(index);
}
@Override
public boolean isPmfmLigneEmpty() {
return delegateObject.isPmfmLigneEmpty();
}
@Override
public int sizePmfmLigne() {
return delegateObject.sizePmfmLigne();
}
@Override
public void addPmfmLigne(PmfmDTO pmfmLigne) {
delegateObject.addPmfmLigne(pmfmLigne);
}
@Override
public void addAllPmfmLigne(Collection<PmfmDTO> pmfmLigne) {
delegateObject.addAllPmfmLigne(pmfmLigne);
}
@Override
public boolean removePmfmLigne(PmfmDTO pmfmLigne) {
return delegateObject.removePmfmLigne(pmfmLigne);
}
@Override
public boolean removeAllPmfmLigne(Collection<PmfmDTO> pmfmLigne) {
return delegateObject.removeAllPmfmLigne(pmfmLigne);
}
@Override
public boolean containsPmfmLigne(PmfmDTO pmfmLigne) {
return delegateObject.containsPmfmLigne(pmfmLigne);
}
@Override
public boolean containsAllPmfmLigne(Collection<PmfmDTO> pmfmLigne) {
return delegateObject.containsAllPmfmLigne(pmfmLigne);
}
@Override
public Collection<PmfmDTO> getPmfmLigne() {
return delegateObject.getPmfmLigne();
}
@Override
public void setPmfmLigne(Collection<PmfmDTO> pmfmLigne) {
delegateObject.setPmfmLigne(pmfmLigne);
}
@Override
public String getMnemonique() {
return delegateObject.getMnemonique();
}
@Override
public void setMnemonique(String mnemonique) {
delegateObject.setMnemonique(mnemonique);
}
@Override
public Double getHeure() {
return delegateObject.getHeure();
}
@Override
public void setHeure(Double heure) {
delegateObject.setHeure(heure);
}
@Override
public EquipementPrelevementDTO getEngin() {
return delegateObject.getEngin();
}
@Override
public void setEngin(EquipementPrelevementDTO engin) {
delegateObject.setEngin(engin);
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment