60 |
implements WindowConstants, RootPaneContainer |
implements WindowConstants, RootPaneContainer |
61 |
{ |
{ |
62 |
private static final long serialVersionUID = -3362141868504252139L; |
private static final long serialVersionUID = -3362141868504252139L; |
|
protected AccessibleContext accessibleContext; |
|
|
private int close_action = HIDE_ON_CLOSE; |
|
63 |
private static boolean defaultLookAndFeelDecorated = false; |
private static boolean defaultLookAndFeelDecorated = false; |
64 |
|
private int close_action = HIDE_ON_CLOSE; |
65 |
|
protected AccessibleContext accessibleContext; |
66 |
|
protected JRootPane rootPane; |
67 |
|
protected boolean rootPaneCheckingEnabled; |
68 |
|
|
|
public static void setDefaultLookAndFeelDecorated(boolean d) |
|
|
{ |
|
|
defaultLookAndFeelDecorated = d; |
|
|
} |
|
|
|
|
|
public static boolean isDefaultLookAndFeelDecorated() |
|
|
{ |
|
|
return defaultLookAndFeelDecorated; |
|
|
} |
|
|
|
|
|
/*************************************************** |
|
|
* |
|
|
* initia |
|
|
* |
|
|
* |
|
|
*************/ |
|
69 |
public JFrame() |
public JFrame() |
70 |
{ |
{ |
71 |
super("JFrame"); |
super("JFrame"); |
78 |
frameInit(); |
frameInit(); |
79 |
} |
} |
80 |
|
|
|
/*************************************************** |
|
|
* |
|
|
* |
|
|
* methods, this part is shared with JDialog, JFrame |
|
|
* |
|
|
* |
|
|
*************/ |
|
|
private boolean checking; |
|
|
protected JRootPane rootPane; |
|
|
|
|
81 |
protected void frameInit() |
protected void frameInit() |
82 |
{ |
{ |
83 |
super.setLayout(new BorderLayout(1, 1)); |
super.setLayout(new BorderLayout(1, 1)); |
87 |
|
|
88 |
public Dimension getPreferredSize() |
public Dimension getPreferredSize() |
89 |
{ |
{ |
90 |
Dimension d = super.getPreferredSize(); |
return super.getPreferredSize(); |
|
return d; |
|
91 |
} |
} |
92 |
|
|
93 |
public JMenuBar getJMenuBar() |
public JMenuBar getJMenuBar() |
168 |
|
|
169 |
protected boolean isRootPaneCheckingEnabled() |
protected boolean isRootPaneCheckingEnabled() |
170 |
{ |
{ |
171 |
return checking; |
return rootPaneCheckingEnabled; |
172 |
} |
} |
173 |
|
|
174 |
protected void setRootPaneCheckingEnabled(boolean enabled) |
protected void setRootPaneCheckingEnabled(boolean enabled) |
175 |
{ |
{ |
176 |
checking = enabled; |
rootPaneCheckingEnabled = enabled; |
177 |
} |
} |
178 |
|
|
179 |
public void update(Graphics g) |
public void update(Graphics g) |
186 |
super.processKeyEvent(e); |
super.processKeyEvent(e); |
187 |
} |
} |
188 |
|
|
189 |
///////////////////////////////////////////////////////////////////////////////// |
public static void setDefaultLookAndFeelDecorated(boolean decorated) |
190 |
|
{ |
191 |
|
defaultLookAndFeelDecorated = decorated; |
192 |
|
} |
193 |
|
|
194 |
|
public static boolean isDefaultLookAndFeelDecorated() |
195 |
|
{ |
196 |
|
return defaultLookAndFeelDecorated; |
197 |
|
} |
198 |
|
|
199 |
public AccessibleContext getAccessibleContext() |
public AccessibleContext getAccessibleContext() |
200 |
{ |
{ |
201 |
return accessibleContext; |
return accessibleContext; |