Class ConfigUIModel

java.lang.Object
jaxx.runtime.swing.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.
Since:
2.5.11
Author:
Tony Chemit - chemit@codelutin.com
  • Field Details

    • 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
    • configFile

      protected final java.io.File configFile
      Le fichier où sauvegarder la configuration.
      Since:
      2.5.21
    • configBean

      protected final java.lang.Object configBean
      La configuration de l'application
    • applicationConfig

      protected final org.nuiton.config.ApplicationConfig applicationConfig
      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.
    • callBacksManager

      protected CallBacksManager callBacksManager
      Callbacks manager
    • closeAction

      protected java.lang.Runnable closeAction
      optional action to execute (if not null) if no call backs fits.
      Since:
      1.4.2
    • pcs

      protected final java.beans.PropertyChangeSupport pcs
      support of modification notifications
  • Constructor Details

    • ConfigUIModel

      public ConfigUIModel​(java.lang.Object configBean, org.nuiton.config.ApplicationConfig applicationConfig, java.io.File configFile)
    • ConfigUIModel

      @Deprecated public ConfigUIModel​(com.google.common.base.Supplier<org.nuiton.config.ApplicationConfig> config)
      Deprecated.
    • ConfigUIModel

      @Deprecated public ConfigUIModel​(java.lang.Object configBean, org.nuiton.config.ApplicationConfig applicationConfig)
      Deprecated.
    • ConfigUIModel

      @Deprecated public ConfigUIModel​(com.google.common.base.Supplier<org.nuiton.config.ApplicationConfig> config, java.io.File configFile)
      Deprecated.
    • ConfigUIModel

      @Deprecated public ConfigUIModel​(org.nuiton.config.ApplicationConfig applicationConfig)
      Deprecated.
    • ConfigUIModel

      @Deprecated public ConfigUIModel​(org.nuiton.config.ApplicationConfig applicationConfig, java.io.File configFile)
      Deprecated.
  • Method Details

    • addCategory

      public void addCategory​(CategoryModel category)
      Ajoute une categorie dans le modele.
      Parameters:
      category - la categorie a ajouter au modèle.
    • setCategory

      public void setCategory​(java.lang.String category)
      Change la categorie en cours d'édition.
      Parameters:
      category - l'id de la categorie courante
    • registerCallBack

      public void registerCallBack​(java.lang.String name, java.lang.String description, javax.swing.Icon icon, java.lang.Runnable action)
      Registers a new callback. Note: the order of registred callback is used to determine the higher priority of callback to launch if required.
      Parameters:
      name - the unique name of a callback
      description - the i18n key to describe the action
      icon - the icon of the callBack (used in ui)
      action - the action of the callback
    • registerOptionCallBack

      public void registerOptionCallBack​(java.lang.String name, OptionModel option)
      Registers a option into a known callback.
      Parameters:
      name - the name of the callback
      option - the option to register for the given callback
    • setFinalizer

      public void setFinalizer​(CallBackFinalizer finalizer)
    • getCloseAction

      public java.lang.Runnable getCloseAction()
    • setCloseAction

      public void setCloseAction​(java.lang.Runnable closeAction)
    • getCallBacksForSaved

      public CallBackMap getCallBacksForSaved()
      Obtain the dictionnary of callback for all to saved modified options.
      Returns:
      the dictonnary
    • 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()
    • destroy

      public void destroy()
    • finalize

      protected void finalize() throws java.lang.Throwable
      Overrides:
      finalize in class java.lang.Object
      Throws:
      java.lang.Throwable
    • getConfig

      protected org.nuiton.config.ApplicationConfig getConfig()
      Deprecated.
      since 2.5.4 use now getApplicationConfig().
      Returns:
      the underlined application config
    • getApplicationConfig

      protected org.nuiton.config.ApplicationConfig getApplicationConfig()
      Returns:
      the underlined application config
      Since:
      2.5.4
    • getCallBacksManager

      protected CallBacksManager getCallBacksManager()
    • getCategoryName

      public java.lang.String getCategoryName​(int index)