public abstract class AbstractTuttiUIHandler<M,UI extends TuttiUI<M,?>> extends Object implements UIMessageNotifier
| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIRMATION_FORMAT |
protected TuttiUIContext |
context
Global application context.
|
protected UI |
ui
UI handled.
|
static String |
WARNING_FORMAT |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractTuttiUIHandler(TuttiUIContext context,
UI ui) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addAutoSelectOnFocus(JTextField jTextField) |
protected <R extends AbstractTuttiBeanUIModel> |
addBooleanColumnToModel(TableColumnModel model,
ColumnIdentifier<R> identifier,
JTable table) |
protected <R extends AbstractTuttiBeanUIModel> |
addColumnToModel(TableColumnModel model,
ColumnIdentifier<R> identifier) |
protected <R extends AbstractTuttiBeanUIModel> |
addColumnToModel(TableColumnModel model,
TableCellEditor editor,
TableCellRenderer renderer,
ColumnIdentifier<R> identifier) |
protected <R extends AbstractTuttiBeanUIModel,B> |
addComboDataColumnToModel(TableColumnModel model,
ColumnIdentifier<R> identifier,
org.nuiton.util.decorator.Decorator<B> decorator,
List<B> data) |
protected <R extends AbstractTuttiBeanUIModel> |
addFloatColumnToModel(TableColumnModel model,
ColumnIdentifier<R> identifier,
String numberPattern) |
protected <R extends AbstractTuttiBeanUIModel> |
addIntegerColumnToModel(TableColumnModel model,
ColumnIdentifier<R> identifier,
String numberPattern) |
abstract void |
afterInitUI() |
boolean |
askBeforeDelete(String title,
String message) |
boolean |
askCancelEditBeforeLeaving(String message) |
boolean |
askOverwriteFile(File file) |
int |
askSaveBeforeLeaving(String message) |
void |
autoSelectRowInTable(MouseEvent e,
JPopupMenu popup) |
abstract void |
beforeInitUI() |
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 String |
decorate(Object object) |
protected String |
decorate(Object object,
String context) |
protected abstract JComponent |
getComponentToFocus() |
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() |
protected Component |
getTopestUI() |
UI |
getUI() |
abstract jaxx.runtime.validator.swing.SwingValidator<M> |
getValidator() |
protected <E extends Serializable> |
initBeanFilterableComboBox(jaxx.runtime.swing.editor.bean.BeanFilterableComboBox<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> |
initBeanFilterableComboBox(jaxx.runtime.swing.editor.bean.BeanFilterableComboBox<E> comboBox,
List<E> data,
E selectedData,
String decoratorContext) |
protected <E extends TuttiEntity> |
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 |
initButton(AbstractButton abstractButton) |
protected void |
initButtonAttachment(ButtonAttachment component) |
protected void |
initDatePicker(org.jdesktop.swingx.JXDatePicker picker) |
protected void |
initLabel(JLabel jLabel) |
protected void |
initNumberEditor(jaxx.runtime.swing.editor.NumberEditor editor) |
protected void |
initScrollPane(JScrollPane scrollPane) |
protected void |
initTextField(JTextField jTextField) |
protected void |
initTimeEditor(SimpleTimeEditor editor) |
protected void |
initUI(TuttiUI ui) |
protected boolean |
isAutoSelectOnFocus(JComponent comp) |
protected void |
listenValidationTableHasNoFatalError(org.nuiton.validator.bean.simple.SimpleBeanValidator validator,
AbstractTuttiBeanUIModel model) |
protected void |
listenValidatorValid(org.nuiton.validator.bean.simple.SimpleBeanValidator validator,
AbstractTuttiBeanUIModel model) |
protected void |
listModelIsModify(AbstractTuttiBeanUIModel model) |
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) |
protected <O> TableCellRenderer |
newTableCellRender(Class<O> type) |
protected <O> TableCellRenderer |
newTableCellRender(Class<O> type,
String name) |
protected <O> TableCellRenderer |
newTableCellRender(org.nuiton.util.decorator.Decorator<O> decorator) |
abstract void |
onCloseUI() |
void |
openDialog(TuttiUI dialogContent,
String title,
Dimension dim) |
void |
openRowMenu(KeyEvent e,
JPopupMenu popup) |
protected boolean |
quitScreen(boolean modelIsValid,
boolean modelIsModify,
String askGiveUpMessage,
String askSaveMessage,
Action saveAction) |
protected void |
registerValidators(jaxx.runtime.validator.swing.SwingValidator... validators) |
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) |
void |
showSuccessMessage(String title,
String message) |
protected final TuttiUIContext context
public static final String CONFIRMATION_FORMAT
public static final String WARNING_FORMAT
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 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 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)
public boolean askOverwriteFile(File file)
protected Component getTopestUI()
protected void initUI(TuttiUI ui)
protected abstract JComponent getComponentToFocus()
protected void initTextField(JTextField jTextField)
protected void initLabel(JLabel jLabel)
protected void initButtonAttachment(ButtonAttachment component)
protected void initButton(AbstractButton abstractButton)
protected <E extends Serializable> void initBeanFilterableComboBox(jaxx.runtime.swing.editor.bean.BeanFilterableComboBox<E> comboBox, List<E> data, E selectedData)
comboBox - le component graphique à initialiserprotected <E extends Serializable> void initBeanFilterableComboBox(jaxx.runtime.swing.editor.bean.BeanFilterableComboBox<E> comboBox, List<E> data, E selectedData, String decoratorContext)
protected <E extends TuttiEntity> 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)
protected void initScrollPane(JScrollPane scrollPane)
protected boolean isAutoSelectOnFocus(JComponent comp)
protected void addAutoSelectOnFocus(JTextField jTextField)
protected boolean quitScreen(boolean modelIsValid,
boolean modelIsModify,
String askGiveUpMessage,
String askSaveMessage,
Action saveAction)
protected void registerValidators(jaxx.runtime.validator.swing.SwingValidator... validators)
public void clearValidators()
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 listenValidationTableHasNoFatalError(org.nuiton.validator.bean.simple.SimpleBeanValidator validator,
AbstractTuttiBeanUIModel model)
protected void listModelIsModify(AbstractTuttiBeanUIModel model)
protected void closeUI(TuttiUI ui)
protected <B> void changeValidatorContext(String newContext, jaxx.runtime.validator.swing.SwingValidator<B> validator)
protected <R extends AbstractTuttiBeanUIModel> void addColumnToModel(TableColumnModel model, TableCellEditor editor, TableCellRenderer renderer, ColumnIdentifier<R> identifier)
protected <R extends AbstractTuttiBeanUIModel> void addColumnToModel(TableColumnModel model, ColumnIdentifier<R> identifier)
protected <R extends AbstractTuttiBeanUIModel> void addFloatColumnToModel(TableColumnModel model, ColumnIdentifier<R> identifier, String numberPattern)
protected <R extends AbstractTuttiBeanUIModel> void addIntegerColumnToModel(TableColumnModel model, ColumnIdentifier<R> identifier, String numberPattern)
protected <R extends AbstractTuttiBeanUIModel> void addBooleanColumnToModel(TableColumnModel model, ColumnIdentifier<R> identifier, JTable table)
protected <R extends AbstractTuttiBeanUIModel,B> void addComboDataColumnToModel(TableColumnModel model, ColumnIdentifier<R> identifier, org.nuiton.util.decorator.Decorator<B> decorator, List<B> data)
protected <O> TableCellRenderer newTableCellRender(Class<O> type)
protected <O> TableCellRenderer newTableCellRender(Class<O> type, String name)
protected <O> TableCellRenderer newTableCellRender(org.nuiton.util.decorator.Decorator<O> decorator)
public void autoSelectRowInTable(MouseEvent e, JPopupMenu popup)
public void openRowMenu(KeyEvent e, JPopupMenu popup)
Copyright © 2012-2013 Ifremer. All Rights Reserved.