< prev index next >

src/java.desktop/unix/classes/sun/awt/X11/XChoicePeer.java

Print this page




 928             }
 929         }
 930         /*
 931          * 6405689. In some cases we should erase background to eliminate painting
 932          * artefacts.
 933          */
 934         @Override
 935         public void repaint() {
 936             if (!isVisible()) {
 937                 return;
 938             }
 939             if (helper.checkVsbVisibilityChangedAndReset()){
 940                 paintBackground();
 941             }
 942             super.repaint();
 943         }
 944         @Override
 945         public void paintPeer(Graphics g) {
 946             //System.out.println("UC.paint()");
 947             Choice choice = (Choice)target;
 948             Color colors[] = XChoicePeer.this.getGUIcolors();
 949             draw3DRect(g, getSystemColors(), 0, 0, width - 1, height - 1, true);
 950             draw3DRect(g, getSystemColors(), 1, 1, width - 3, height - 3, true);
 951 
 952             helper.paintAllItems(g,
 953                                  colors,
 954                                  getBounds());
 955         }
 956 
 957         public void setVisible(boolean vis) {
 958             xSetVisible(vis);
 959 
 960             if (!vis && alignUnder != null) {
 961                 alignUnder.requestFocusInWindow();
 962             }
 963         }
 964 
 965         /**
 966          * Return a MouseEvent's Point in coordinates relative to the
 967          * UnfurledChoice.
 968          */




 928             }
 929         }
 930         /*
 931          * 6405689. In some cases we should erase background to eliminate painting
 932          * artefacts.
 933          */
 934         @Override
 935         public void repaint() {
 936             if (!isVisible()) {
 937                 return;
 938             }
 939             if (helper.checkVsbVisibilityChangedAndReset()){
 940                 paintBackground();
 941             }
 942             super.repaint();
 943         }
 944         @Override
 945         public void paintPeer(Graphics g) {
 946             //System.out.println("UC.paint()");
 947             Choice choice = (Choice)target;
 948             Color[] colors = XChoicePeer.this.getGUIcolors();
 949             draw3DRect(g, getSystemColors(), 0, 0, width - 1, height - 1, true);
 950             draw3DRect(g, getSystemColors(), 1, 1, width - 3, height - 3, true);
 951 
 952             helper.paintAllItems(g,
 953                                  colors,
 954                                  getBounds());
 955         }
 956 
 957         public void setVisible(boolean vis) {
 958             xSetVisible(vis);
 959 
 960             if (!vis && alignUnder != null) {
 961                 alignUnder.requestFocusInWindow();
 962             }
 963         }
 964 
 965         /**
 966          * Return a MouseEvent's Point in coordinates relative to the
 967          * UnfurledChoice.
 968          */


< prev index next >