66It is critical that all development work in Java2Script
77be done in UTF-8. This means:
88
9- - making sure your Exclipse project is set up for UTF-8 (not the Eclipse default?)
9+ - making sure your Eclipse project is set up for UTF-8 (not the Eclipse default?)
1010- making sure your server can serve up UTF-8 by default for any browser-loaded files
1111- making sure you don't edit a Java2Script class file or one of the site .js files
1212 using a non-UTF-8 editor. It may replace non-Latin characters with "?" or garbage.
@@ -32,6 +32,7 @@ ever be overridden by subclasses. As in java.lang.Thread.java:
3232----------------------------------
3333
3434
35+ updated 2/26/2020 -- adds Graphics.setClip issue
3536updated 12/22/19 -- additional issues
3637updated 11/03/19 -- adds information about File.exists() and points to src/javajs/async
3738updated 10/26/19 -- adds information about File.createTempFile()
@@ -428,7 +429,8 @@ myClass.getField not implemented
428429"window" and other reserved JavaScript names
429430qualified field and method names
430431missing Math methods
431- component.getGraphics(), graphics.dispose()
432+ Component.getGraphics(), Graphics.dispose()
433+ Graphics.setClip()
432434
433435MAJOR ISSUES--for Bob and Udo within SwingJS
434436============================================
@@ -934,7 +936,7 @@ It is easy enough to add these methods if you have the source. They go into j2sC
934936which is combined with other initial libraries into swingjs2.js by build_site.xml
935937
936938
937- component .getGraphics(), graphics .dispose()
939+ Component .getGraphics(), Graphics .dispose()
938940-------------------------------------------
939941
940942Use of component.getGraphics() is discouraged in Java and in SwingJS.
@@ -958,6 +960,22 @@ Instead, if you really do not want to use repaint(), use this:
958960 g.dispose();
959961
960962
963+
964+ Graphics.setClip()
965+ ------------------
966+
967+ The HTML5 canvas.clip() method is permanent. You can only reset the clip using
968+ save/restore. This is different from Java, where you can temporarily change it using
969+
970+ Shape oldClip = Graphics.getClip();
971+ Graphics.setClip(newClip);
972+ ...
973+ Graphics.setClip(oldClip);
974+
975+ If you need to do something like this, you must schedule the paints
976+ to not have overlapping clip needs.
977+
978+
961979MAJOR ISSUES--for Bob and Udo within SwingJS
962980============================================
963981
0 commit comments