Skip to content

Commit f05c5d9

Browse files
committed
removal of SAEM references
1 parent 75f4757 commit f05c5d9

30 files changed

+52
-158
lines changed

sources/net.sf.j2s.java.core/src/java/awt/Component.java

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,10 +1462,6 @@ public void show(boolean b) {
14621462
}
14631463

14641464
public void show() {
1465-
showSAEM();
1466-
}
1467-
1468-
protected void showSAEM() {
14691465
// System.out.println("Component " + name + " setVisible TRUE");
14701466
if (!visible) {
14711467
// synchronized (getTreeLock()) {
@@ -1532,10 +1528,6 @@ void clearCurrentFocusCycleRootOnHide() {
15321528
* replaced by <code>setVisible(boolean)</code>.
15331529
*/
15341530
public void hide() {
1535-
hideSAEM();
1536-
}
1537-
1538-
protected void hideSAEM() {
15391531
isPacked = false;
15401532
if (visible) {
15411533
clearCurrentFocusCycleRootOnHide();
@@ -1719,12 +1711,6 @@ final Font getFont_NoClientCode() {
17191711
* bound: true
17201712
*/
17211713
public void setFont(Font f) {
1722-
// SwingJS SAEM
1723-
setFontComp(f);
1724-
}
1725-
1726-
protected void setFontComp(Font f) {
1727-
// SwingJS SAEM
17281714
Font oldFont, newFont;
17291715
oldFont = font;
17301716
newFont = font = f;
@@ -2561,12 +2547,10 @@ public boolean isMaximumSizeSet() {
25612547
* @see LayoutManager
25622548
*/
25632549
public Dimension getMaximumSize() {
2564-
// SwingJS SAEM
25652550
return getMaxSizeComp();
25662551
}
25672552

25682553
protected Dimension getMaxSizeComp() {
2569-
// SwingJS SAEM
25702554
if (isMaximumSizeSet()) {
25712555
return new Dimension(maxSize);
25722556
}
@@ -2581,11 +2565,9 @@ protected Dimension getMaxSizeComp() {
25812565
* the furthest away from the origin, 0.5 is centered, etc.
25822566
*/
25832567
public float getAlignmentX() {
2584-
// SwingJS SAEM
25852568
return getAlignmentXComp();
25862569
}
25872570
protected float getAlignmentXComp() {
2588-
// SwingJS SAEM
25892571
return CENTER_ALIGNMENT;
25902572
}
25912573

@@ -2597,11 +2579,9 @@ protected float getAlignmentXComp() {
25972579
* the furthest away from the origin, 0.5 is centered, etc.
25982580
*/
25992581
public float getAlignmentY() {
2600-
// SwingJS SAEM
26012582
return getAlignmentYComp();
26022583
}
26032584
protected float getAlignmentYComp() {
2604-
// SwingJS SAEM
26052585
return CENTER_ALIGNMENT;
26062586
}
26072587

@@ -2691,12 +2671,10 @@ public void layout() {
26912671
* @since JDK1.0
26922672
*/
26932673
public void validate() {
2694-
// SwingJS SAEM
26952674
validateComponent();
26962675
}
26972676

26982677
public void validateComponent() {
2699-
// SwingJS SAEM
27002678
synchronized (getTreeLock()) {
27012679
ComponentPeer peer = this.peer;
27022680
boolean wasValid = isValid();
@@ -2726,12 +2704,10 @@ public void validateComponent() {
27262704
* @since JDK1.0
27272705
*/
27282706
public void invalidate() {
2729-
// SwingJS SAEM
27302707
invalidateComp();
27312708
}
27322709

27332710
protected void invalidateComp() {
2734-
// SwingJS SAEM
27352711
// synchronized (getTreeLock()) {
27362712
/* Nullify cached layout and size information.
27372713
* For efficiency, propagate invalidate() upwards only if
@@ -3019,12 +2995,10 @@ public void paintAll(Graphics g) {
30192995
* @see #paintAll
30202996
*/
30212997
void lightweightPaint(Graphics g) {
3022-
// SwingJS SAEM
30232998
lwPaintComp(g);
30242999
}
30253000

30263001
protected void lwPaintComp(Graphics g) {
3027-
// SwingJS SAEM
30283002
paint(g);
30293003
}
30303004

@@ -4524,13 +4498,11 @@ public void removeHierarchyBoundsListener(HierarchyBoundsListener l) {
45244498

45254499
// Should only be called while holding the tree lock
45264500
int numListening(long mask) {
4527-
// SwingJS SAEM
45284501
return numListeningMask(mask);
45294502
}
45304503

45314504
// Should only be called while holding the tree lock
45324505
int numListeningMask(long mask) {
4533-
// SwingJS SAEM
45344506
// One mask or the other, but not neither or both.
45354507
// if (eventLog.isLoggable(Level.FINE)) {
45364508
// if ((mask != AWTEvent.HIERARCHY_EVENT_MASK) &&
@@ -5020,11 +4992,9 @@ public synchronized InputMethodListener[] getInputMethodListeners() {
50204992
* @since 1.3
50214993
*/
50224994
public <T extends EventListener> T[] getListeners(Class<T> listenerType) {
5023-
// SwingJS SAEM
50244995
return getListenersComp(listenerType);
50254996
}
50264997
protected <T extends EventListener> T[] getListenersComp(Class<T> listenerType) {
5027-
// SwingJS SAEM
50284998
EventListener l = null;
50294999
if (listenerType == ComponentListener.class) {
50305000
l = componentListener;
@@ -5319,14 +5289,10 @@ protected AWTEvent coalesceEvents(AWTEvent existingEvent,
53195289
* @since JDK1.1
53205290
*/
53215291
protected void processEvent(AWTEvent e) {
5322-
// SwingJS SAEM
53235292
processEventComp(e);
53245293
}
53255294

53265295
protected void processEventComp(AWTEvent e) {
5327-
5328-
// SwingJS SAEM
5329-
53305296
if (e instanceof FocusEvent) {
53315297
processFocusEvent((FocusEvent) e);
53325298

@@ -6052,11 +6018,9 @@ Container getNativeContainer() {
60526018
* @since JDK1.0
60536019
*/
60546020
public void removeNotify() {
6055-
// SwingJS SAEM
60566021
removeNotifyComp();
60576022
}
60586023
protected void removeNotifyComp() {
6059-
// SwingJS SAEM
60606024
// KeyboardFocusManager.clearMostRecentFocusOwner(this);
60616025
// if (KeyboardFocusManager.getCurrentKeyboardFocusManager().
60626026
// getPermanentFocusOwner() == this)
@@ -6845,11 +6809,9 @@ public Container getFocusCycleRootAncestor() {
68456809
* @since 1.4
68466810
*/
68476811
public boolean isFocusCycleRoot(Container container) {
6848-
// SwingJS SAEM
68496812
return isFocusCycleRootComp(container);
68506813
}
68516814
protected boolean isFocusCycleRootComp(Container container) {
6852-
// SwingJS SAEM
68536815
Container rootAncestor = getFocusCycleRootAncestor();
68546816
return (rootAncestor == container);
68556817
}
@@ -7876,11 +7838,9 @@ public ComponentOrientation getComponentOrientation() {
78767838
* @since 1.4
78777839
*/
78787840
public void applyComponentOrientation(ComponentOrientation orientation) {
7879-
// SwingJS SAEM
78807841
applyCompOrientComp(orientation);
78817842
}
78827843
protected void applyCompOrientComp(ComponentOrientation orientation) {
7883-
// SwingJS SAEM
78847844
if (orientation == null) {
78857845
throw new NullPointerException();
78867846
}

sources/net.sf.j2s.java.core/src/java/awt/Container.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,10 +1024,10 @@ public Component add(Component comp, Object constraints, int index) {
10241024
* @since JDK1.1
10251025
*/
10261026
protected Component addImpl(Component comp, Object constraints, int index) {
1027-
return addImplSAEM(comp, constraints, index);
1027+
return addImplCont(comp, constraints, index);
10281028
}
10291029

1030-
protected Component addImplSAEM(Component comp, Object constraints, int index) {
1030+
protected Component addImplCont(Component comp, Object constraints, int index) {
10311031
synchronized (getTreeLock()) {
10321032

10331033
//SwingJS used for all add methods
@@ -1607,7 +1607,7 @@ void invalidateTree() {
16071607
@Override
16081608
public void setFont(Font f) {
16091609
Font oldfont = getFont();
1610-
setFontComp(f);
1610+
super.setFont(f);
16111611
Font newfont = getFont();
16121612
if (newfont != oldfont && (oldfont == null || !oldfont.equals(newfont))) {
16131613
invalidateTree();
@@ -2093,12 +2093,10 @@ boolean eventEnabled(AWTEvent e) {
20932093
*/
20942094
@Override
20952095
protected void processEvent(AWTEvent e) {
2096-
// SwingJS SAEM
20972096
processEventCont(e);
20982097
}
20992098

21002099
protected void processEventCont(AWTEvent e) {
2101-
// SwingJS SAEM
21022100
if (e instanceof ContainerEvent) {
21032101
processContainerEvent((ContainerEvent) e);
21042102
return;

sources/net.sf.j2s.java.core/src/java/awt/Dialog.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,8 @@ private boolean conditionalShow(Component toFocus, Long time) {
917917
} else {
918918
//visible =
919919
retval = true;
920-
showSAEM();
920+
// TODO this was Component.showSAEM, in Component, but not is setVisible in Window
921+
super.setVisible(true);
921922

922923
// check if this dialog should be modal blocked BEFORE calling
923924
// peer.show(),

sources/net.sf.j2s.java.core/src/java/awt/EventDispatchThread.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ private void finish() {
329329
* Fix for 4648733. Check both the associated java event queue and the
330330
* PostEventQueue.
331331
*/
332-
if (theQueue.peekEventSAEM() != null || !SunToolkit.isPostEventQueueEmpty()) {
332+
if (theQueue.peekEvent() != null || !SunToolkit.isPostEventQueueEmpty()) {
333333
theQueue.initDispatchThread();
334334
}
335335
AWTAutoShutdown.getInstance().notifyThreadFree(this);

sources/net.sf.j2s.java.core/src/java/awt/EventQueue.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -556,10 +556,6 @@ AWTEvent getNextEventForID(int id) throws InterruptedException {
556556
* @return the first event
557557
*/
558558
public synchronized AWTEvent peekEvent() {
559-
return peekEventSAEM();
560-
}
561-
562-
public AWTEvent peekEventSAEM() {
563559
for (int i = NUM_PRIORITIES - 1; i >= 0; i--) {
564560
if (queues[i].head != null) {
565561
return queues[i].head.event;
@@ -796,7 +792,7 @@ public synchronized void push(EventQueue newEventQueue) {
796792

797793
synchronized (newEventQueue) {
798794
// Transfer all events forward to new EventQueue.
799-
while (peekEventSAEM() != null) {
795+
while (peekEvent() != null) {
800796
try {
801797
newEventQueue.postEventPrivate(getNextEvent());
802798
} catch (InterruptedException ie) {
@@ -863,7 +859,7 @@ protected void pop() throws EmptyStackException {
863859

864860
// Transfer all events back to previous EventQueue.
865861
previousQueue.nextQueue = null;
866-
while (peekEventSAEM() != null) {
862+
while (peekEvent() != null) {
867863
try {
868864
previousQueue.postEventPrivate(getNextEvent());
869865
} catch (InterruptedException ie) {

sources/net.sf.j2s.java.core/src/java/awt/Graphics.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,6 @@ protected Graphics() {
164164
* @see java.awt.Graphics#clipRect
165165
*/
166166
public Graphics create(int x, int y, int width, int height) {
167-
return create4(x, y, width, height);
168-
}
169-
170-
public Graphics create4(int x, int y, int width, int height) {
171167
// cell renderer pane and JComponent
172168
Graphics g = create();
173169
if (g == null) return null;

sources/net.sf.j2s.java.core/src/java/awt/Panel.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public class Panel extends Container {
5757
*
5858
*/
5959
public Panel() {
60-
setLayout(new FlowLayout());
60+
this(new FlowLayout());
6161
}
6262

6363
@Override
@@ -73,11 +73,8 @@ protected boolean canPaint() {
7373
* @since JDK1.1
7474
*/
7575
public Panel(LayoutManager layout) {
76-
// SwingJS SAEM
77-
if (layout == null)
78-
layout = new FlowLayout();
7976
setAppContext();
80-
setLayout(layout);
77+
setLayout(layout);
8178
}
8279

8380
/**

sources/net.sf.j2s.java.core/src/java/awt/image/DataBufferByte.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,16 +116,9 @@ public DataBufferByte(int size, int numBanks) {
116116
*/
117117
public DataBufferByte(byte dataArray[], int size) {
118118
super(UNTRACKABLE, TYPE_BYTE, size);
119-
if (AU.isAI(dataArray)) {
120119
data = dataArray;
121120
bankdata = new byte[1][];
122121
bankdata[0] = data;
123-
} else {
124-
// SwingJS SAEM
125-
banks = dataArray.length;
126-
bankdata = (byte[][]) (Object) dataArray.clone();
127-
data = bankdata[0];
128-
}
129122
}
130123

131124
/**

sources/net.sf.j2s.java.core/src/java/awt/image/DataBufferInt.java

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -112,19 +112,11 @@ public DataBufferInt(int size, int numBanks) {
112112
* @param size
113113
* The size of the <CODE>DataBuffer</CODE> bank.
114114
*/
115-
public DataBufferInt(int dataArray[], int size) {
115+
public DataBufferInt(int[] dataArray, int size) {
116116
super(UNTRACKABLE, TYPE_INT, size);
117-
if (AU.isAI(dataArray)) {
118117
data = dataArray;
119118
bankdata = new int[1][];
120119
bankdata[0] = data;
121-
} else {
122-
// SwingJS SAEM
123-
banks = dataArray.length;
124-
bankdata = (int[][]) (Object) dataArray.clone();
125-
data = bankdata[0];
126-
}
127-
128120
}
129121

130122

@@ -148,7 +140,7 @@ public DataBufferInt(int dataArray[], int size) {
148140
* @param offset
149141
* The offset into the <CODE>dataArray</CODE>.
150142
*/
151-
public DataBufferInt(int dataArray[], int size, int offset) {
143+
public DataBufferInt(int[] dataArray, int size, int offset) {
152144
super(UNTRACKABLE, TYPE_INT, size, 1, offset);
153145
data = dataArray;
154146
bankdata = new int[1][];
@@ -173,7 +165,7 @@ public DataBufferInt(int dataArray[], int size, int offset) {
173165
*
174166
*
175167
*/
176-
public DataBufferInt(int dataArray[][], int size) {
168+
public DataBufferInt(int[][] dataArray, int size) {
177169
super(UNTRACKABLE, TYPE_INT, size, dataArray.length);
178170
bankdata = (int[][]) dataArray.clone();
179171
data = bankdata[0];
@@ -201,7 +193,7 @@ public DataBufferInt(int dataArray[][], int size) {
201193
* @param offsets
202194
* The offsets into each array.
203195
*/
204-
public DataBufferInt(int dataArray[][], int size, int offsets[]) {
196+
public DataBufferInt(int[][] dataArray, int size, int[] offsets) {
205197
super(UNTRACKABLE, TYPE_INT, size, dataArray.length, offsets);
206198
bankdata = (int[][]) dataArray.clone();
207199
data = bankdata[0];

sources/net.sf.j2s.java.core/src/java/awt/image/WritableRaster.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -294,14 +294,9 @@ public WritableRaster createWritableChild(int parentX, int parentY,
294294
* in bounds, or if inData is too small to hold the input.
295295
*/
296296
public void setDataElements(int x, int y, Object inData) {
297-
if (inData instanceof Raster) {
298-
// SwingJS SAEM java.awt.image had setDataElements(int, int, [Raster | Object])
299-
setDataElementsRaster(x, y, (Raster) inData);
300-
} else {
301297
sampleModel.setDataElements(x-sampleModelTranslateX,
302298
y-sampleModelTranslateY,
303299
inData, dataBuffer);
304-
}
305300
}
306301

307302
/**
@@ -322,7 +317,7 @@ public void setDataElements(int x, int y, Object inData) {
322317
* @throws ArrayIndexOutOfBoundsException if the coordinates are not
323318
* in bounds.
324319
*/
325-
public void setDataElementsRaster(int x, int y, Raster inRaster) {
320+
public void setDataElements(int x, int y, Raster inRaster) {
326321
int dstOffX = x+inRaster.getMinX();
327322
int dstOffY = y+inRaster.getMinY();
328323
int width = inRaster.getWidth();

0 commit comments

Comments
 (0)