jdk/src/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java
changeset 24163 d56df89854c4
parent 23010 6dadb192ad81
child 25565 ce603b34c98d
equal deleted inserted replaced
24162:0fe6fb6759ab 24163:d56df89854c4
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    35 
    35 
    36 import javax.swing.*;
    36 import javax.swing.*;
    37 import javax.swing.event.*;
    37 import javax.swing.event.*;
    38 import javax.swing.plaf.*;
    38 import javax.swing.plaf.*;
    39 
    39 
       
    40 import static sun.swing.SwingUtilities2.drawHLine;
       
    41 import static sun.swing.SwingUtilities2.drawRect;
       
    42 import static sun.swing.SwingUtilities2.drawVLine;
       
    43 
    40 
    44 
    41 /**
    45 /**
    42  * Implementation of ScrollBarUI for the Basic Look and Feel
    46  * Implementation of ScrollBarUI for the Basic Look and Feel
    43  *
    47  *
    44  * @author Rich Schiavi
    48  * @author Rich Schiavi
   570         int h = thumbBounds.height;
   574         int h = thumbBounds.height;
   571 
   575 
   572         g.translate(thumbBounds.x, thumbBounds.y);
   576         g.translate(thumbBounds.x, thumbBounds.y);
   573 
   577 
   574         g.setColor(thumbDarkShadowColor);
   578         g.setColor(thumbDarkShadowColor);
   575         g.drawRect(0, 0, w-1, h-1);
   579         drawRect(g, 0, 0, w - 1, h - 1);
   576         g.setColor(thumbColor);
   580         g.setColor(thumbColor);
   577         g.fillRect(0, 0, w-1, h-1);
   581         g.fillRect(0, 0, w - 1, h - 1);
   578 
   582 
   579         g.setColor(thumbHighlightColor);
   583         g.setColor(thumbHighlightColor);
   580         g.drawLine(1, 1, 1, h-2);
   584         drawVLine(g, 1, 1, h - 2);
   581         g.drawLine(2, 1, w-3, 1);
   585         drawHLine(g, 2, w - 3, 1);
   582 
   586 
   583         g.setColor(thumbLightShadowColor);
   587         g.setColor(thumbLightShadowColor);
   584         g.drawLine(2, h-2, w-2, h-2);
   588         drawHLine(g, 2, w - 2, h - 2);
   585         g.drawLine(w-2, 1, w-2, h-3);
   589         drawVLine(g, w - 2, 1, h - 3);
   586 
   590 
   587         g.translate(-thumbBounds.x, -thumbBounds.y);
   591         g.translate(-thumbBounds.x, -thumbBounds.y);
   588     }
   592     }
   589 
   593 
   590 
   594