Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

riso.general
Class BorderPanel  view BorderPanel download BorderPanel.java

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended byriso.general.BorderPanel
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class BorderPanel
extends java.awt.Panel

A panel that adds a border around the contents. This class was written by Jef Poskanzer, and it is redistributed as part of the RISO project under the terms stated in the comments of the source file.

Sample usage:


 BorderPanel p = new BorderPanel( BorderPanel.IN );
 

Fetch the software.
Fetch the entire Acme package.


Nested Class Summary
 
Nested classes inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static int IN
           
private  java.awt.Panel innerPanel
           
static int LOWERED
           
static int OUT
           
static int RAISED
           
static int SOLID
           
private  int thickness
           
private  int type
           
 
Fields inherited from class java.awt.Panel
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
BorderPanel(int type)
           
BorderPanel(int type, int thickness)
           
 
Method Summary
 java.awt.Component add(java.awt.Component comp)
          Adds the specified component to this container at the end of the component list.
 java.awt.Component add(java.awt.Component comp, int pos)
          Adds the specified component to this container at the specified index in the component list.
 java.awt.Component add(java.lang.String name, java.awt.Component comp)
          Adds the specified component to the container at the end of the component list.
private  void build()
           
 int countComponents()
          Returns the number of components in this container.
 java.awt.Component getComponent(int n)
          Returns the component at the specified index.
 java.awt.LayoutManager getLayout()
          Returns the current layout manager for this container.
 java.awt.Insets insets(int n)
           
 void paint(java.awt.Graphics graphics)
          Paints this container.
 void remove(java.awt.Component comp)
          Removes the specified component from this container.
 void removeAll()
          Removes all components from this container.
 void setLayout(java.awt.LayoutManager mgr)
          Sets the layout manager for this container to the specified layout manager.
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SOLID

public static final int SOLID
See Also:
Constant Field Values

RAISED

public static final int RAISED
See Also:
Constant Field Values

LOWERED

public static final int LOWERED
See Also:
Constant Field Values

IN

public static final int IN
See Also:
Constant Field Values

OUT

public static final int OUT
See Also:
Constant Field Values

type

private int type

thickness

private int thickness

innerPanel

private java.awt.Panel innerPanel
Constructor Detail

BorderPanel

public BorderPanel(int type,
                   int thickness)

BorderPanel

public BorderPanel(int type)
Method Detail

build

private void build()

paint

public void paint(java.awt.Graphics graphics)
Description copied from class: java.awt.Container
Paints this container. The implementation of this method in this class forwards to any lightweight components in this container. If this method is subclassed, this method should still be invoked as a superclass method so that lightweight components are properly drawn.


countComponents

public int countComponents()
Description copied from class: java.awt.Container
Returns the number of components in this container.


getComponent

public java.awt.Component getComponent(int n)
Description copied from class: java.awt.Container
Returns the component at the specified index.


insets

public java.awt.Insets insets(int n)

add

public java.awt.Component add(java.awt.Component comp)
Description copied from class: java.awt.Container
Adds the specified component to this container at the end of the component list.


add

public java.awt.Component add(java.awt.Component comp,
                              int pos)
Description copied from class: java.awt.Container
Adds the specified component to this container at the specified index in the component list.


add

public java.awt.Component add(java.lang.String name,
                              java.awt.Component comp)
Description copied from class: java.awt.Container
Adds the specified component to the container at the end of the component list. This method should not be used. Instead, use add(Component, Object).


remove

public void remove(java.awt.Component comp)
Description copied from class: java.awt.Container
Removes the specified component from this container.


removeAll

public void removeAll()
Description copied from class: java.awt.Container
Removes all components from this container.


getLayout

public java.awt.LayoutManager getLayout()
Description copied from class: java.awt.Container
Returns the current layout manager for this container.


setLayout

public void setLayout(java.awt.LayoutManager mgr)
Description copied from class: java.awt.Container
Sets the layout manager for this container to the specified layout manager.