de.caff.util.settings

## Class BoundsPreferenceProperty

- java.lang.Object
- - de.caff.util.settings.AbstractBasicChangeableItem
  - - de.caff.util.settings.BoundsPreferenceProperty

- All Implemented Interfaces:
    ChangeableItem, PreferenceProperty, java.io.Serializable

      public class BoundsPreferenceProperty
      extends AbstractBasicChangeableItem
      implements PreferenceProperty

  A preference property which describes a bounds. A bounds is consisting of a position and a dimension.
  Author:
    Rammi
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from interface de.caff.util.settings.PreferenceProperty

      `PROPERTY_VALUE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BoundsPreferenceProperty(java.lang.String basicName)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `readFrom(java.util.prefs.Preferences preferences)` Read the property value from the preferences.
    `void` | `setBounds(java.awt.Rectangle bounds)` Set the bounds directly.
    `void` | `setBounds(java.awt.Window window)` Set the bounds directly.
    `boolean` | `setWindowBounds(java.awt.Window window)` Set the bounds of the given window.
    `void` | `storeTo(java.util.prefs.Preferences preferences)` Store the current property value in the preferences.
    `void` | `storeWindowBounds(java.util.prefs.Preferences preferences, java.awt.Window window)` Get the bounds of the window and store them in the preferences.

    - ### Methods inherited from class de.caff.util.settings.AbstractBasicChangeableItem

      `addValueChangeListener, addValueChangeListenerWeakly, firePropertyChange, fireValueChange, fireValueChange, fireValueChange, getBasicName, getPropertyName, removeValueChangeListener, removeValueChangeListenerWeakly`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface de.caff.util.settings.ChangeableItem

      `addValueChangeListener, addValueChangeListenerWeakly, removeValueChangeListener, removeValueChangeListenerWeakly`

- - ### Constructor Detail

    - #### BoundsPreferenceProperty

          public BoundsPreferenceProperty(@NotNull
                                          java.lang.String basicName)

  - ### Method Detail

    - #### readFrom

          public void readFrom(@NotNull
                               java.util.prefs.Preferences preferences)

      Read the property value from the preferences.
      Specified by:
        `readFrom` in interface `PreferenceProperty`
      Parameters:
        `preferences` - preferences from where to read the property value

    - #### storeTo

          public void storeTo(@NotNull
                              java.util.prefs.Preferences preferences)

      Store the current property value in the preferences.
      Specified by:
        `storeTo` in interface `PreferenceProperty`
      Parameters:
        `preferences` - preferences where to store the property value

    - #### setWindowBounds

          public boolean setWindowBounds(@NotNull
                                         java.awt.Window window)

      Set the bounds of the given window.
      Parameters:
        `window` - window which bounds should be set
      Returns:
        `true` if the bounds of the window are set, otherwise `false`

    - #### storeWindowBounds

          public void storeWindowBounds(@NotNull
                                        java.util.prefs.Preferences preferences,
                                        @NotNull
                                        java.awt.Window window)

      Get the bounds of the window and store them in the preferences.
      Parameters:
        `preferences` - preferences to store to
        `window` - window which bounds are stored

    - #### setBounds

          public void setBounds(java.awt.Rectangle bounds)

      Set the bounds directly.
      Parameters:
        `bounds` - new bounds

    - #### setBounds

          public void setBounds(java.awt.Window window)

      Set the bounds directly.
      Parameters:
        `window` - window from which to set the bounds