Skip to content

Commit 931e89c

Browse files
hansonrhansonr
authored andcommitted
switch to Mandarin "secret" first character 秘 U+79D8 instead of _ for
SwingJS-specific methods and fields.
1 parent 5f06d72 commit 931e89c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+384
-317
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
eclipse.preferences.version=1
22
encoding//src/test/Test_Char.java=UTF-8
3+
encoding/<project>=UTF-8

sources/net.sf.j2s.java.core/src/java/applet/JSApplet.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -279,25 +279,25 @@ public void setVisible(boolean b) {
279279
public void resize(int width, int height) {
280280
// no resizing if we have a stub -- embedded in a page
281281
if (stub == null)
282-
resizeOriginal(width, height);
282+
秘resizeOriginal(width, height);
283283
}
284284

285285
public void resizeHTML(int width, int height) {
286-
if (appletViewer != null) {
287-
appletViewer.html5Applet._resizeApplet(new int[] {width, height});
286+
if (秘appletViewer != null) {
287+
秘appletViewer.html5Applet._resizeApplet(new int[] {width, height});
288288
if (stub != null) {
289289
// Added 2/23/2019 to force layout prior to Canvas painting in mpFrakta.Applets.Geomet
290290
JRootPane root = ((JApplet) this).getRootPane();
291291
root.invalidate();
292292
((JSComponentUI)root.getUI()).setPainted(null);
293-
root._isBackgroundPainted = false;
293+
root.秘isBackgroundPainted = false;
294294
RepaintManager.currentManager(this).addInvalidComponent(root);
295295
}
296296
}
297297
}
298298

299299
@SuppressWarnings("deprecation")
300-
public void resizeOriginal(int width, int height) {
300+
public void 秘resizeOriginal(int width, int height) {
301301
Dimension d = size();
302302
if ((d.width != width) || (d.height != height)) {
303303
super.resize(width, height);

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ public AppContext getAppContext() {
358358
*/
359359
private int isFocusTraversableOverridden = FOCUS_TRAVERSABLE_UNKNOWN;
360360

361-
protected boolean _isFocusableSet; // SwingJS added
361+
protected boolean 秘isFocusableSet; // SwingJS added
362362

363363
/**
364364
* The focus traversal keys. These keys will generate focus traversal behavior
@@ -2680,7 +2680,7 @@ protected void invalidateComp() {
26802680
if (!isMaximumSizeSet()) {
26812681
maxSize = null;
26822682
}
2683-
if (parent != null && _j2sInvalidateOnAdd) {
2683+
if (parent != null && 秘j2sInvalidateOnAdd) {
26842684
parent.invalidateIfValid();
26852685
}
26862686
// }
@@ -5051,7 +5051,7 @@ protected final void disableEvents(long eventsToDisable) {
50515051
*/
50525052
transient private boolean coalescingEnabled = checkCoalescing();
50535053

5054-
public boolean _j2sInvalidateOnAdd = true; // not for menu items?
5054+
public boolean 秘j2sInvalidateOnAdd = true; // not for menu items?
50555055

50565056
/**
50575057
* Weak map of known coalesceEvent overriders. Value indicates whether
@@ -5402,7 +5402,7 @@ protected void processFocusEvent(FocusEvent e) {
54025402
*/
54035403
protected void processKeyEvent(KeyEvent e) {
54045404
KeyListener listener = keyListener;
5405-
if (listener != null && (/** @j2sNative this.isAWT$ || */ _isFocusableSet)) {
5405+
if (listener != null && (/** @j2sNative this.isAWT$ || */ 秘isFocusableSet)) {
54065406
int id = e.getID();
54075407
switch (id) {
54085408
case KeyEvent.KEY_TYPED:
@@ -5832,7 +5832,7 @@ protected void addNotifyComp() {
58325832
// relocateComponent();
58335833
// }
58345834
// }
5835-
if (_j2sInvalidateOnAdd )
5835+
if (秘j2sInvalidateOnAdd )
58365836
invalidate();
58375837

58385838
// int npopups = (popups != null? popups.size() : 0);
@@ -6052,7 +6052,7 @@ public void setFocusable(boolean focusable) {
60526052
}
60536053
isFocusTraversableOverridden = FOCUS_TRAVERSABLE_SET;
60546054

6055-
_isFocusableSet = true;
6055+
秘isFocusableSet = true;
60566056

60576057
firePropertyChange("focusable", Boolean.valueOf(oldFocusable), Boolean.valueOf(focusable));
60586058
if (oldFocusable && !focusable) {

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ public class Container extends JSComponent {
9797
*/
9898
private Lst<Component> component;
9999

100-
private Component[] _childArray;
100+
private Component[] 秘childArray;
101101

102-
private boolean _childTainted;
102+
private boolean 秘childTainted;
103103

104104

105105
/**
@@ -111,11 +111,11 @@ Component[] getChildArray() {
111111
int n = component.size();
112112
if (n == 0)
113113
return EMPTY_ARRAY;
114-
if (_childArray != null && !_childTainted)
115-
return _childArray;
116-
_childTainted = false;
117-
return component.toArray(_childArray != null
118-
&& _childArray.length > n ? _childArray : (_childArray = new Component[n * 2]));
114+
if (秘childArray != null && !秘childTainted)
115+
return 秘childArray;
116+
秘childTainted = false;
117+
return component.toArray(秘childArray != null
118+
&& 秘childArray.length > n ? 秘childArray : (秘childArray = new Component[n * 2]));
119119
}
120120

121121
/**
@@ -531,7 +531,7 @@ private boolean removeDelicately(Component comp, Container newParent, int newInd
531531

532532
comp.parent = null;
533533
component.removeItemAt(index);
534-
_childTainted = true;
534+
秘childTainted = true;
535535

536536
invalidateIfValid();
537537
} else {
@@ -542,7 +542,7 @@ private boolean removeDelicately(Component comp, Container newParent, int newInd
542542
// 4->2: 012345 -> 014235
543543
component.removeItemAt(index);
544544
component.add(newIndex, comp);
545-
_childTainted = true;
545+
秘childTainted = true;
546546
}
547547
if (comp.parent == null) { // was actually removed
548548
if (containerListener != null ||
@@ -751,7 +751,7 @@ public void setComponentZOrder(Component comp, int index) {
751751
comp.mixOnZOrderChanging(oldZindex, index);
752752
}
753753

754-
updateUIZOrder();
754+
秘updateUIZOrder();
755755

756756
}
757757
}
@@ -817,7 +817,7 @@ private void addDelicately(Component comp, Container curParent, int index) {
817817
if (curParent == this) {
818818
if (index < component.size()) {
819819
component.set(index, comp);
820-
_childTainted = true;
820+
秘childTainted = true;
821821
}
822822
} else {
823823
//index == -1 means add to the end.
@@ -826,7 +826,7 @@ private void addDelicately(Component comp, Container curParent, int index) {
826826
} else {
827827
component.add(index, comp);
828828
}
829-
_childTainted = true;
829+
秘childTainted = true;
830830
comp.parent = this;
831831

832832
adjustListeningChildren(AWTEvent.HIERARCHY_EVENT_MASK,
@@ -1075,7 +1075,7 @@ protected void addImplCont(Component comp, Object constraints, int index) {
10751075
synchronized (getTreeLock()) {
10761076

10771077
if (/** @j2sNative comp.getWrap$ && !this.isWrapper$ || */ false) {
1078-
comp = ((A2SWrappedComponent) comp).getWrap$();
1078+
comp = ((A2SWrappedComponent) comp).秘getWrap();
10791079
comp.background = comp.foreground = null; // this parent should not set the background color
10801080
}
10811081
// SwingJS used for all add methods
@@ -1117,7 +1117,7 @@ protected void addImplCont(Component comp, Object constraints, int index) {
11171117
} else {
11181118
component.add(index, comp);
11191119
}
1120-
_childTainted = true;
1120+
秘childTainted = true;
11211121
comp.parent = this;
11221122

11231123
adjustListeningChildren(AWTEvent.HIERARCHY_EVENT_MASK, comp.numListening(AWTEvent.HIERARCHY_EVENT_MASK));
@@ -1212,7 +1212,7 @@ public void remove(int index) {
12121212

12131213
comp.parent = null;
12141214
component.removeItemAt(index);
1215-
_childTainted = true;
1215+
秘childTainted = true;
12161216

12171217
invalidateIfValid();
12181218
if (containerListener != null
@@ -1256,7 +1256,7 @@ public void remove(Component comp) {
12561256
synchronized (getTreeLock()) {
12571257

12581258
if (/** @j2sNative comp.getWrap$ && !this.isWrapper$ || */ false) {
1259-
comp = ((A2SWrappedComponent) comp).getWrap$();
1259+
comp = ((A2SWrappedComponent) comp).秘getWrap();
12601260
}
12611261

12621262

0 commit comments

Comments
 (0)