| 
 
 | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectComponentSizePreference
@ThreadRestricted(value="AWT event dispatch") public final class ComponentSizePreference
Preference storage for component size. Stores under keys "width" and "height".
| Field Summary | |
|---|---|
protected  Component | 
component
 | 
| Constructor Summary | |
|---|---|
ComponentSizePreference(Component c,
                                               Preferences preferences)
Creates a ComponentSizePreference.  | 
|
| Method Summary | |
|---|---|
 Preferences | 
preferences()
Returns the preference node used for storage.  | 
 void | 
restore(Dimension defaultSize)
Restores the preferred size, and begins automatically storing changes.  | 
 void | 
restore(int defaultWidth,
               int defaultHeight)
Restores the preferred size, and begins automatically storing changes.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected final Component component
| Constructor Detail | 
|---|
public ComponentSizePreference(Component c,
                               Preferences preferences)
There is currently no way to remove it from the component. Create one only per component, or they will accumulate.
c - component whose size to store and restorepreferences - per preferences()| Method Detail | 
|---|
public Preferences preferences()
public void restore(Dimension defaultSize)
defaultSize - in case no stored preference available
public void restore(int defaultWidth,
                    int defaultHeight)
defaultWidth - in case no stored preference availabledefaultHeight - in case no stored preference available
  | 
 
 | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||