public class ConfigUIModelBuilder extends Object
ConfigUIModel
Created: 22 déc. 2009| Constructor and Description |
|---|
ConfigUIModelBuilder() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCategory(String categoryName,
String categoryLabel)
Add a new category, and set it as current.
|
void |
addOption(org.nuiton.util.ApplicationConfig.OptionDef def)
Add a new option, and set it as current.
|
void |
addOption(org.nuiton.util.ApplicationConfig.OptionDef def,
String propertyName)
Add a new option with a propertyName, and set it as current.
|
protected void |
checkCurrent(Object o,
String type) |
protected void |
checkNoCurrent(Object o,
String type) |
protected void |
checkNotNull(Object o,
String method,
String parameter) |
void |
createModel(org.nuiton.util.ApplicationConfig config)
Create a new model and set it as current model.
|
protected CategoryModel |
flushCategory() |
ConfigUIModel |
flushModel()
Flush the model and return it.
|
protected OptionModel |
flushOption() |
void |
registerCallBack(String name,
String description,
Icon icon,
Runnable action)
Registers a new callback.
|
void |
setCategory(CategoryModel categoryModel)
Set the given category as current category.
|
void |
setCloseAction(Runnable runnable) |
void |
setFinalizer(CallBackFinalizer finalizer) |
void |
setModel(ConfigUIModel model)
Set the given model as current model.
|
void |
setOption(OptionModel optionModel)
Sets the given option as current option.
|
void |
setOptionCallBack(String name)
Registers the current option into a known callback.
|
void |
setOptionEditor(TableCellEditor editor)
Set the editor on the current option.
|
void |
setOptionPropertyName(String propertyName)
Set the propertyName on the current option.
|
public void createModel(org.nuiton.util.ApplicationConfig config)
throws IllegalStateException,
NullPointerException
config - the configuration used in modelIllegalStateException - if there is already a current modelNullPointerException - if config is nullpublic void 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 void addOption(org.nuiton.util.ApplicationConfig.OptionDef 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 nullpublic void addOption(org.nuiton.util.ApplicationConfig.OptionDef def,
String propertyName)
throws IllegalStateException,
NullPointerException
addOption(org.nuiton.util.ApplicationConfig.OptionDef) 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 void 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 void 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 void 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 void setOptionCallBack(String name)
name - the name of the callbackpublic void setFinalizer(CallBackFinalizer finalizer)
public ConfigUIModel flushModel() throws IllegalStateException
IllegalStateException - if there is not a current model set.public void setModel(ConfigUIModel model) throws IllegalStateException
model - the model to useIllegalStateException - if there is already a current modelpublic void setCategory(CategoryModel categoryModel) throws IllegalStateException
categoryModel - the category to useIllegalStateException - if there is not a current model or a
current categorypublic void setOption(OptionModel optionModel) throws IllegalStateException
optionModel - the option to useIllegalStateException - if there is not a current model, nor
category, or a current optionpublic void setCloseAction(Runnable runnable)
protected CategoryModel flushCategory()
protected OptionModel flushOption()
Copyright © 2008-2012 CodeLutin. All Rights Reserved.