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:
- void addComponents(int flags);
- AbstractControls createControls(Player player);
-
USE_FF_CONTROL
- Value for fast forward control
-
USE_GAIN_CONTROL
- Value for volume control.
-
USE_GAINMETER_CONTROL
- Value for volume meter/mute control
-
USE_PAUSE_CONTROL
- Value for pause button control.
-
USE_PROGRESS_CONTROL
- Value for progress bar control.
-
USE_REVERSE_CONTROL
- Value for reverse button control.
-
USE_START_CONTROL
- Value for start button control.
-
USE_STOP_CONTROL
- Value for stop button control.
-
AbstractControlPanel(Player)
-
Create a Control Panel with complete suite of Controls
-
AbstractControlPanel(Player, int)
-
Create a Control panel with those Controls identified
by
flags
argument associated with
player
.
-
addComponents(int)
- Add appropriate Components to Control Panel.
-
createControls(Player)
- Create the Controls to be displayed in the Control Panel.
-
getControl(String)
-
Return Control with given name.
-
getControls()
- Return AbstractControls managed by this AbstractControlPanel.
-
removeControlComponents()
- Remove all control components from the Control panel
container.
-
replaceControlComponent(Component, Component)
- Remove the control component identified by
c
and
replace it with withComponent
.
-
replaceControlComponent(Component, int)
- Remove the control component at location
atIndex
with the component named by withComponent
.
-
setControlPanelBorder()
- Set border of control panel.
-
setControlPanelLayout()
-
Set layout for control panel.
USE_START_CONTROL
public static final int USE_START_CONTROL
- Value for start button control.
USE_STOP_CONTROL
public static final int USE_STOP_CONTROL
- Value for stop button control.
USE_REVERSE_CONTROL
public static final int USE_REVERSE_CONTROL
- Value for reverse button control.
USE_PAUSE_CONTROL
public static final int USE_PAUSE_CONTROL
- Value for pause button control.
USE_GAIN_CONTROL
public static final int USE_GAIN_CONTROL
- Value for volume control.
USE_FF_CONTROL
public static final int USE_FF_CONTROL
- Value for fast forward control
USE_PROGRESS_CONTROL
public static final int USE_PROGRESS_CONTROL
- Value for progress bar control.
USE_GAINMETER_CONTROL
public static final int USE_GAINMETER_CONTROL
- Value for volume meter/mute control
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.
AbstractControlPanel
protected AbstractControlPanel(Player player)
- Create a Control Panel with complete suite of Controls
- Parameters:
- player - Playera with which control panel is associated.
setControlPanelBorder
protected void setControlPanelBorder()
- Set border of control panel. Subclasses should override
this method if they prefer a border different than
EtchedBorder.
setControlPanelLayout
protected void setControlPanelLayout()
- Set layout for control panel.
Subclasses override this method to
change layout.
Default layout is FlowLayout.
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.
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.
removeControlComponents
protected void removeControlComponents()
- Remove all control components from the Control panel
container.
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.
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.
getControl
public AbstractListenerControl getControl(String name)
- Return Control with given name.
getControls
protected AbstractControls getControls()
- Return AbstractControls managed by this AbstractControlPanel.
All Packages Class Hierarchy This Package Previous Next Index