01: package vicazh.hyperpool;
02:
03: import java.awt.*;
04: import java.io.*;
05: import javax.swing.*;
06: import javax.swing.plaf.metal.*;
07:
08: /**
09: * The user properties
10: *
11: * @author Victor Zhigunov
12: * @version 0.3.6
13: */
14: public class IUser implements Runnable {
15: public IUser() {
16: }
17:
18: private Writer writer;
19:
20: private File file;
21:
22: public void setOut(Writer writer, File file) {
23: this .writer = writer;
24: this .file = file;
25: }
26:
27: private Component component;
28:
29: public void setComponent(Component component) {
30: this .component = component;
31: }
32:
33: private JSplitPane pane;
34:
35: public void setPane(JSplitPane pane) {
36: this .pane = pane;
37: }
38:
39: public void run() {
40: bounds = component.getBounds();
41: location = pane.getDividerLocation();
42: theme = MetalLookAndFeel.getCurrentTheme().getName();
43: tray = !component.isVisible();
44: try {
45: writer.putObject(this , file);
46: } catch (Exception e) {
47: }
48: }
49:
50: private Rectangle bounds;
51:
52: public Rectangle getBounds() {
53: return bounds;
54: }
55:
56: public void setBounds(Rectangle bounds) {
57: this .bounds = bounds;
58: }
59:
60: private int location;
61:
62: public int getLocation() {
63: return location;
64: }
65:
66: public void setLocation(int location) {
67: this .location = location;
68: }
69:
70: private String theme;
71:
72: public String getTheme() {
73: return theme;
74: }
75:
76: public void setTheme(String theme) {
77: this .theme = theme;
78: }
79:
80: private boolean tray;
81:
82: public boolean getTray() {
83: return tray;
84: }
85:
86: public void setTray(boolean tray) {
87: this.tray = tray;
88: }
89: }
|