|
||||||||||
| 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(java.lang.String categoryName,
java.lang.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,
java.lang.String propertyName)
Add a new option with a propertyName, and set it as current. |
protected void |
checkCurrent(java.lang.Object o,
java.lang.String type)
|
protected void |
checkNoCurrent(java.lang.Object o,
java.lang.String type)
|
protected void |
checkNotNull(java.lang.Object o,
java.lang.String method,
java.lang.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(java.lang.String name,
java.lang.String description,
javax.swing.Icon icon,
java.lang.Runnable action)
Registers a new callback. |
void |
setCategory(CategoryModel categoryModel)
Set the given category as current category. |
void |
setCloseAction(java.lang.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(java.lang.String name)
Registers the current option into a known callback. |
void |
setOptionEditor(javax.swing.table.TableCellEditor editor)
Set the editor on the current option. |
void |
setOptionPropertyName(java.lang.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 java.lang.IllegalStateException,
java.lang.NullPointerException
config - the configuration used in model
java.lang.IllegalStateException - if there is already a current model
java.lang.NullPointerException - if config is null
public void addCategory(java.lang.String categoryName,
java.lang.String categoryLabel)
throws java.lang.IllegalStateException,
java.lang.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)
java.lang.IllegalStateException - if there is not a current model,
nor category
java.lang.NullPointerException - if any of parameter is null
public void addOption(org.nuiton.util.ApplicationConfig.OptionDef def)
throws java.lang.IllegalStateException,
java.lang.NullPointerException
def - the def ot the new option
java.lang.IllegalStateException - if there is not a current model,
nor category
java.lang.NullPointerException - if any of parameter is null
public void addOption(org.nuiton.util.ApplicationConfig.OptionDef def,
java.lang.String propertyName)
throws java.lang.IllegalStateException,
java.lang.NullPointerException
addOption(org.nuiton.util.ApplicationConfig.OptionDef) then
setOptionPropertyName(String).
def - the def ot the new optionpropertyName - the propertyName to set on the option
java.lang.IllegalStateException - if there is not a current model, nor
category
java.lang.NullPointerException - if any of parameter is null
public void setOptionPropertyName(java.lang.String propertyName)
throws java.lang.IllegalStateException,
java.lang.NullPointerException
propertyName - the propertyName to set in the current option.
java.lang.IllegalStateException - if there is not a current option set.
java.lang.NullPointerException - if any of parameter is nullOptionModel.setPropertyName(String)
public void setOptionEditor(javax.swing.table.TableCellEditor editor)
throws java.lang.IllegalStateException,
java.lang.NullPointerException
editor - the editor to set in the current option.
java.lang.IllegalStateException - if there is not a current option set.
java.lang.NullPointerException - if any of parameter is nullOptionModel.setEditor(TableCellEditor)
public void registerCallBack(java.lang.String name,
java.lang.String description,
javax.swing.Icon icon,
java.lang.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(java.lang.String name)
name - the name of the callbackpublic void setFinalizer(CallBackFinalizer finalizer)
public ConfigUIModel flushModel()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - if there is not a current model set.
public void setModel(ConfigUIModel model)
throws java.lang.IllegalStateException
model - the model to use
java.lang.IllegalStateException - if there is already a current model
public void setCategory(CategoryModel categoryModel)
throws java.lang.IllegalStateException
categoryModel - the category to use
java.lang.IllegalStateException - if there is not a current model or a
current category
public void setOption(OptionModel optionModel)
throws java.lang.IllegalStateException
optionModel - the option to use
java.lang.IllegalStateException - if there is not a current model, nor
category, or a current optionpublic void setCloseAction(java.lang.Runnable runnable)
protected CategoryModel flushCategory()
protected OptionModel flushOption()
protected void checkCurrent(java.lang.Object o,
java.lang.String type)
protected void checkNoCurrent(java.lang.Object o,
java.lang.String type)
protected void checkNotNull(java.lang.Object o,
java.lang.String method,
java.lang.String parameter)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||