0N/A/*
2362N/A * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/Apackage javax.swing.border;
0N/A
0N/Aimport java.awt.Graphics;
0N/Aimport java.awt.Insets;
0N/Aimport java.awt.Rectangle;
0N/Aimport java.awt.Component;
0N/A
0N/A/**
0N/A * Interface describing an object capable of rendering a border
0N/A * around the edges of a swing component.
0N/A * For examples of using borders see
0N/A * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/border.html">How to Use Borders</a>,
0N/A * a section in <em>The Java Tutorial.</em>
0N/A * <p>
0N/A * In the Swing component set, borders supercede Insets as the
0N/A * mechanism for creating a (decorated or plain) area around the
0N/A * edge of a component.
0N/A * <p>
0N/A * Usage Notes:
0N/A * <ul>
0N/A * <li>Use EmptyBorder to create a plain border (this mechanism
0N/A * replaces its predecessor, <code>setInsets</code>).
0N/A * <li>Use CompoundBorder to nest multiple border objects, creating
0N/A * a single, combined border.
0N/A * <li>Border instances are designed to be shared. Rather than creating
0N/A * a new border object using one of border classes, use the
0N/A * BorderFactory methods, which produces a shared instance of the
0N/A * common border types.
0N/A * <li>Additional border styles include BevelBorder, SoftBevelBorder,
0N/A * EtchedBorder, LineBorder, TitledBorder, and MatteBorder.
0N/A * <li>To create a new border class, subclass AbstractBorder.
0N/A * </ul>
0N/A *
0N/A * @author David Kloba
0N/A * @author Amy Fowler
0N/A * @see javax.swing.BorderFactory
0N/A * @see EmptyBorder
0N/A * @see CompoundBorder
0N/A */
0N/Apublic interface Border
0N/A{
0N/A /**
0N/A * Paints the border for the specified component with the specified
0N/A * position and size.
0N/A * @param c the component for which this border is being painted
0N/A * @param g the paint graphics
0N/A * @param x the x position of the painted border
0N/A * @param y the y position of the painted border
0N/A * @param width the width of the painted border
0N/A * @param height the height of the painted border
0N/A */
0N/A void paintBorder(Component c, Graphics g, int x, int y, int width, int height);
0N/A
0N/A /**
0N/A * Returns the insets of the border.
0N/A * @param c the component for which this border insets value applies
0N/A */
0N/A Insets getBorderInsets(Component c);
0N/A
0N/A /**
0N/A * Returns whether or not the border is opaque. If the border
0N/A * is opaque, it is responsible for filling in it's own
0N/A * background when painting.
0N/A */
0N/A boolean isBorderOpaque();
0N/A}