src/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 35,44 ****
--- 35,48 ----
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.plaf.*;
+ import static sun.swing.SwingUtilities2.drawHLine;
+ import static sun.swing.SwingUtilities2.drawRect;
+ import static sun.swing.SwingUtilities2.drawVLine;
+
/**
* Implementation of ScrollBarUI for the Basic Look and Feel
*
* @author Rich Schiavi
*** 570,590 ****
int h = thumbBounds.height;
g.translate(thumbBounds.x, thumbBounds.y);
g.setColor(thumbDarkShadowColor);
! g.drawRect(0, 0, w-1, h-1);
g.setColor(thumbColor);
! g.fillRect(0, 0, w-1, h-1);
g.setColor(thumbHighlightColor);
! g.drawLine(1, 1, 1, h-2);
! g.drawLine(2, 1, w-3, 1);
g.setColor(thumbLightShadowColor);
! g.drawLine(2, h-2, w-2, h-2);
! g.drawLine(w-2, 1, w-2, h-3);
g.translate(-thumbBounds.x, -thumbBounds.y);
}
--- 574,594 ----
int h = thumbBounds.height;
g.translate(thumbBounds.x, thumbBounds.y);
g.setColor(thumbDarkShadowColor);
! drawRect(g, 0, 0, w - 1, h - 1);
g.setColor(thumbColor);
! g.fillRect(0, 0, w - 1, h - 1);
g.setColor(thumbHighlightColor);
! drawVLine(g, 1, 1, h - 2);
! drawHLine(g, 2, w - 3, 1);
g.setColor(thumbLightShadowColor);
! drawHLine(g, 2, w - 2, h - 2);
! drawVLine(g, w - 2, 1, h - 3);
g.translate(-thumbBounds.x, -thumbBounds.y);
}