jaxx.runtime.swing.editor.config.model
Class ConfigUIModel

java.lang.Object
  extended by jaxx.runtime.swing.editor.config.model.ConfigUIModel
All Implemented Interfaces:
java.lang.Iterable<CategoryModel>

public class ConfigUIModel
extends java.lang.Object
implements java.lang.Iterable<CategoryModel>

Le modele de l'ui des preferences. Ce modele contient les catégories des options.

Author:
chemit

Field Summary
protected  java.util.Map<java.lang.String,CategoryModel> categories
          le dictionnaire des options disponibles par categorie
static java.lang.String CATEGORY_MODEL_PROPERTY_NAME
           
protected  CategoryModel categoryModel
          la cateogrie en cours d'utilisation
protected  org.nuiton.util.ApplicationConfig config
          La configuration de l'application
protected  java.beans.PropertyChangeSupport pcs
          suport of modification
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 Summary
ConfigUIModel(org.nuiton.util.ApplicationConfig config)
           
 
Method Summary
 void addCategory(java.lang.String category, java.lang.String categoryLabel, org.nuiton.util.ApplicationConfig.OptionDef... keys)
          Ajoute une categorie dans le modele.
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
           
 void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
           
 int getCategoryIndex(java.lang.String category)
           
 CategoryModel getCategoryModel()
           
 java.beans.PropertyChangeListener[] getPropertyChangeListeners()
           
 java.beans.PropertyChangeListener[] getPropertyChangeListeners(java.lang.String propertyName)
           
 boolean hasListeners(java.lang.String propertyName)
           
 boolean isSaved()
           
 boolean isStandalone()
           
 java.util.Iterator<CategoryModel> iterator()
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
           
 void reset()
           
 void saveModified()
           
 void setCategory(java.lang.String category)
          Change la categorie en cours d'édition.
 void setCategoryModel(CategoryModel categoryModel)
           
 void setSaved(boolean saved)
           
 void setStandalone(boolean standalone)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CATEGORY_MODEL_PROPERTY_NAME

public static final java.lang.String CATEGORY_MODEL_PROPERTY_NAME
See Also:
Constant Field Values

categories

protected final java.util.Map<java.lang.String,CategoryModel> categories
le dictionnaire des options disponibles par categorie


config

protected final org.nuiton.util.ApplicationConfig config
La configuration de l'application


categoryModel

protected CategoryModel categoryModel
la cateogrie en cours d'utilisation


saved

protected boolean saved
un drapeau pour savoir si la configuration a été modifiée au moins une fois. On utilise ce drapeau lors de la sortie pour verifier s'il faut ou non redemarer l'application (si non en mode standalone)


standalone

protected boolean standalone
un drapeau pour savoir si l'ui de configuration a été lancée en mode standalone ou pas. Si pas lancée en mode standalone, et si la confi a été sauvé on vérifie s'il ne faut pas relancer l'application.


pcs

protected final java.beans.PropertyChangeSupport pcs
suport of modification

Constructor Detail

ConfigUIModel

public ConfigUIModel(org.nuiton.util.ApplicationConfig config)
Method Detail

addCategory

public void addCategory(java.lang.String category,
                        java.lang.String categoryLabel,
                        org.nuiton.util.ApplicationConfig.OptionDef... keys)
Ajoute une categorie dans le modele.

Parameters:
category - l'id de la categorie (la clef de traduction du nom de la categorie)
categoryLabel - la clef de traduction de la description de la categorie
keys - les options de la categorie

setCategory

public void setCategory(java.lang.String category)
Change la categorie en cours d'édition.

Parameters:
category - l'id de la categorie courante

iterator

public java.util.Iterator<CategoryModel> iterator()
Specified by:
iterator in interface java.lang.Iterable<CategoryModel>

getCategoryModel

public CategoryModel getCategoryModel()

setCategoryModel

public void setCategoryModel(CategoryModel categoryModel)

isSaved

public boolean isSaved()

setSaved

public void setSaved(boolean saved)

isStandalone

public boolean isStandalone()

setStandalone

public void setStandalone(boolean standalone)

saveModified

public void saveModified()

reset

public void reset()

getCategoryIndex

public int getCategoryIndex(java.lang.String category)

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               java.lang.Object oldValue,
                               java.lang.Object newValue)

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String propertyName,
                                      java.beans.PropertyChangeListener listener)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String propertyName,
                                         java.beans.PropertyChangeListener listener)

hasListeners

public boolean hasListeners(java.lang.String propertyName)

getPropertyChangeListeners

public java.beans.PropertyChangeListener[] getPropertyChangeListeners(java.lang.String propertyName)

getPropertyChangeListeners

public java.beans.PropertyChangeListener[] getPropertyChangeListeners()


Copyright © 2008-2009 CodeLutin. All Rights Reserved.