| 
 
 | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectComponentLocationPreference
@ThreadRestricted(value="AWT event dispatch") public class ComponentLocationPreference
Preference storage for component location. Stores under keys "x" and "y".
| Field Summary | |
|---|---|
protected  Component | 
component
 | 
| Constructor Summary | |
|---|---|
ComponentLocationPreference(Component c,
                                                       Preferences preferences)
Creates a ComponentLocationPreference.  | 
|
| Method Summary | |
|---|---|
 Preferences | 
preferences()
Returns the preference node used for storage.  | 
 void | 
restore(int defaultX,
               int defaultY)
Restores the preferred location, and begins automatically storing changes.  | 
 void | 
restore(Point defaultLocation)
Restores the preferred location, 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 ComponentLocationPreference(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 location to store and restorepreferences - per preferences()| Method Detail | 
|---|
public Preferences preferences()
public void restore(Point defaultLocation)
defaultLocation - in case no stored preference available
public void restore(int defaultX,
                    int defaultY)
defaultX - in case no stored preference availabledefaultY - in case no stored preference available
  | 
 
 | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||