< prev index next >
src/java.desktop/unix/classes/sun/awt/X11/XScrollPanePeer.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, 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
@@ -277,11 +277,11 @@
Component c = getScrollChild();
if (c == null) {
return;
}
int sx, sy;
- Color colors[] = getGUIcolors();
+ Color[] colors = getGUIcolors();
if (sp.getScrollbarDisplayPolicy() == ScrollPane.SCROLLBARS_NEVER) {
sx = -x;
sy = -y;
} else {
@@ -351,22 +351,22 @@
// paint the whole scrollbar
}
}
void repaintScrollBars() {
Graphics g = getGraphics();
- Color colors[] = getGUIcolors();
+ Color[] colors = getGUIcolors();
if (g != null) {
try {
paintScrollBars(g, colors);
} finally {
g.dispose();
}
}
}
public void repaintScrollbarRequest(XScrollbar sb) {
Graphics g = getGraphics();
- Color colors[] = getGUIcolors();
+ Color[] colors = getGUIcolors();
if (g != null) {
try {
if (sb == vsb) {
paintVerScrollbar(g, colors, true);
} else if (sb == hsb) {
@@ -395,11 +395,11 @@
*
* @param g the graphics context to draw into
* @param colors the colors used to draw the scrollbar
* @param paintAll paint the whole scrollbar if true, just the thumb if false
*/
- void paintHorScrollbar(Graphics g, Color colors[], boolean paintAll) {
+ void paintHorScrollbar(Graphics g, Color[] colors, boolean paintAll) {
if (hsbSpace <= 0) {
return;
}
Graphics ng = g.create();
g.setColor(colors[BACKGROUND_COLOR]);
@@ -431,11 +431,11 @@
*
* @param g the graphics context to draw into
* @param colors the colors used to draw the scrollbar
* @param paintAll paint the whole scrollbar if true, just the thumb if false
*/
- void paintVerScrollbar(Graphics g, Color colors[], boolean paintAll) {
+ void paintVerScrollbar(Graphics g, Color[] colors, boolean paintAll) {
if (vsbSpace <= 0) {
return;
}
Graphics ng = g.create();
g.setColor(colors[BACKGROUND_COLOR]);
< prev index next >