File tree Expand file tree Collapse file tree 1 file changed +58
-0
lines changed
sources/net.sf.j2s.java.core/src/swingjs/plaf Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Original file line number Diff line number Diff line change 1+ package swingjs .plaf ;
2+
3+
4+ import java .awt .Dimension ;
5+
6+ import javax .swing .JComponent ;
7+ import javax .swing .JRootPane ;
8+ import javax .swing .LookAndFeel ;
9+ import swingjs .api .js .DOMNode ;
10+
11+ public class JSProgressBarUI extends JSLightweightUI {
12+
13+ int frameZ = 10003 ;
14+ public JSProgressBarUI () {
15+ isContainer = true ;
16+ setDoc ();
17+ }
18+
19+ @ Override
20+ protected DOMNode updateDOMNode () {
21+ if (domNode == null ) {
22+ JRootPane root = jc .getRootPane ();
23+ isContentPane = (root != null && jc == root .getContentPane ());
24+ domNode = newDOMObject ("div" , id );
25+ if (root != null && root .getGlassPane () == c )
26+ DOMNode .setVisible (domNode , false );
27+ }
28+ return domNode ;
29+ }
30+
31+ @ Override
32+ protected Dimension setHTMLSize (DOMNode obj , boolean addCSS ) {
33+ // SwingJS for now: just designated container width/height
34+ return new Dimension (c .getWidth (), c .getHeight ());
35+ }
36+
37+
38+ @ Override
39+ public void installUI (JComponent jc ) {
40+ LookAndFeel .installColorsAndFont (jc ,
41+ "Panel.background" ,
42+ "Panel.foreground" ,
43+ "Panel.font" );
44+ }
45+
46+ @ Override
47+ public void uninstallUI (JComponent jc ) {
48+ // TODO Auto-generated method stub
49+
50+ }
51+
52+ @ Override
53+ public Dimension getPreferredSize () {
54+ return null ;
55+ }
56+
57+
58+ }
You can’t perform that action at this time.
0 commit comments