WindowStateManager: save/applyState für Object hinzugefügt
parent
9dce9a2d76
commit
0c72517c3c
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue