public class BoundsPreferenceProperty extends AbstractBasicChangeableItem implements PreferenceProperty
PROPERTY_VALUE
Constructor and Description |
---|
BoundsPreferenceProperty(java.lang.String basicName) |
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.
|
addValueChangeListener, addValueChangeListenerWeakly, firePropertyChange, fireValueChange, fireValueChange, fireValueChange, getBasicName, getPropertyName, removeValueChangeListener, removeValueChangeListenerWeakly
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addValueChangeListener, addValueChangeListenerWeakly, removeValueChangeListener, removeValueChangeListenerWeakly
public BoundsPreferenceProperty(@NotNull java.lang.String basicName)
public void readFrom(@NotNull java.util.prefs.Preferences preferences)
readFrom
in interface PreferenceProperty
preferences
- preferences from where to read the property valuepublic void storeTo(@NotNull java.util.prefs.Preferences preferences)
storeTo
in interface PreferenceProperty
preferences
- preferences where to store the property valuepublic boolean setWindowBounds(@NotNull java.awt.Window window)
window
- window which bounds should be settrue
if the bounds of the window are set,
otherwise false
public void storeWindowBounds(@NotNull java.util.prefs.Preferences preferences, @NotNull java.awt.Window window)
preferences
- preferences to store towindow
- window which bounds are storedpublic void setBounds(java.awt.Rectangle bounds)
bounds
- new boundspublic void setBounds(java.awt.Window window)
window
- window from which to set the bounds