01: /**
02: * Caption: Zaval Java Resource Editor
03: * $Revision: 0.37 $
04: * $Date: 2002/03/28 9:24:42 $
05: *
06: * @author: Victor Krapivin
07: * @version: 1.3
08: *
09: * Zaval JRC Editor is a visual editor which allows you to manipulate
10: * localization strings for all Java based software with appropriate
11: * support embedded.
12: *
13: * For more info on this product read Zaval Java Resource Editor User's Guide
14: * (It comes within this package).
15: * The latest product version is always available from the product's homepage:
16: * http://www.zaval.org/products/jrc-editor/
17: * and from the SourceForge:
18: * http://sourceforge.net/projects/zaval0002/
19: *
20: * Contacts:
21: * Support : support@zaval.org
22: * Change Requests : change-request@zaval.org
23: * Feedback : feedback@zaval.org
24: * Other : info@zaval.org
25: *
26: * Copyright (C) 2001-2002 Zaval Creative Engineering Group (http://www.zaval.org)
27: *
28: * This program is free software; you can redistribute it and/or
29: * modify it under the terms of the GNU General Public License
30: * (version 2) as published by the Free Software Foundation.
31: *
32: * This program is distributed in the hope that it will be useful,
33: * but WITHOUT ANY WARRANTY; without even the implied warranty of
34: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35: * GNU General Public License for more details.
36: *
37: * You should have received a copy of the GNU General Public License
38: * along with this program; if not, write to the Free Software
39: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
40: *
41: */package org.zaval.awt;
42:
43: import java.awt.*;
44: import java.util.*;
45:
46: public class StatusBarStubbElement extends StatusBarElement {
47: public StatusBarStubbElement(Component c, int p, Dimension pref) {
48: super (c, p, pref);
49: }
50:
51: public StatusBarStubbElement(Component c, int p) {
52: this (c, p, null);
53: }
54:
55: public void paint(Graphics gr) {
56: super .paint(gr);
57: Dimension d = size();
58:
59: int h = (d.height * 2) / 3;
60: int c = h / 5;
61: int xx = d.width - 2;
62: int yy = d.height - 2;
63: int y = yy - 2;
64: int x = xx - 2;
65: if (c % 5 > 0)
66: c++;
67:
68: for (int i = 0; i < c; i++) {
69: gr.setColor(Color.gray);
70: gr.drawLine(x, yy, xx, y);
71: x -= 2;
72: y -= 2;
73: gr.setColor(Color.white);
74: gr.drawLine(x, yy, xx, y);
75: x -= 2;
76: y -= 2;
77: }
78:
79: gr.setColor(getBackground());
80: gr.drawLine(x + 2, yy + 1, xx, yy + 1);
81: gr.drawLine(xx + 1, y + 2, xx + 1, yy + 1);
82: }
83: }
|