|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuiton.widget.SwingSession
public class SwingSession
Use to store and restore position and size of application. Supported widgets are:
| Nested Class Summary | |
|---|---|
static interface |
SwingSession.Action
|
static class |
SwingSession.JSplitPaneState
State for JSplit FIXME add listener for divider move action |
static class |
SwingSession.JTabbedPaneState
State for JTabbedPane |
static class |
SwingSession.JTableState
State for JTable. |
static class |
SwingSession.RestoreStateAction
|
static class |
SwingSession.SaveStateAction
|
static interface |
SwingSession.State
get(save) and set(restore) state of object passed in argument |
static class |
SwingSession.WindowState
State for Window |
| Field Summary | |
|---|---|
protected boolean |
autoSave
|
protected File |
file
|
protected LinkedHashSet<Component> |
registeredComponent
|
protected Map<Class,SwingSession.State> |
stateManager
State object registered to get and set State. |
protected Map<String,SwingSession.State> |
states
state of all component added with add method. |
| Constructor Summary | |
|---|---|
SwingSession(File file,
boolean autoSave)
|
|
| Method Summary | |
|---|---|
void |
add(Component c)
|
protected void |
finalize()
|
protected String |
getComponentName(Component c)
|
SwingSession.State |
getStateManager(Class clazz)
|
SwingSession.State |
getStates(String path)
|
Map<String,SwingSession.State> |
loadStates(File file)
Loads the states from the file |
static void |
main(String[] args)
Just for test rapidly |
void |
remove(Component c)
Remove component from component to save |
void |
save()
|
void |
setStates(String path,
SwingSession.State state)
|
void |
updateState()
|
protected void |
walkThrowComponent(String path,
Collection<Component> roots,
SwingSession.Action action)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected File file
protected boolean autoSave
protected LinkedHashSet<Component> registeredComponent
protected Map<Class,SwingSession.State> stateManager
protected Map<String,SwingSession.State> states
| Constructor Detail |
|---|
public SwingSession(File file, boolean autoSave)
| Method Detail |
|---|
protected void finalize()
throws Throwable
public void save()
public Map<String,SwingSession.State> loadStates(File file)
public void updateState()
public void add(Component c)
public void remove(Component c)
c - protected String getComponentName(Component c)
public SwingSession.State getStateManager(Class clazz)
public SwingSession.State getStates(String path)
public void setStates(String path, SwingSession.State state)
protected void walkThrowComponent(String path, Collection<Component> roots, SwingSession.Action action)
public static void main(String[] args)
args -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||