/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Windows rendition of the component.
* <p>
* <strong>Warning:</strong>
* Serialized objects of this class will not be compatible with
* future Swing releases. The current serialization support is appropriate
* for short term storage or RMI between applications running the same
* version of Swing. A future release of Swing will provide support for
* long term persistence.
*/
/**
* Creates a UI for a JScrollBar.
*
* @param c the text field
* @return the UI
*/
return new WindowsScrollBarUI();
}
protected void installDefaults() {
super.installDefaults();
}
}
super.uninstallUI(c);
}
protected void configureScrollBarColors() {
super.configureScrollBarColors();
}
}
}
return new WindowsArrowButton(orientation,
}
return new WindowsArrowButton(orientation,
}
/**
* {@inheritDoc}
* @since 1.6
*/
// we need to repaint the entire scrollbar because state change for each
// button causes a state change for the thumb and other button on Vista
return new ArrowButtonListener() {
repaint();
super.mouseEntered(evt);
}
repaint();
super.mouseExited(evt);
}
private void repaint() {
}
};
} else {
return super.createArrowButtonListener();
}
}
// Pending: Implement rollover (hot) and pressed
}
super.paintTrack(g, c, trackBounds);
}
else {
if (trackHighlight == DECREASE_HIGHLIGHT) {
}
else if (trackHighlight == INCREASE_HIGHLIGHT) {
}
}
}
} else if (isDragging) {
} else if (isThumbRollover()) {
}
}
// Paint thumb
// Paint gripper
if (gripperInsets == null ||
}
} else {
super.paintThumb(g, c, thumbBounds);
}
}
if (highlightGrid == null) {
super.paintDecreaseHighlight(g);
}
else {
int x, y, w, h;
h = thumbR.y - y;
}
else {
w = thumbR.x - x;
}
highlightGrid.paint(g, x, y, w, h);
}
}
if (highlightGrid == null) {
super.paintDecreaseHighlight(g);
}
else {
int x, y, w, h;
h = incrButton.getY() - y;
}
else {
w = incrButton.getX() - x;
}
highlightGrid.paint(g, x, y, w, h);
}
}
/**
* {@inheritDoc}
* @since 1.6
*/
boolean old = isThumbRollover();
super.setThumbRollover(active);
// we need to repaint the entire scrollbar because state change for thumb
// causes state change for incr and decr buttons on Vista
}
}
/**
* WindowsArrowButton is used for the buttons to position the
* preferred size is always a square.
*/
}
super(direction);
}
// normal, rollover, pressed, disabled
switch (direction) {
}
switch (direction) {
}
switch (direction) {
}
} else if (jointRollover) {
switch (direction) {
}
} else {
switch (direction) {
}
}
} else {
super.paint(g);
}
}
int size = 16;
switch (scrollbar.getOrientation()) {
case JScrollBar.VERTICAL:
break;
case JScrollBar.HORIZONTAL:
break;
}
}
}
}
/**
* This should be pulled out into its own class if more classes need to
* use it.
* <p>
* Grid is used to draw the track for windows scrollbars. Grids
* are cached in a HashMap, with the key being the rgb components
* of the foreground/background colors. Further the Grid is held through
* a WeakRef so that it can be freed when no longer needed. As the
* Grid is rather expensive to draw, it is drawn in a BufferedImage.
*/
private static class Grid {
static {
}
}
return grid;
}
try {
}
finally {
g.dispose();
}
}
/**
* Paints the grid into the specified Graphics at the specified
* location.
*/
return;
}
xCounter += BUFFER_SIZE) {
yCounter += BUFFER_SIZE) {
if (yOffset != 0) {
yOffset = 0;
}
}
if (xOffset != 0) {
xOffset = 0;
}
}
}
/**
* Actually renders the grid into the Graphics <code>g</code>.
*/
}
}
}
}
}
}
}