< prev index next >

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

Print this page

        

*** 771,781 **** return getPeerBackground(); } static int[] getRGBvals(Color c) { ! int rgbvals[] = new int[3]; rgbvals[0] = c.getRed(); rgbvals[1] = c.getGreen(); rgbvals[2] = c.getBlue(); --- 771,781 ---- return getPeerBackground(); } static int[] getRGBvals(Color c) { ! int[] rgbvals = new int[3]; rgbvals[0] = c.getRed(); rgbvals[1] = c.getGreen(); rgbvals[2] = c.getBlue();
*** 786,796 **** static final int HIGHLIGHT_COLOR = 1; static final int SHADOW_COLOR = 2; static final int FOREGROUND_COLOR = 3; public Color[] getGUIcolors() { ! Color c[] = new Color[4]; float backb, highb, shadowb, hue, saturation; c[BACKGROUND_COLOR] = getWinBackground(); if (c[BACKGROUND_COLOR] == null) { c[BACKGROUND_COLOR] = super.getWinBackground(); } --- 786,796 ---- static final int HIGHLIGHT_COLOR = 1; static final int SHADOW_COLOR = 2; static final int FOREGROUND_COLOR = 3; public Color[] getGUIcolors() { ! Color[] c = new Color[4]; float backb, highb, shadowb, hue, saturation; c[BACKGROUND_COLOR] = getWinBackground(); if (c[BACKGROUND_COLOR] == null) { c[BACKGROUND_COLOR] = super.getWinBackground(); }
*** 905,926 **** } /** * Draw a 3D oval. */ ! public void draw3DOval(Graphics g, Color colors[], int x, int y, int w, int h, boolean raised) { Color c = g.getColor(); g.setColor(raised ? colors[HIGHLIGHT_COLOR] : colors[SHADOW_COLOR]); g.drawArc(x, y, w, h, 45, 180); g.setColor(raised ? colors[SHADOW_COLOR] : colors[HIGHLIGHT_COLOR]); g.drawArc(x, y, w, h, 225, 180); g.setColor(c); } ! public void draw3DRect(Graphics g, Color colors[], int x, int y, int width, int height, boolean raised) { Color c = g.getColor(); g.setColor(raised ? colors[HIGHLIGHT_COLOR] : colors[SHADOW_COLOR]); g.drawLine(x, y, x, y + height); --- 905,926 ---- } /** * Draw a 3D oval. */ ! public void draw3DOval(Graphics g, Color[] colors, int x, int y, int w, int h, boolean raised) { Color c = g.getColor(); g.setColor(raised ? colors[HIGHLIGHT_COLOR] : colors[SHADOW_COLOR]); g.drawArc(x, y, w, h, 45, 180); g.setColor(raised ? colors[SHADOW_COLOR] : colors[HIGHLIGHT_COLOR]); g.drawArc(x, y, w, h, 225, 180); g.setColor(c); } ! public void draw3DRect(Graphics g, Color[] colors, int x, int y, int width, int height, boolean raised) { Color c = g.getColor(); g.setColor(raised ? colors[HIGHLIGHT_COLOR] : colors[SHADOW_COLOR]); g.drawLine(x, y, x, y + height);
*** 972,983 **** Color c = g.getColor(); double f = (double)(length - 2*(thickness-1)) / Math.max(1, ((max - min) + vis)); int v1 = thickness + (int)(f * (val - min)); int v2 = (int)(f * vis); int w2 = thickness-4; ! int tpts_x[] = new int[3]; ! int tpts_y[] = new int[3]; if (length < 3*w2 ) { v1 = v2 = 0; if (length < 2*w2 + 2) { w2 = (length-2)/2; --- 972,983 ---- Color c = g.getColor(); double f = (double)(length - 2*(thickness-1)) / Math.max(1, ((max - min) + vis)); int v1 = thickness + (int)(f * (val - min)); int v2 = (int)(f * vis); int w2 = thickness-4; ! int[] tpts_x = new int[3]; ! int[] tpts_y = new int[3]; if (length < 3*w2 ) { v1 = v2 = 0; if (length < 2*w2 + 2) { w2 = (length-2)/2;
< prev index next >