|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjaxx.runtime.swing.editor.config.model.ConfigUIModelBuilder
public class ConfigUIModelBuilder
A builder of ConfigUIModel
Created: 22 déc. 2009
| Constructor Summary | |
|---|---|
ConfigUIModelBuilder()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConfigUIModelBuilder()
| Method Detail |
|---|
public void createModel(org.nuiton.util.ApplicationConfig config)
throws IllegalStateException,
NullPointerException
config - the configuration used in model
IllegalStateException - if there is already a current model
NullPointerException - if config is null
public 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 category
NullPointerException - if any of parameter is null
public void addOption(org.nuiton.util.ApplicationConfig.OptionDef def)
throws IllegalStateException,
NullPointerException
def - the def ot the new option
IllegalStateException - if there is not a current model,
nor category
NullPointerException - if any of parameter is null
public 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 option
IllegalStateException - if there is not a current model, nor
category
NullPointerException - if any of parameter is null
public 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 use
IllegalStateException - if there is already a current model
public void setCategory(CategoryModel categoryModel)
throws IllegalStateException
categoryModel - the category to use
IllegalStateException - if there is not a current model or a
current category
public void setOption(OptionModel optionModel)
throws IllegalStateException
optionModel - the option to use
IllegalStateException - if there is not a current model, nor
category, or a current optionpublic void setCloseAction(Runnable runnable)
protected CategoryModel flushCategory()
protected OptionModel flushOption()
protected void checkCurrent(Object o,
String type)
protected void checkNoCurrent(Object o,
String type)
protected void checkNotNull(Object o,
String method,
String parameter)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||