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.
|
| 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> |
addColumnToModel(TableColumnModel model,
TableCellEditor editor,
TableCellRenderer renderer,
ColumnIdentifier<R> identifier,
WeightUnit weightUnit) |
protected <R extends AbstractTuttiBeanUIModel,B> |
addComboDataColumnToModel(TableColumnModel model,
ColumnIdentifier<R> identifier,
org.nuiton.decorator.Decorator<B> decorator,
List<B> data) |
protected <R extends AbstractTuttiBeanUIModel> |
addFloatColumnToModel(TableColumnModel model,
ColumnIdentifier<R> identifier,
String numberPattern,
JTable table) |
protected <R extends AbstractTuttiBeanUIModel> |
addFloatColumnToModel(TableColumnModel model,
ColumnIdentifier<R> identifier,
WeightUnit weightUnit,
JTable table) |
protected void |
addHighlighters(org.jdesktop.swingx.JXTable table) |
protected <R extends AbstractTuttiBeanUIModel> |
addIntegerColumnToModel(TableColumnModel model,
ColumnIdentifier<R> identifier,
String numberPattern,
JTable table) |
abstract void |
afterInitUI() |
boolean |
askCancelEditBeforeLeaving(String message) |
int |
askSaveBeforeLeaving(String message) |
void |
autoSelectRowInTable(MouseEvent e,
JPopupMenu popup) |
abstract void |
beforeInitUI() |
protected void |
beforeOpenPopup(int rowIndex,
int columnIndex)
Hook to prepare popup just before showing it.
|
protected String |
buildReminderLabelTitle(Species species,
Iterable<SampleCategory<?>> categories,
String prefix,
String suffix) |
protected String |
buildReminderLabelTitle(String species,
Iterable<SampleCategory<?>> categories,
String prefix,
String suffix) |
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.decorator.Decorator<O> |
getDecorator(Class<O> type,
String name) |
M |
getModel() |
protected Set<String> |
getPropertiesToIgnore() |
Component |
getTopestUI() |
UI |
getUI() |
abstract jaxx.runtime.validator.swing.SwingValidator<M> |
getValidator() |
protected void |
incrementsMessage(String message) |
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 <E extends TuttiEntity> |
initBeanList(jaxx.runtime.swing.editor.bean.BeanDoubleList<E> list,
List<E> data,
List<E> selectedData,
org.nuiton.decorator.Decorator<E> selectedDecorator)
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 |
initCoordinateDMDEditor(DmdCoordinateEditor editor) |
protected void |
initCoordinateDMSEditor(DmsCoordinateEditor editor) |
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 |
listenModelModifiy(AbstractTuttiBeanUIModel model) |
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.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.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 |
setFile(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
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 setFile(ActionEvent event, String property)
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 Component getTopestUI()
public void clearValidators()
public void autoSelectRowInTable(MouseEvent e, JPopupMenu popup)
protected void addHighlighters(org.jdesktop.swingx.JXTable table)
protected void listenModelModifiy(AbstractTuttiBeanUIModel model)
public void openRowMenu(KeyEvent e, JPopupMenu popup)
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, org.nuiton.decorator.Decorator<E> selectedDecorator)
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 <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 initCoordinateDMSEditor(DmsCoordinateEditor editor)
protected void initCoordinateDMDEditor(DmdCoordinateEditor 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)
protected <O> ListCellRenderer newListCellRender(Class<O> type)
protected <O> ListCellRenderer newListCellRender(Class<O> type, String name)
protected <O> ListCellRenderer newListCellRender(org.nuiton.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> org.jdesktop.swingx.table.TableColumnExt addColumnToModel(TableColumnModel model, TableCellEditor editor, TableCellRenderer renderer, ColumnIdentifier<R> identifier)
protected <R extends AbstractTuttiBeanUIModel> org.jdesktop.swingx.table.TableColumnExt addColumnToModel(TableColumnModel model, TableCellEditor editor, TableCellRenderer renderer, ColumnIdentifier<R> identifier, WeightUnit weightUnit)
protected <R extends AbstractTuttiBeanUIModel> org.jdesktop.swingx.table.TableColumnExt addColumnToModel(TableColumnModel model, ColumnIdentifier<R> identifier)
protected <R extends AbstractTuttiBeanUIModel> org.jdesktop.swingx.table.TableColumnExt addFloatColumnToModel(TableColumnModel model, ColumnIdentifier<R> identifier, String numberPattern, JTable table)
protected <R extends AbstractTuttiBeanUIModel> org.jdesktop.swingx.table.TableColumnExt addFloatColumnToModel(TableColumnModel model, ColumnIdentifier<R> identifier, WeightUnit weightUnit, JTable table)
protected <R extends AbstractTuttiBeanUIModel> org.jdesktop.swingx.table.TableColumnExt addIntegerColumnToModel(TableColumnModel model, ColumnIdentifier<R> identifier, String numberPattern, JTable table)
protected <R extends AbstractTuttiBeanUIModel> org.jdesktop.swingx.table.TableColumnExt addBooleanColumnToModel(TableColumnModel model, ColumnIdentifier<R> identifier, JTable table)
protected <R extends AbstractTuttiBeanUIModel,B> org.jdesktop.swingx.table.TableColumnExt addComboDataColumnToModel(TableColumnModel model, ColumnIdentifier<R> identifier, org.nuiton.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.decorator.Decorator<O> decorator)
protected void beforeOpenPopup(int rowIndex,
int columnIndex)
rowIndex - selected row index (or lowest selected one)columnIndex - selected column indexprotected String buildReminderLabelTitle(Species species, Iterable<SampleCategory<?>> categories, String prefix, String suffix)
protected String buildReminderLabelTitle(String species, Iterable<SampleCategory<?>> categories, String prefix, String suffix)
protected void incrementsMessage(String message)
Copyright © 2012–2013 Ifremer. All rights reserved.