public abstract class AbstractTuttiUIHandler<M,UI extends TuttiUI<M,?>> extends Object implements UIMessageNotifier
| Modifier and Type | Field and Description |
|---|---|
protected TuttiUIContext |
context
Global application context.
|
protected UI |
ui
UI handled.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractTuttiUIHandler(TuttiUIContext context,
UI ui) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
afterInitUI() |
boolean |
askCancelEditBeforeLeaving(String message) |
int |
askSaveBeforeLeaving(String message) |
abstract void |
beforeInitUI() |
boolean |
canCloseUI(TuttiScreen nextScreen)
Can the UI be closed? It is useful whe the user wants to exit the current
screen but the model is modified: we can then ask the user if he wants to
save or not.
|
protected <B> void |
changeValidatorContext(String newContext,
jaxx.runtime.validator.swing.SwingValidator<B> validator) |
void |
clearValidators() |
void |
closeDialog(TuttiUI ui) |
protected void |
closeUI(TuttiUI ui) |
protected <A extends AbstractTuttiAction> |
createAction(Class<A> actionName) |
protected String |
decorate(Object object) |
protected void |
doAction(AbstractButton button,
ActionEvent event) |
TuttiApplicationConfig |
getConfig() |
TuttiUIContext |
getContext() |
TuttiDataContext |
getDataContext() |
<O> org.nuiton.util.decorator.Decorator<O> |
getDecorator(Class<O> type,
String name) |
M |
getModel() |
protected Set<String> |
getPropertiesToIgnore() |
UI |
getUI() |
abstract jaxx.runtime.validator.swing.SwingValidator<M> |
getValidator() |
protected <A extends AbstractTuttiAction> |
initAction(AbstractButton abstractButton,
Class<A> actionName) |
protected <E extends Serializable> |
initBeanComboBox(jaxx.runtime.swing.editor.bean.BeanComboBox<E> comboBox,
List<E> data,
E selectedData)
Prépare un component de choix d'entités pour un type d'entité donné et
pour un service de persistance donné.
|
protected <E extends Serializable> |
initBeanComboBox(jaxx.runtime.swing.editor.bean.BeanComboBox<E> comboBox,
List<E> data,
E selectedData,
String decoratorContext) |
protected <E extends IdAware> |
initBeanList(jaxx.runtime.swing.editor.bean.BeanDoubleList<E> list,
List<E> data,
List<E> selectedData)
Prépare un component de choix d'entités pour un type d'entité donné et
pour un service de persistance donné.
|
protected void |
initButtonAttachmentEditor(ButtonAttachmentEditor component) |
protected void |
initDatePicker(org.jdesktop.swingx.JXDatePicker picker) |
protected void |
initNumberEditor(jaxx.runtime.swing.editor.NumberEditor editor) |
protected void |
initTimeEditor(SimpleTimeEditor editor) |
protected void |
initUI(TuttiUI ui) |
protected void |
listenValidatorValid(org.nuiton.validator.bean.simple.SimpleBeanValidator validator,
AbstractTuttiBeanUIModel model) |
protected void |
listModelIsModify(AbstractTuttiBeanUIModel model) |
DefaultComboBoxModel |
newComboActionModel(Class<?>... actionNames) |
DefaultComboBoxModel |
newComboModel(Object... items) |
protected <O> ListCellRenderer |
newListCellRender(Class<O> type) |
protected <O> ListCellRenderer |
newListCellRender(Class<O> type,
String name) |
protected <O> ListCellRenderer |
newListCellRender(org.nuiton.util.decorator.Decorator<O> decorator) |
abstract void |
onCloseUI() |
void |
openDialog(TuttiUI ui,
TuttiUI dialogContent,
String title,
Dimension dim) |
protected void |
registerValidators(jaxx.runtime.validator.swing.SwingValidator... validators) |
<B> void |
selectFirstInCombo(jaxx.runtime.swing.editor.bean.BeanComboBox<B> combo) |
void |
selectListData(ListSelectionEvent event,
String property) |
void |
setBoolean(ItemEvent event,
String property) |
void |
setDate(ActionEvent event,
String property) |
void |
setText(KeyEvent event,
String property) |
void |
showInformationMessage(String message) |
protected final TuttiUIContext context
protected AbstractTuttiUIHandler(TuttiUIContext context, UI ui)
public abstract void beforeInitUI()
public abstract void afterInitUI()
public abstract void onCloseUI()
public abstract jaxx.runtime.validator.swing.SwingValidator<M> getValidator()
public DefaultComboBoxModel newComboModel(Object... items)
public DefaultComboBoxModel newComboActionModel(Class<?>... actionNames)
public final M getModel()
public final UI getUI()
public void showInformationMessage(String message)
showInformationMessage in interface UIMessageNotifierpublic TuttiUIContext getContext()
public TuttiDataContext getDataContext()
public TuttiApplicationConfig getConfig()
public boolean canCloseUI(TuttiScreen nextScreen)
nextScreen - the next screen to displaytrue if UI can be closed, false otherwise.public void setDate(ActionEvent event, String property)
public void selectListData(ListSelectionEvent event, String property)
public void closeDialog(TuttiUI ui)
public int askSaveBeforeLeaving(String message)
public boolean askCancelEditBeforeLeaving(String message)
protected void initUI(TuttiUI ui)
protected void initButtonAttachmentEditor(ButtonAttachmentEditor component)
protected <A extends AbstractTuttiAction> void initAction(AbstractButton abstractButton, Class<A> actionName)
protected <A extends AbstractTuttiAction> TuttiUIAction<A> createAction(Class<A> actionName)
protected void doAction(AbstractButton button, ActionEvent event)
protected void registerValidators(jaxx.runtime.validator.swing.SwingValidator... validators)
public void clearValidators()
protected <E extends Serializable> void initBeanComboBox(jaxx.runtime.swing.editor.bean.BeanComboBox<E> comboBox, List<E> data, E selectedData)
comboBox - le component graphique à initialiserprotected <E extends Serializable> void initBeanComboBox(jaxx.runtime.swing.editor.bean.BeanComboBox<E> comboBox, List<E> data, E selectedData, String decoratorContext)
protected <E extends IdAware> void initBeanList(jaxx.runtime.swing.editor.bean.BeanDoubleList<E> list, List<E> data, List<E> selectedData)
list - le component graphique à initialiserdata - la liste des données à mettre dans la liste de gaucheselectedData - la liste des données à mettre dans la liste de droiteprotected void initNumberEditor(jaxx.runtime.swing.editor.NumberEditor editor)
protected void initTimeEditor(SimpleTimeEditor editor)
protected void initDatePicker(org.jdesktop.swingx.JXDatePicker picker)
public <O> org.nuiton.util.decorator.Decorator<O> getDecorator(Class<O> type, String name)
protected <O> ListCellRenderer newListCellRender(Class<O> type)
protected <O> ListCellRenderer newListCellRender(Class<O> type, String name)
protected <O> ListCellRenderer newListCellRender(org.nuiton.util.decorator.Decorator<O> decorator)
protected void listenValidatorValid(org.nuiton.validator.bean.simple.SimpleBeanValidator validator,
AbstractTuttiBeanUIModel model)
protected void listModelIsModify(AbstractTuttiBeanUIModel model)
public <B> void selectFirstInCombo(jaxx.runtime.swing.editor.bean.BeanComboBox<B> combo)
protected void closeUI(TuttiUI ui)
protected <B> void changeValidatorContext(String newContext, jaxx.runtime.validator.swing.SwingValidator<B> validator)
Copyright © 2012-2013 Ifremer. All Rights Reserved.