WindowStateManager: save/applyState für Object hinzugefügt

thobaben_diagram
Harald Wolff 2016-09-15 16:53:37 +02:00
parent 9dce9a2d76
commit 0c72517c3c
1 changed files with 13 additions and 0 deletions

View File

@ -11,6 +11,13 @@ import java.util.Properties;
public class WindowStateManager {
public String saveState(Object o){
if (Component.class.isInstance(o)){
return saveState((Component)o);
}
return null;
}
public String saveState(Component component){
WindowState ws = createWindowState(component);
ByteArrayOutputStream os = new ByteArrayOutputStream();
@ -23,6 +30,12 @@ public class WindowStateManager {
return new String(os.toByteArray());
}
public void applyState(Object o,String state){
if (Component.class.isInstance(o)){
applyState((Component)o, state);
}
}
public void applyState(Component c,String state){
WindowState ws = createWindowState(state);