public class ConfigUIModel extends Object implements Iterable<CategoryModel>
| Modifier and Type | Field and Description |
|---|---|
protected CallBacksManager |
callBacksManager
Callbacks manager
|
protected Map<String,CategoryModel> |
categories
le dictionnaire des options disponibles par categorie
|
static String |
CATEGORY_MODEL_PROPERTY_NAME |
protected CategoryModel |
categoryModel
la cateogrie en cours d'utilisation
|
protected Runnable |
closeAction
optional action to execute (if not null) if no call backs fits.
|
protected org.nuiton.util.ApplicationConfig |
config
La configuration de l'application
|
protected PropertyChangeSupport |
pcs
support of modification notifications
|
protected boolean |
saved
un drapeau pour savoir si la configuration a été modifiée au moins une
fois.
|
protected boolean |
standalone
un drapeau pour savoir si l'ui de configuration a été lancée en mode
standalone ou pas.
|
| Constructor and Description |
|---|
ConfigUIModel(org.nuiton.util.ApplicationConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCategory(CategoryModel category)
Ajoute une categorie dans le modele.
|
void |
addPropertyChangeListener(PropertyChangeListener listener) |
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener) |
void |
destroy() |
protected void |
finalize() |
void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue) |
CallBackMap |
getCallBacksForSaved()
Obtain the dictionnary of callback for all to saved modified options.
|
protected CallBacksManager |
getCallBacksManager() |
int |
getCategoryIndex(String category) |
CategoryModel |
getCategoryModel() |
Runnable |
getCloseAction() |
protected org.nuiton.util.ApplicationConfig |
getConfig() |
PropertyChangeListener[] |
getPropertyChangeListeners() |
PropertyChangeListener[] |
getPropertyChangeListeners(String propertyName) |
boolean |
hasListeners(String propertyName) |
boolean |
isSaved() |
boolean |
isStandalone() |
Iterator<CategoryModel> |
iterator() |
void |
registerCallBack(String name,
String description,
Icon icon,
Runnable action)
Registers a new callback.
|
void |
registerOptionCallBack(String name,
OptionModel option)
Registers a option into a known callback.
|
void |
removePropertyChangeListener(PropertyChangeListener listener) |
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener) |
void |
reset() |
void |
saveModified() |
void |
setCategory(String category)
Change la categorie en cours d'édition.
|
void |
setCategoryModel(CategoryModel categoryModel) |
void |
setCloseAction(Runnable closeAction) |
void |
setFinalizer(CallBackFinalizer finalizer) |
void |
setSaved(boolean saved) |
void |
setStandalone(boolean standalone) |
public static final String CATEGORY_MODEL_PROPERTY_NAME
protected final Map<String,CategoryModel> categories
protected final org.nuiton.util.ApplicationConfig config
protected CategoryModel categoryModel
protected boolean saved
protected boolean standalone
protected CallBacksManager callBacksManager
protected Runnable closeAction
protected final PropertyChangeSupport pcs
public void addCategory(CategoryModel category)
category - la categorie a ajouter au modèle.public void setCategory(String category)
category - l'id de la categorie courantepublic 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 registerOptionCallBack(String name, OptionModel option)
name - the name of the callbackoption - the option to register for the given callbackpublic void setFinalizer(CallBackFinalizer finalizer)
public Runnable getCloseAction()
public void setCloseAction(Runnable closeAction)
public CallBackMap getCallBacksForSaved()
public Iterator<CategoryModel> iterator()
iterator in interface Iterable<CategoryModel>public CategoryModel getCategoryModel()
public void setCategoryModel(CategoryModel categoryModel)
public boolean isSaved()
public void setSaved(boolean saved)
public boolean isStandalone()
public void setStandalone(boolean standalone)
public void saveModified()
public void reset()
public int getCategoryIndex(String category)
public void firePropertyChange(String propertyName, Object oldValue, Object newValue)
public void addPropertyChangeListener(PropertyChangeListener listener)
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
public void removePropertyChangeListener(PropertyChangeListener listener)
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
public boolean hasListeners(String propertyName)
public PropertyChangeListener[] getPropertyChangeListeners(String propertyName)
public PropertyChangeListener[] getPropertyChangeListeners()
public void destroy()
protected void finalize()
throws Throwable
protected org.nuiton.util.ApplicationConfig getConfig()
protected CallBacksManager getCallBacksManager()
Copyright © 2008-2012 CodeLutin. All Rights Reserved.