| Overview | Package | Class | Tree | Deprecated | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Panel
|
+--ncsa.horizon.awt.SingleComponentPanel
This Panel is a nice container to maintain space between an enclosing Frame and the Component this Panel contains. When the Frame is resized, this Panel will resize its enclosed component to maintain the space.
This Panel is designed to hold only one Component. The Component to be enclosed can either be passed to the constructor or added afterward with the add(Component) method. If there are several components to be laid out, one should wrap them in a regular AWT Panel before enclosing them in this one. If add(Component) is called after a Component has already been added, the previous one is replaced. This Panel automatically sets the up the necessary layout (via initLayout()) upon construction; therefore, one should not call this Panel's setLayout() method. Doing so voids the features of this class and may produce undesired effects. Similarly, one should not call the add(String, Component) or add(Component, int) methods.
| Field Summary | |
| int | bgap
|
| java.awt.Component | item
the single component contained in this Panel |
| int | lgap
|
| int | rgap
|
| int | tgap
|
| Fields inherited from class java.awt.Component | |
| BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT | |
| Constructor Summary | |
| SingleComponentPanel()
construct the Panel with the single Component it will enclose to be added later. |
|
| SingleComponentPanel(int bottom,
int left,
int right,
int top)
construct the Panel with a given size border. |
|
| SingleComponentPanel(java.awt.Component comp,
int bottom,
int left,
int right,
int top)
construct the Panel with a given size border and enclosing a single given Component. |
|
| SingleComponentPanel(java.awt.Component comp)
construct the Panel to enclose the single given Component |
|
| Method Summary | |
| java.awt.Component | add(java.awt.Component comp)
|
| void | initLayout()
initialize the Layout. |
| void | setBounds(java.awt.Rectangle r)
|
| Methods inherited from class java.awt.Panel | |
| addNotify | |
| Methods inherited from class java.awt.Container | |
| add, add, add, add, add, addContainerListener, addImpl, addNotify, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponentAt, getComponentAt, getComponent, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, paint, paramString, preferredSize, printComponents, print, processContainerEvent, processEvent, removeAll, remove, remove, removeContainerListener, removeNotify, setLayout, update, validate, validateTree | |
| Methods inherited from class java.awt.Component | |
| action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paint, paramString, postEvent, preferredSize, prepareImage, prepareImage, printAll, print, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate | |
| Methods inherited from class java.lang.Object | |
| clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait | |
| Field Detail |
protected java.awt.Component item
protected int tgap
protected int bgap
protected int rgap
protected int lgap
| Constructor Detail |
public SingleComponentPanel()
public SingleComponentPanel(int bottom,
int left,
int right,
int top)
public SingleComponentPanel(java.awt.Component comp,
int bottom,
int left,
int right,
int top)
public SingleComponentPanel(java.awt.Component comp)
| Method Detail |
protected void initLayout()
public java.awt.Component add(java.awt.Component comp)
public void setBounds(java.awt.Rectangle r)
| Overview | Package | Class | Tree | Deprecated | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||