public class SwingSession extends Object
Modifier and Type | Class and Description |
---|---|
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
|
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
SwingSession(File file,
boolean autoSave) |
Modifier and Type | Method and Description |
---|---|
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
|
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) |
protected File file
protected boolean autoSave
protected LinkedHashSet<Component> registeredComponent
protected Map<Class,SwingSession.State> stateManager
protected Map<String,SwingSession.State> states
public SwingSession(File file, boolean autoSave)
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
- 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)
Copyright © 1999–2020 CodeLutin. All rights reserved.