public class SwingSession extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
SwingSession.Action |
static class |
SwingSession.RestoreStateAction |
static class |
SwingSession.SaveStateAction |
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
autoSave |
protected File |
file |
protected Set<Component> |
registeredComponent |
protected Map<Class,State> |
stateManager
State object registered to get and set State.
|
protected Map<String,State> |
states
state of all component added with add method.
|
| Constructor and Description |
|---|
SwingSession(File file,
boolean autoSave) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Component c) |
void |
addToStateManager(Class component,
State state) |
protected void |
finalize() |
protected String |
getComponentName(Component c) |
State |
getStateManager(Class clazz) |
State |
getStates(String path) |
Map<String,State> |
loadStates(File file)
Loads the states from the file
|
void |
remove(Component c)
Remove component from component to save
|
void |
save() |
void |
setStates(String path,
State state) |
void |
updateState() |
protected void |
walkThrowComponent(String path,
Collection<Component> roots,
SwingSession.Action action) |
protected File file
protected boolean autoSave
protected Map<Class,State> stateManager
public SwingSession(File file, boolean autoSave)
protected void finalize()
throws Throwable
public void save()
public void updateState()
public void add(Component c)
public void remove(Component c)
c - protected void walkThrowComponent(String path, Collection<Component> roots, SwingSession.Action action)
Copyright © 2008-2013 CodeLutin. All Rights Reserved.