/[classpath]/classpath/javax/swing/border/Border.java
ViewVC logotype

Diff of /classpath/javax/swing/border/Border.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by mkoch, Tue Jun 10 14:34:48 2003 UTC revision 1.4 by brawer, Mon Jun 16 09:55:41 2003 UTC
# Line 1  Line 1 
1  /* Border.java --  /* Border.java --
2     Copyright (C) 2002 Free Software Foundation, Inc.     Copyright (C) 2003 Free Software Foundation, Inc.
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 42  import java.awt.Component; Line 42  import java.awt.Component;
42  import java.awt.Graphics;  import java.awt.Graphics;
43  import java.awt.Insets;  import java.awt.Insets;
44    
45    
46    /**
47     * An interface for decorative or spacing borders around a Component.
48     *
49     * <p>To reduce memory consumption, several Components may share a
50     * single Border instance. {@link javax.swing.BorderFactory} is a
51     * factory class for producing commonly used shared borders.
52     *
53     * @see javax.swing.BorderFactory
54     * @see EmptyBorder
55     * @see CompoundBorder
56     * @see BevelBorder
57     * @see EtchedBorder
58     * @see LineBorder
59     * @see MatteBorder
60     * @see SoftBevelBorder
61     * @see TitledBorder
62     * @see AbstractBorder
63     *
64     * @author Ronald Veldema (rveldema@cs.vu.nl)
65     * @author Michael Koch (konqueror@gmx.de)
66     * @author Sascha Brawer (brawer@dandelis.ch)
67     */
68  public interface Border  public interface Border
69  {  {
70    public Insets getBorderInsets (Component c);    /**
71    public boolean isBorderOpaque ();     * Paints the border for a given component.
72    public void paintBorder (Component c, Graphics g, int x, int y,     *
73                             int width, int height);     * @param c the component whose border is to be painted.
74       * @param g the graphics for painting.
75       * @param x the horizontal position for painting the border.
76       * @param y the vertical position for painting the border.
77       * @param width the width of the available area for painting the border.
78       * @param height the height of the available area for painting the border.
79       */
80      public void paintBorder(Component c, Graphics g,
81                              int x, int y, int width, int height);
82      
83      
84      /**
85       * Measures the width of this border.
86       *
87       * @param c the component whose border is to be measured.
88       *
89       * @return an Insets object whose <code>left</code>, <code>right</code>,
90       *         <code>top</code> and <code>bottom</code> fields indicate the
91       *         width of the border at the respective edge.
92       */
93      public Insets getBorderInsets(Component c);
94      
95      
96      /**
97       * Determines whether this border fills every pixel in its area
98       * when painting.
99       *
100       * @return <code>true</code> if the border is fully opaque, or
101       *         <code>false</code> if some pixels of the background
102       *         can shine through the border.
103       */
104      public boolean isBorderOpaque();
105  }  }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26