Skip to content

Commit 354999f

Browse files
committed
dispense with JSInternalFrame
Just use JInternalFrame :)
1 parent 59b7293 commit 354999f

File tree

3 files changed

+23
-33
lines changed

3 files changed

+23
-33
lines changed
-569 Bytes
Binary file not shown.

sources/net.sf.j2s.java.core/src/javax/swing/JInternalFrame.java

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -111,22 +111,12 @@
111111
* description: A frame container which is contained within
112112
* another window.
113113
*/
114-
public class JSInternalFrame extends JFrame
114+
public class JInternalFrame extends JFrame
115115
implements
116116
//Accessible,
117117
WindowConstants,
118118
RootPaneContainer
119119
{
120-
121-
private class JSInternalPanel extends JPanel {
122-
123-
private JInternalFrame frame;
124-
125-
public JInternalFrame getFrame() {
126-
return frame;
127-
}
128-
129-
}
130120

131121
/**
132122
* @see #getUIClassID
@@ -195,7 +185,7 @@ public JInternalFrame getFrame() {
195185
* The icon that is displayed when this internal frame is iconified.
196186
* @see #iconable
197187
*/
198-
protected JSDesktopIcon desktopIcon;
188+
protected JDesktopIcon desktopIcon;
199189

200190
private Cursor lastCursor;
201191

@@ -277,9 +267,9 @@ private static void updateLastFocusOwner(Component component) {
277267
if (component != null) {
278268
Component parent = component;
279269
while (parent != null && !(parent instanceof Window)) {
280-
if (parent instanceof JSInternalFrame) {
270+
if (parent instanceof JInternalFrame) {
281271
// Update lastFocusOwner for parent.
282-
((JSInternalFrame)parent).setLastFocusOwner(component);
272+
((JInternalFrame)parent).setLastFocusOwner(component);
283273
}
284274
parent = parent.getParent();
285275
}
@@ -290,7 +280,7 @@ private static void updateLastFocusOwner(Component component) {
290280
* Creates a non-resizable, non-closable, non-maximizable,
291281
* non-iconifiable <code>JInternalFrame</code> with no title.
292282
*/
293-
public JSInternalFrame() {
283+
public JInternalFrame() {
294284
this("", false, false, false, false);
295285
}
296286

@@ -303,7 +293,7 @@ public JSInternalFrame() {
303293
* @param title the non-<code>null</code> <code>String</code>
304294
* to display in the title bar
305295
*/
306-
public JSInternalFrame(String title) {
296+
public JInternalFrame(String title) {
307297
this(title, false, false, false, false);
308298
}
309299

@@ -315,7 +305,7 @@ public JSInternalFrame(String title) {
315305
* @param title the <code>String</code> to display in the title bar
316306
* @param resizable if <code>true</code>, the internal frame can be resized
317307
*/
318-
public JSInternalFrame(String title, boolean resizable) {
308+
public JInternalFrame(String title, boolean resizable) {
319309
this(title, resizable, false, false, false);
320310
}
321311

@@ -328,7 +318,7 @@ public JSInternalFrame(String title, boolean resizable) {
328318
* @param resizable if <code>true</code>, the internal frame can be resized
329319
* @param closable if <code>true</code>, the internal frame can be closed
330320
*/
331-
public JSInternalFrame(String title, boolean resizable, boolean closable) {
321+
public JInternalFrame(String title, boolean resizable, boolean closable) {
332322
this(title, resizable, closable, false, false);
333323
}
334324

@@ -342,7 +332,7 @@ public JSInternalFrame(String title, boolean resizable, boolean closable) {
342332
* @param closable if <code>true</code>, the internal frame can be closed
343333
* @param maximizable if <code>true</code>, the internal frame can be maximized
344334
*/
345-
public JSInternalFrame(String title, boolean resizable, boolean closable,
335+
public JInternalFrame(String title, boolean resizable, boolean closable,
346336
boolean maximizable) {
347337
this(title, resizable, closable, maximizable, false);
348338
}
@@ -358,7 +348,7 @@ public JSInternalFrame(String title, boolean resizable, boolean closable,
358348
* @param maximizable if <code>true</code>, the internal frame can be maximized
359349
* @param iconifiable if <code>true</code>, the internal frame can be iconified
360350
*/
361-
public JSInternalFrame(String title, boolean resizable, boolean closable,
351+
public JInternalFrame(String title, boolean resizable, boolean closable,
362352
boolean maximizable, boolean iconifiable) {
363353
super("title", null, "InternalFrameUI");
364354
this.resizable = resizable;
@@ -367,7 +357,7 @@ public JSInternalFrame(String title, boolean resizable, boolean closable,
367357
isMaximum = false;
368358
this.iconable = iconifiable;
369359
isIcon = false;
370-
desktopIcon = new JSDesktopIcon(this);
360+
desktopIcon = new JDesktopIcon(this);
371361
addPropertyChangeListenerIfNecessary();
372362
}
373363

@@ -995,8 +985,8 @@ public JDesktopPane getDesktopPane() {
995985
* bound: true
996986
* description: The icon shown when this internal frame is minimized.
997987
*/
998-
public void setDesktopIcon(JSDesktopIcon d) {
999-
JSDesktopIcon oldValue = getDesktopIcon();
988+
public void setDesktopIcon(JDesktopIcon d) {
989+
JDesktopIcon oldValue = getDesktopIcon();
1000990
desktopIcon = d;
1001991
firePropertyChange("desktopIcon", oldValue, d);
1002992
}
@@ -1008,7 +998,7 @@ public void setDesktopIcon(JSDesktopIcon d) {
1008998
* @return the <code>JDesktopIcon</code> displayed on the desktop
1009999
* @see #setDesktopIcon
10101000
*/
1011-
public JSDesktopIcon getDesktopIcon() {
1001+
public JDesktopIcon getDesktopIcon() {
10121002
return desktopIcon;
10131003
}
10141004

@@ -1885,17 +1875,17 @@ protected void paintComponent(Graphics g) {
18851875
*
18861876
* @author David Kloba
18871877
*/
1888-
static public class JSDesktopIcon extends JComponent //implements Accessible
1878+
static public class JDesktopIcon extends JComponent //implements Accessible
18891879
{
1890-
JSInternalFrame internalFrame;
1880+
JInternalFrame internalFrame;
18911881

18921882
/**
18931883
* Creates an icon for an internal frame.
18941884
*
18951885
* @param f the <code>JInternalFrame</code>
18961886
* for which the icon is created
18971887
*/
1898-
public JSDesktopIcon(JSInternalFrame f) {
1888+
public JDesktopIcon(JInternalFrame f) {
18991889
setVisible(false);
19001890
setInternalFrame(f);
19011891
updateUI();
@@ -1928,7 +1918,7 @@ public void setUI(DesktopIconUI ui) {
19281918
* @return the <code>JInternalFrame</code> with which this icon
19291919
* is associated
19301920
*/
1931-
public JSInternalFrame getInternalFrame() {
1921+
public JInternalFrame getInternalFrame() {
19321922
return internalFrame;
19331923
}
19341924

@@ -1939,7 +1929,7 @@ public JSInternalFrame getInternalFrame() {
19391929
* @param f the <code>JInternalFrame</code> with which this icon
19401930
* is associated
19411931
*/
1942-
public void setInternalFrame(JSInternalFrame f) {
1932+
public void setInternalFrame(JInternalFrame f) {
19431933
internalFrame = f;
19441934
}
19451935

sources/net.sf.j2s.java.core/src/javax/swing/event/InternalFrameEvent.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
import java.awt.AWTEvent;
2828
import javax.swing.JInternalFrame;
29-
import javax.swing.JSInternalFrame;
29+
//import javax.swing.JSInternalFrame;
3030

3131
/**
3232
* An <code>AWTEvent</code> that adds support for
@@ -141,9 +141,9 @@ public InternalFrameEvent(JInternalFrame source, int id) {
141141
super(source, id);
142142
}
143143

144-
public InternalFrameEvent(JSInternalFrame source, int id) {
145-
super(source, id);
146-
}
144+
// public InternalFrameEvent(JSInternalFrame source, int id) {
145+
// super(source, id);
146+
// }
147147

148148
/**
149149
* Returns a parameter string identifying this event.

0 commit comments

Comments
 (0)