All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ejmf.toolkit.gui.controlpanel.AbstractControlPanel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----com.sun.java.swing.JComponent
                           |
                           +----com.sun.java.swing.JPanel
                                   |
                                   +----ejmf.toolkit.gui.controlpanel.AbstractControlPanel

public abstract class AbstractControlPanel
extends JPanel
Root class form which custom Control Panels should extends. AbstractControlPanel provides layout a collection Controls provided by AbstractControls reference.

Subclasses must supply definitions of the following methods:


Variable Index

 o USE_FF_CONTROL
Value for fast forward control
 o USE_GAIN_CONTROL
Value for volume control.
 o USE_GAINMETER_CONTROL
Value for volume meter/mute control
 o USE_PAUSE_CONTROL
Value for pause button control.
 o USE_PROGRESS_CONTROL
Value for progress bar control.
 o USE_REVERSE_CONTROL
Value for reverse button control.
 o USE_START_CONTROL
Value for start button control.
 o USE_STOP_CONTROL
Value for stop button control.

Constructor Index

 o AbstractControlPanel(Player)
Create a Control Panel with complete suite of Controls
 o AbstractControlPanel(Player, int)
Create a Control panel with those Controls identified by flags argument associated with player.

Method Index

 o addComponents(int)
Add appropriate Components to Control Panel.
 o createControls(Player)
Create the Controls to be displayed in the Control Panel.
 o getControl(String)
Return Control with given name.
 o getControls()
Return AbstractControls managed by this AbstractControlPanel.
 o removeControlComponents()
Remove all control components from the Control panel container.
 o replaceControlComponent(Component, Component)
Remove the control component identified by c and replace it with withComponent.
 o replaceControlComponent(Component, int)
Remove the control component at location atIndex with the component named by withComponent.
 o setControlPanelBorder()
Set border of control panel.
 o setControlPanelLayout()
Set layout for control panel.

Variables

 o USE_START_CONTROL
 public static final int USE_START_CONTROL
Value for start button control.

 o USE_STOP_CONTROL
 public static final int USE_STOP_CONTROL
Value for stop button control.

 o USE_REVERSE_CONTROL
 public static final int USE_REVERSE_CONTROL
Value for reverse button control.

 o USE_PAUSE_CONTROL
 public static final int USE_PAUSE_CONTROL
Value for pause button control.

 o USE_GAIN_CONTROL
 public static final int USE_GAIN_CONTROL
Value for volume control.

 o USE_FF_CONTROL
 public static final int USE_FF_CONTROL
Value for fast forward control

 o USE_PROGRESS_CONTROL
 public static final int USE_PROGRESS_CONTROL
Value for progress bar control.

 o USE_GAINMETER_CONTROL
 public static final int USE_GAINMETER_CONTROL
Value for volume meter/mute control

Constructors

 o AbstractControlPanel
 protected AbstractControlPanel(Player player,
                                int flags)
Create a Control panel with those Controls identified by flags argument associated with player.

Parameters:
player - Playera with which control panel is associated.
flags - OR'd value of USE values that determine which control buttons are displayed.
 o AbstractControlPanel
 protected AbstractControlPanel(Player player)
Create a Control Panel with complete suite of Controls

Parameters:
player - Playera with which control panel is associated.

Methods

 o setControlPanelBorder
 protected void setControlPanelBorder()
Set border of control panel. Subclasses should override this method if they prefer a border different than EtchedBorder.

 o setControlPanelLayout
 protected void setControlPanelLayout()
Set layout for control panel. Subclasses override this method to change layout.

Default layout is FlowLayout.

 o addComponents
 protected abstract void addComponents(int flags)
Add appropriate Components to Control Panel.

Parameters:
flags - Is the bit-wise OR of some number of Control identifiers, e.g. USE_START_CONTROL.
flags - OR'd value of USE values that determine which control buttons are displayed.
 o createControls
 protected abstract AbstractControls createControls(Player player)
Create the Controls to be displayed in the Control Panel.

Parameters:
player - Playera with which control panel is associated.
 o removeControlComponents
 protected void removeControlComponents()
Remove all control components from the Control panel container.

 o replaceControlComponent
 protected void replaceControlComponent(Component c,
                                        Component withComponent)
Remove the control component identified by c and replace it with withComponent.

If default layout is changed by a subclass, this method may need to be overridden.

Parameters:
c - Existing component
withComponent - New component to be installed in control panel.
 o replaceControlComponent
 protected void replaceControlComponent(Component withComponent,
                                        int atIndex)
Remove the control component at location atIndex with the component named by withComponent.

If default layout is changed by a subclass, this method may need to be overridden.

Parameters:
withComponent - New component to be installed in control panel.
atIndex - Position of component to replace.
 o getControl
 public AbstractListenerControl getControl(String name)
Return Control with given name.

 o getControls
 protected AbstractControls getControls()
Return AbstractControls managed by this AbstractControlPanel.


All Packages  Class Hierarchy  This Package  Previous  Next  Index