Class MetisPreferenceSet.MetisPreferenceItem

java.lang.Object
io.github.tonywasher.joceanus.metis.preference.MetisPreferenceSet.MetisPreferenceItem
Direct Known Subclasses:
MetisPreferenceSet.MetisBooleanPreference, MetisPreferenceSet.MetisDatePreference, MetisPreferenceSet.MetisEnumPreference, MetisPreferenceSet.MetisIntegerPreference, MetisPreferenceSet.MetisStringPreference, PrometheusPreferenceSet.PrometheusByteArrayPreference, PrometheusPreferenceSet.PrometheusCharArrayPreference
Enclosing class:
MetisPreferenceSet

public abstract static class MetisPreferenceSet.MetisPreferenceItem extends Object
Underlying preference item class.
  • Constructor Details

  • Method Details

    • getViewerValue

      Object getViewerValue()
      Obtain viewer value.
      Returns:
      the value
    • getSet

      protected MetisPreferenceSet getSet()
      Obtain the preferenceSet.
      Returns:
      the set
    • getHandle

      protected Preferences getHandle()
      Obtain the preference handle.
      Returns:
      the preference handle
    • getKey

      protected MetisPreferenceKey getKey()
      Obtain the key of the preference.
      Returns:
      the key of the preference
    • getPreferenceName

      protected String getPreferenceName()
      Obtain the name of the preference.
      Returns:
      the name of the preference
    • getDisplay

      public String getDisplay()
      Obtain the display name of the preference.
      Returns:
      the display name of the preference
    • getType

      Obtain the type of the preference.
      Returns:
      the type of the preference
    • getValue

      protected Object getValue()
      Obtain the value of the preference.
      Returns:
      the value of the preference
    • isAvailable

      public boolean isAvailable()
      Is the preference available?
      Returns:
      true/false
    • isChanged

      public boolean isChanged()
      Is the preference changed?
      Returns:
      true/false
    • isHidden

      public boolean isHidden()
      Is the preference hidden?
      Returns:
      true/false
    • setHidden

      public void setHidden(boolean pHidden)
      Set hidden.
      Parameters:
      pHidden - true/false
    • setTheValue

      protected void setTheValue(Object pValue)
      Set value.
      Parameters:
      pValue - the value
    • setNewValue

      protected void setNewValue(Object pNewValue)
      Set new value.
      Parameters:
      pNewValue - the new value
    • storeThePreference

      protected abstract void storeThePreference(Object pNewValue) throws OceanusException
      Store the value of the preference.
      Parameters:
      pNewValue - the new value to store
      Throws:
      OceanusException - on error