public class SizePreferenceProperty extends AbstractBasicChangeableItem implements PreferenceProperty
PROPERTY_VALUE
Constructor and Description |
---|
SizePreferenceProperty(java.lang.String basicName) |
Modifier and Type | Method and Description |
---|---|
void |
readFrom(java.util.prefs.Preferences preferences)
Read the property value from the preferences.
|
boolean |
setComponentSize(java.awt.Component comp)
Set the size of the given component.
|
void |
setSize(java.awt.Component comp)
Set the dimension directly.
|
void |
setSize(java.awt.Dimension dim)
Set the dimesnion directly.
|
void |
storeComponentSize(java.util.prefs.Preferences preferences,
java.awt.Component comp)
Get the size of the component and store them in the preferences.
|
void |
storeTo(java.util.prefs.Preferences preferences)
Store the current property value 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 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 setComponentSize(@NotNull java.awt.Component comp)
comp
- component which size should be settrue
if the size of the component is set,
otherwise false
public void storeComponentSize(@NotNull java.util.prefs.Preferences preferences, @NotNull java.awt.Component comp)
preferences
- preferences to store tocomp
- component which size is storedpublic void setSize(@Nullable java.awt.Dimension dim)
dim
- new dimensionpublic void setSize(@NotNull java.awt.Component comp)
comp
- component from which to set the dimension