home *** CD-ROM | disk | FTP | other *** search
- package com.sun.java.swing.border;
-
- import java.awt.Component;
- import java.awt.Graphics;
- import java.awt.Insets;
- import java.awt.Rectangle;
- import java.io.Serializable;
-
- public abstract class AbstractBorder implements Border, Serializable {
- public Insets getBorderInsets(Component c) {
- return new Insets(0, 0, 0, 0);
- }
-
- public Rectangle getInteriorRectangle(Component c, int x, int y, int width, int height) {
- return getInteriorRectangle(c, this, x, y, width, height);
- }
-
- public static Rectangle getInteriorRectangle(Component c, Border b, int x, int y, int width, int height) {
- Insets insets;
- if (b != null) {
- insets = b.getBorderInsets(c);
- } else {
- insets = new Insets(0, 0, 0, 0);
- }
-
- return new Rectangle(x + insets.left, y + insets.top, width - insets.right - insets.left, height - insets.top - insets.bottom);
- }
-
- public boolean isBorderOpaque() {
- return false;
- }
-
- public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
- }
- }
-