Skip to content

Commit 3ddaed4

Browse files
hansonrhansonr
authored andcommitted
JSeparator CSS fix
1 parent e86ef96 commit 3ddaed4

File tree

8 files changed

+13
-7
lines changed

8 files changed

+13
-7
lines changed
-1.01 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20200728062204
1+
20200731055950
-1.01 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20200728062204
1+
20200731055950
-1.01 KB
Binary file not shown.

sources/net.sf.j2s.java.core/src/test/JalviewJSTest.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import java.awt.Insets;
1111
import java.awt.Label;
1212
import java.awt.MediaTracker;
13+
import java.awt.MenuItem;
1314
import java.awt.Toolkit;
1415
import java.awt.event.ActionEvent;
1516
import java.awt.event.ActionListener;
@@ -580,9 +581,10 @@ public void menuCanceled(MenuEvent e) {
580581

581582
menu2.add(cb5m);
582583

583-
JMenuItem btn = new JMenuItem("-");
584-
btn.setFont(font);
585-
menu.add(btn);
584+
JMenuItem sep = new JMenuItem("-");
585+
JMenuItem btn;
586+
sep.setFont(font);
587+
menu.addSeparator();
586588
testbtn = new JMenuItem("testingbtn");
587589
testbtn.setFont(font);
588590
testbtn.addActionListener(new ActionListener() {

sources/net.sf.j2s.java.core/src/test/Test_Dialog.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ public void propertyChange(PropertyChangeEvent event) {
7676
File file = (File) val;
7777
byte[] array = (val == null ? null : /** @j2sNative file.秘bytes || */
7878
null);
79-
onDialogReturn("fileName is '" + file.getName() + " size=" + array.length);
79+
lastFile = file.getName();
80+
onDialogReturn("fileName is '" + lastFile + " size=" + array.length);
8081
return;
8182
}
8283
break;
@@ -109,6 +110,8 @@ public void onDialogReturn(Object value) {
109110

110111
private JButton colorButton;
111112

113+
private String lastFile = "";
114+
112115
public Test_Dialog() {
113116
super();
114117
this.setTitle("testing dialogs");
@@ -188,6 +191,7 @@ public void actionPerformed(ActionEvent e) {
188191
@Override
189192
public void actionPerformed(ActionEvent e) {
190193
JFileChooser fc = new JFileChooser();
194+
fc.setSelectedFile(new File(lastFile));
191195
onDialogReturn(fc.showOpenDialog(Test_Dialog.this));
192196
}
193197

sources/net.sf.j2s.java.core/srcjs/swingjs2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11822,7 +11822,7 @@ if (database == "_" && J2S._serverUrl.indexOf("//your.server.here/") >= 0) {
1182211822
case "java.util.Array":
1182311823
var e = Clazz.new_(Clazz.load("java.io.File").c$$S,
1182411824
[ file.name ]);
11825-
swingjs.JSUtil.setFileBytesStatic$$O$O(e, J2S._toBytes(data))
11825+
swingjs.JSUtil.setFileBytesStatic$O$O(e, J2S._toBytes(data))
1182611826
arr.push(e);
1182711827
data = arr;
1182811828
break;

0 commit comments

Comments
 (0)