All Packages Class Hierarchy This Package Previous Next Index
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.
protected Component item
protected int tgap
protected int bgap
protected int rgap
protected int lgap
public SingleComponentPanel()
public SingleComponentPanel(int bottom,
int left,
int right,
int top)
public SingleComponentPanel(Component comp,
int bottom,
int left,
int right,
int top)
public SingleComponentPanel(Component comp)
protected void initLayout()
public Component add(Component comp)
public void reshape(int x,
int y,
int width,
int height)
All Packages Class Hierarchy This Package Previous Next Index