Skip to content

Commit 1359750

Browse files
hansonrhansonr
authored andcommitted
Fix for JTextArea.setLineWrap(true) not recognized by JSTextUI
1 parent 2ef77bb commit 1359750

File tree

7 files changed

+14
-19
lines changed

7 files changed

+14
-19
lines changed
32 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20210608195538
1+
20210610072922
32 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20210608195538
1+
20210610072922
32 Bytes
Binary file not shown.

sources/net.sf.j2s.java.core/src/swingjs/plaf/TextListener.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ public void propertyChange(PropertyChangeEvent e) {
8989
ui.setEditable(((Boolean) e.getNewValue()).booleanValue());
9090
break;
9191
case "document":
92+
case "lineWrap":
9293
if (e.getNewValue() != null)
9394
ui.updateRootView();
9495
break;

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

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,50 +13,44 @@ public static void main(String[] args) {
1313

1414

1515

16+
String st;
1617
Pattern p;
1718
Matcher m;
1819

1920

20-
String st;
21-
22-
23-
21+
2422

2523

26-
st = "12a-Carbon.jdf";
27-
28-
p = Pattern.compile("^(?<IFS0nmr0representation0vender0dataset>(?<IFS0structure0param0compound0id>([^-]+(?:-[^-]+)*))\\Q-\\E(?<IFS0nmr0param0expt>[^|/]+)\\Q.jdf\\E)$");
24+
st = "...pre-20a-b/DEPT135/3/pdata/1/procs";
25+
st = "...pre-20a-b/DEPT135|3/pdata/1/procs";
26+
p = Pattern.compile("^(?<path>.+(?:/|\\|)(?<dir>[^/]+))/pdata/[^/]+/procs$");
2927
m = p.matcher(st);
3028
System.out.println(m.find());
3129
for (int i = 1, n = m.groupCount(); i <= n; i++) {
3230
System.out.println(i + "/" + n + ">"+m.group(i)+"<");
3331
}
34-
assert(m.group("IFSnmr0param0expt").equals("test"));
35-
3632

37-
st = "FID for Publication/S6.zip|S6/HRMS.zip|HRMS/67563_hazh180_maxis_pos.pdf";
3833

34+
st = "FID for Publication/S6.zip|S6/HRMS.zip|HRMS/67563_hazh180_maxis_pos.pdf";
3935
p = Pattern.compile("^\\QFID for Publication/\\E(?<id>[^|/]+)\\Q.zip"
4036
+ "|\\E\\k<id>\\Q/HRMS.zip|\\E(?:[^/]+/)*(?<IFS0ms0representation0pdf>[^|/]+\\Q.pdf\\E)$");
4137
m = p.matcher(st);
4238
System.out.println(m.find());
4339
for (int i = 1, n = m.groupCount(); i <= n; i++) {
4440
System.out.println(i + "/" + n + ">"+m.group(i)+"<");
4541
}
46-
assert(m.group("IFSnmr0param0expt").equals("test"));
47-
48-
42+
43+
st = "{abc::now {jkl::{def::and} {ghi::then}}}";
4944
p = Pattern.compile("\\{([^:]+)::(.+)\\}");
50-
m = p.matcher("{abc::now {jkl::{def::and} {ghi::then}}}");
45+
m = p.matcher(st);
5146
m.find();
5247
for (int i = 1, n = m.groupCount(); i <= n; i++) {
5348
System.out.println(i + "/" + n + ">"+m.group(i)+"<");
5449
}
55-
assert(m.group("IFSnmr0param0expt").equals("test"));
5650

57-
51+
st = "AtestB";
5852
p = Pattern.compile("\\QA\\E(?<IFS0nmr0param0expt>\\Q\\E.+\\Q\\E)\\QB\\E");
59-
m = p.matcher("AtestB");
53+
m = p.matcher(st);
6054
m.find();
6155
// note that go [1,n] here, not [0,n)
6256
System.out.println("ID was " + m.group("IFS0nmr0param0expt"));

0 commit comments

Comments
 (0)