home *** CD-ROM | disk | FTP | other *** search
- package netscape.application;
-
- public class HRTextAttachment extends TextAttachment {
- private static int WIDTH_OFFSET = 10;
- private static int HEIGHT = 12;
-
- public int width() {
- return ((TextAttachment)this).owner().width();
- }
-
- public int height() {
- return HEIGHT;
- }
-
- public void drawInRect(Graphics var1, Rect var2) {
- Rect var3 = new Rect();
- if (var1 != null && var2 != null) {
- var3.x = var2.x + WIDTH_OFFSET;
- var3.width = var2.width - 2 * WIDTH_OFFSET;
- var3.height = 2;
- var3.y = var2.y + (HEIGHT - 2) / 2;
- var1.setColor(Color.darkGray);
- var1.fillRect(var3);
- ++var3.y;
- var3.height = 1;
- var1.setColor(Color.lightGray);
- var1.fillRect(var3);
- }
- }
- }
-