Class jrad.util.ToolBarPanel
All Packages Class Hierarchy This Package Previous Next Index
Class jrad.util.ToolBarPanel
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----jrad.util.ToolBarPanel
- public class ToolBarPanel
- extends Panel
A subclass of Panel that shows a Windows 95-style toolbar. The toolbar
can track images and will automatically track the images of ImageButtons.
-
componentPanel
- The panel which contains the toolbar contents.
-
locationCounter
- The current location within the toolbar with which to place new components.
-
mediaTracker
- A MediaTracker to automatically track images for the toolbar.
-
ToolBarPanel()
- Constructs a new ToolBarPanel.
-
addComponent(Component)
- Adds a new component to the toolbar.
-
addComponent(Component, int)
- Adds a new component to the toolbar using a vertical offset.
-
addSpace()
- Adds a space of standard width to the toolbar so that components may be
separated.
-
addSpace(int)
- Adds a space to the toolbar so that components may be separated.
-
minimumSize()
- Returns the minimum size of the toolbar.
-
paint(Graphics)
- Paints the toolbar and its components.
-
preferredSize()
- Returns the preferred size of the toolbar.
-
trackImage(Image)
- Track an image contained within the toolbar.
-
tryToWaitForImages()
- Try to wait until all images tracked by the toolbar have loaded.
-
waitForImages()
- Wait until all images tracked by the toolbar have loaded.
componentPanel
protected Panel componentPanel
- The panel which contains the toolbar contents.
locationCounter
protected int locationCounter
- The current location within the toolbar with which to place new components.
mediaTracker
protected MediaTracker mediaTracker
- A MediaTracker to automatically track images for the toolbar.
ToolBarPanel
public ToolBarPanel()
- Constructs a new ToolBarPanel.
addComponent
public void addComponent(Component component)
- Adds a new component to the toolbar.
addComponent
public void addComponent(Component component,
int verticalOffset)
- Adds a new component to the toolbar using a vertical offset.
- Parameters:
- verticalOffset - the number of pixels to offset the component vertically
addSpace
public void addSpace()
- Adds a space of standard width to the toolbar so that components may be
separated.
addSpace
public void addSpace(int space)
- Adds a space to the toolbar so that components may be separated.
- Parameters:
- space - the number of pixels to add as white space
minimumSize
public Dimension minimumSize()
- Returns the minimum size of the toolbar.
- Overrides:
- minimumSize in class Container
preferredSize
public Dimension preferredSize()
- Returns the preferred size of the toolbar.
- Overrides:
- preferredSize in class Container
trackImage
public void trackImage(Image image)
- Track an image contained within the toolbar.
- Parameters:
- image - the image to track
waitForImages
public void waitForImages() throws InterruptedException
- Wait until all images tracked by the toolbar have loaded.
tryToWaitForImages
public void tryToWaitForImages()
- Try to wait until all images tracked by the toolbar have loaded. If there
is an exception, continue processing.
paint
public void paint(Graphics g)
- Paints the toolbar and its components.
- Overrides:
- paint in class Component
All Packages Class Hierarchy This Package Previous Next Index