Skip to content

Commit 0da73ce

Browse files
authored
Merge pull request #175 from BobHanson/hanson1
Hanson1
2 parents a61045b + 1f84f4d commit 0da73ce

34 files changed

+8895
-2517
lines changed
90.8 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20200713172416
1+
20200728062204
90.8 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20200713172416
1+
20200728062204
90.8 KB
Binary file not shown.

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

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2475,12 +2475,10 @@ public Dimension minimumSize() {
24752475
* Avoid grabbing the lock if a reasonable cached size value is available.
24762476
*/
24772477
Dimension dim = minSize;
2478-
if (dim == null || !(isMinimumSizeSet() || isValid())) {
2478+
if (dim == null || !isMinimumSizeSet() && !isValid()) {
24792479
// synchronized (getTreeLock()) {
2480-
minSize =
2481-
// (peer != null) ?
2482-
// peer.minimumSize() :
2483-
size();
2480+
// SwingJS: NullComponentPeer would have returned (1,1)
2481+
minSize = (peer == null ? size() : new Dimension(1,1));
24842482
dim = minSize;
24852483
// }
24862484
}
@@ -2538,10 +2536,7 @@ public Dimension getMaximumSize() {
25382536
}
25392537

25402538
protected Dimension getMaxSizeComp() {
2541-
if (isMaximumSizeSet()) {
2542-
return new Dimension(maxSize);
2543-
}
2544-
return new Dimension(Short.MAX_VALUE, Short.MAX_VALUE);
2539+
return (isMaximumSizeSet() ? maxSize : new Dimension(Short.MAX_VALUE, Short.MAX_VALUE));
25452540
}
25462541

25472542
/**

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,11 @@ public BufferedImage createCompatibleImage(int width, int height,
186186
}
187187

188188

189-
protected BufferedImage newBufferedImage(ColorModel cm, WritableRaster wr,
190-
boolean alphaPremultiplied, Hashtable<?, ?> properties) {
191-
return new BufferedImage(cm, wr, alphaPremultiplied, properties);
189+
protected BufferedImage newBufferedImage(ColorModel cm, WritableRaster wr, boolean alphaPremultiplied,
190+
Hashtable<?, ?> properties) {
191+
BufferedImage bi = new BufferedImage(cm, wr, alphaPremultiplied, properties);
192+
bi.getRaster().秘setStable(true);
193+
return bi;
192194
}
193195

194196
/**

0 commit comments

Comments
 (0)