public class ConfigUIModelBuilder extends Object
ConfigUIModel
Created: 22 déc. 2009| Constructor and Description |
|---|
ConfigUIModelBuilder() |
| Modifier and Type | Method and Description |
|---|---|
ConfigUIModelBuilder |
addCategory(String categoryName,
String categoryLabel)
Add a new category, and set it as current.
|
ConfigUIModelBuilder |
addCategory(String categoryName,
String categoryLabel,
String defaultCallback)
Add a new category, and set it as current.
|
ConfigUIModelBuilder |
addOption(io.ultreia.java4all.config.ConfigOptionDef def)
Add a new option, and set it as current.
|
ConfigUIModelBuilder |
addOption(io.ultreia.java4all.config.ConfigOptionDef def,
String propertyName)
Deprecated.
since 2.5.29, prefer use the
setOptionPropertyName(String) method instead, will be removed soon |
protected void |
checkCurrent(Object o,
String type) |
protected void |
checkNoCurrent(Object o,
String type) |
protected void |
checkNotNull(Object o,
String method,
String parameter) |
ConfigUIModelBuilder |
createModel(io.ultreia.java4all.config.ApplicationConfig config)
Deprecated.
since 2.33, prefer use the
createModel(Object, ApplicationConfig, File) method instead, will be removed soon |
ConfigUIModelBuilder |
createModel(io.ultreia.java4all.config.ApplicationConfig config,
File configFile)
Deprecated.
since 2.33, prefer use the
createModel(Object, ApplicationConfig, File) method instead, will be removed soon |
ConfigUIModelBuilder |
createModel(Object configurationBean,
io.ultreia.java4all.config.ApplicationConfig config)
Deprecated.
since 2.33, prefer use the
createModel(Object, ApplicationConfig, File) method instead, will be removed soon |
ConfigUIModelBuilder |
createModel(Object configurationBean,
io.ultreia.java4all.config.ApplicationConfig config,
File configFile)
Create a new model and set it as current model.
|
ConfigUIModelBuilder |
createModel(com.google.common.base.Supplier<io.ultreia.java4all.config.ApplicationConfig> config)
Deprecated.
since 2.33, prefer use the
createModel(Object, ApplicationConfig, File) method instead, will be removed soon |
ConfigUIModelBuilder |
createModel(com.google.common.base.Supplier<io.ultreia.java4all.config.ApplicationConfig> config,
File configFile)
Deprecated.
since 2.33, prefer use the
createModel(Object, ApplicationConfig, File) method instead, will be removed soon |
protected CategoryModel |
flushCategory() |
ConfigUIModel |
flushModel()
Flush the model and return it.
|
protected OptionModel |
flushOption() |
ConfigUIModelBuilder |
registerCallBack(String name,
String description,
Icon icon,
Runnable action)
Registers a new callback.
|
ConfigUIModelBuilder |
setCategory(CategoryModel categoryModel)
Set the given category as current category.
|
ConfigUIModelBuilder |
setCategoryDefaultCallBack(String categoryDefaultCallBack)
Sets the default callback to use for this category (the call back
will be add to all options of this category until you set another one or
nullify it).
|
ConfigUIModelBuilder |
setCloseAction(Runnable runnable) |
ConfigUIModelBuilder |
setFinalizer(CallBackFinalizer finalizer)
Sets the callback finalizet
|
ConfigUIModelBuilder |
setModel(ConfigUIModel model)
Set the given model as current model.
|
ConfigUIModelBuilder |
setOption(OptionModel optionModel)
Sets the given option as current option.
|
ConfigUIModelBuilder |
setOptionCallBack(String name)
Registers the current option into a known callback.
|
ConfigUIModelBuilder |
setOptionEditor(TableCellEditor editor)
Set the editor on the current option.
|
ConfigUIModelBuilder |
setOptionPropertyName(String propertyName)
Set the propertyName on the current option.
|
ConfigUIModelBuilder |
setOptionRenderer(TableCellRenderer renderer)
Set the renderer on the current option.
|
ConfigUIModelBuilder |
setOptionShortLabel(String shortLabel)
Set the short label on the current option.
|
public ConfigUIModelBuilder createModel(Object configurationBean, io.ultreia.java4all.config.ApplicationConfig config, File configFile) throws IllegalStateException, NullPointerException
configurationBean - configuration bean used in model (optional)config - the configuration used in model (can not be null)configFile - configuration file where to save (can not be null)IllegalStateException - if there is already a current modelNullPointerException - if config or configFile is null@Deprecated public ConfigUIModelBuilder createModel(com.google.common.base.Supplier<io.ultreia.java4all.config.ApplicationConfig> config) throws IllegalStateException, NullPointerException
createModel(Object, ApplicationConfig, File) method instead, will be removed soonconfig - the configuration used in modelIllegalStateException - if there is already a current modelNullPointerException - if config is null@Deprecated public ConfigUIModelBuilder createModel(com.google.common.base.Supplier<io.ultreia.java4all.config.ApplicationConfig> config, File configFile) throws IllegalStateException, NullPointerException
createModel(Object, ApplicationConfig, File) method instead, will be removed soonconfig - the configuration used in modelconfigFile - configuration file where to save (can not be null)IllegalStateException - if there is already a current modelNullPointerException - if config or configFile is null@Deprecated public ConfigUIModelBuilder createModel(Object configurationBean, io.ultreia.java4all.config.ApplicationConfig config) throws IllegalStateException, NullPointerException
createModel(Object, ApplicationConfig, File) method instead, will be removed soonconfigurationBean - configuration bean used in modelconfig - the configuration used in modelIllegalStateException - if there is already a current modelNullPointerException - if there is some null parameters@Deprecated public ConfigUIModelBuilder createModel(io.ultreia.java4all.config.ApplicationConfig config) throws IllegalStateException, NullPointerException
createModel(Object, ApplicationConfig, File) method instead, will be removed soonconfig - the configuration used in modelIllegalStateException - if there is already a current modelNullPointerException - if config is null@Deprecated public ConfigUIModelBuilder createModel(io.ultreia.java4all.config.ApplicationConfig config, File configFile) throws IllegalStateException, NullPointerException
createModel(Object, ApplicationConfig, File) method instead, will be removed soonconfig - the configuration used in modelconfigFile - configuration file where to save (can not be null)IllegalStateException - if there is already a current modelNullPointerException - if config or configFile is nullpublic ConfigUIModelBuilder addCategory(String categoryName, String categoryLabel) throws IllegalStateException, NullPointerException
categoryName - the name of the new category
(can not to be null)categoryLabel - the label of the new category
(can not to be null)IllegalStateException - if there is not a current model,
nor categoryNullPointerException - if any of parameter is nullpublic ConfigUIModelBuilder addCategory(String categoryName, String categoryLabel, String defaultCallback) throws IllegalStateException, NullPointerException
categoryName - the name of the new category
(can not to be null)categoryLabel - the label of the new category
(can not to be null)IllegalStateException - if there is not a current model,
nor categoryNullPointerException - if any of parameter is nullpublic ConfigUIModelBuilder addOption(io.ultreia.java4all.config.ConfigOptionDef def) throws IllegalStateException, NullPointerException
def - the def ot the new optionIllegalStateException - if there is not a current model,
nor categoryNullPointerException - if any of parameter is null@Deprecated public ConfigUIModelBuilder addOption(io.ultreia.java4all.config.ConfigOptionDef def, String propertyName) throws IllegalStateException, NullPointerException
setOptionPropertyName(String) method instead, will be removed soonaddOption(ConfigOptionDef) then
setOptionPropertyName(String).def - the def ot the new optionpropertyName - the propertyName to set on the optionIllegalStateException - if there is not a current model, nor
categoryNullPointerException - if any of parameter is nullpublic ConfigUIModelBuilder setOptionPropertyName(String propertyName) throws IllegalStateException, NullPointerException
propertyName - the propertyName to set in the current option.IllegalStateException - if there is not a current option set.NullPointerException - if any of parameter is nullOptionModel.setPropertyName(String)public ConfigUIModelBuilder setOptionShortLabel(String shortLabel) throws IllegalStateException, NullPointerException
shortLabel - the propertyName to set in the current option.IllegalStateException - if there is not a current option set.NullPointerException - if any of parameter is nullOptionModel.setShortLabel(String)public ConfigUIModelBuilder setOptionEditor(TableCellEditor editor) throws IllegalStateException, NullPointerException
editor - the editor to set in the current option.IllegalStateException - if there is not a current option set.NullPointerException - if any of parameter is nullOptionModel.setEditor(TableCellEditor)public ConfigUIModelBuilder setOptionRenderer(TableCellRenderer renderer) throws IllegalStateException, NullPointerException
renderer - the renderer to set in the current option.IllegalStateException - if there is not a current option set.NullPointerException - if any of parameter is nullOptionModel.setRenderer(TableCellRenderer)public ConfigUIModelBuilder registerCallBack(String name, String description, Icon icon, Runnable action)
name - the unique name of a callbackdescription - the i18n key to describe the actionicon - the icon of the callBack (used in ui)action - the action of the callbackpublic ConfigUIModelBuilder setOptionCallBack(String name)
name - the name of the callbackpublic ConfigUIModelBuilder setFinalizer(CallBackFinalizer finalizer)
finalizer - callback finalizeCallBackFinalizerpublic ConfigUIModelBuilder setCategoryDefaultCallBack(String categoryDefaultCallBack)
categoryDefaultCallBack - default callbakc name for the categorypublic ConfigUIModel flushModel() throws IllegalStateException
IllegalStateException - if there is not a current model set.public ConfigUIModelBuilder setModel(ConfigUIModel model) throws IllegalStateException
model - the model to useIllegalStateException - if there is already a current modelpublic ConfigUIModelBuilder setCategory(CategoryModel categoryModel) throws IllegalStateException
categoryModel - the category to useIllegalStateException - if there is not a current model or a
current categorypublic ConfigUIModelBuilder setOption(OptionModel optionModel) throws IllegalStateException
optionModel - the option to useIllegalStateException - if there is not a current model, nor
category, or a current optionpublic ConfigUIModelBuilder setCloseAction(Runnable runnable)
protected CategoryModel flushCategory()
protected OptionModel flushOption()
Copyright © 2008–2020 Ultreia.io. All rights reserved.