|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel net.sf.fmj.ejmf.toolkit.gui.controlpanel.AbstractControlPanel net.sf.fmj.ejmf.toolkit.gui.controlpanel.StandardControlPanel
public class StandardControlPanel
StandardControlPanel extends JPanel and arranges the standard controls in a left-to-right fashion using FlowLayout and add(Component, index) Setters are defined that allow the user to change the visual component associated with any control. A version of these setters allows for the definition of a new listener. Two constructors are defined. The first builds all the default controls into the control panel. The second takes a flag which defines the controls to be built and displayed by the control panel. The flag values are defined by public static values provided by the class. These values can be OR'd together to set a flag value.
AbstractControlPanel
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class net.sf.fmj.ejmf.toolkit.gui.controlpanel.AbstractControlPanel |
---|
skin, USE_FF_CONTROL, USE_GAIN_CONTROL, USE_GAINMETER_CONTROL, USE_PAUSE_CONTROL, USE_PROGRESS_CONTROL, USE_REVERSE_CONTROL, USE_START_CONTROL, USE_STOP_CONTROL |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
StandardControlPanel(Player p)
Build a StandardControlPanel with all of the default controls. |
|
StandardControlPanel(Player p,
int buttonFlags)
Build a StandardControlPanel designating which controls are desired. |
|
StandardControlPanel(Skin skin,
Player p)
|
|
StandardControlPanel(Skin skin,
Player p,
int buttonFlags)
|
Method Summary | |
---|---|
void |
addComponents(int flags)
Does the work of building the control components and adding them to the layout. |
protected net.sf.fmj.ejmf.toolkit.gui.controlpanel.AbstractControls |
createControls(Player player)
Creates Controls associated with this Control Panel. |
javax.swing.AbstractButton |
getFastForwardButton()
Get the fast forward button control |
AbstractGainButtonPanel |
getGainButtonPanel()
Get the gain button panel |
javax.swing.AbstractButton |
getGainMeterButton()
Get the gain meter button control |
javax.swing.AbstractButton |
getPauseControl()
Get the pause button control |
ProgressSlider |
getProgressComponent()
Get the progress control |
javax.swing.AbstractButton |
getReverseButton()
Get the reverse button control |
javax.swing.AbstractButton |
getStartButton()
Get the start button control |
javax.swing.AbstractButton |
getStopButton()
Get the stop button control |
void |
setFastForwardButton(javax.swing.AbstractButton c)
Set the control button for fast forwarding the player associated with this control panel. |
void |
setFastForwardButton(javax.swing.AbstractButton c,
java.awt.event.MouseListener l)
Set the control button for fast forwarding the player associated with this control panel. |
void |
setGainButtonPanel(AbstractGainButtonPanel c)
Set the control component for gain Control |
void |
setGainButtonPanel(AbstractGainButtonPanel c,
java.awt.event.ActionListener l)
Set the control component and listener semantics for gain Control |
void |
setGainMeterButton(javax.swing.AbstractButton c)
Set the control component for gain meter Control |
void |
setGainMeterButton(javax.swing.AbstractButton c,
java.awt.event.ActionListener l)
Set the control component and listener semantics for gain meter Control |
void |
setPauseButton(javax.swing.AbstractButton c)
Set the control button for pausing the player associated with this control panel. |
void |
setPauseButton(javax.swing.AbstractButton c,
java.awt.event.ActionListener l)
Set the pause button with use-supplied semantics. |
void |
setProgressSlider(ProgressSlider c)
Set the control component for progress bar associated with this control panel. |
void |
setProgressSlider(ProgressSlider c,
javax.swing.event.ChangeListener l)
Set the control component for displaying the player progress slider associated with this control panel. |
void |
setReverseButton(javax.swing.AbstractButton c)
Set the control button for reversing the player associated with this control panel. |
void |
setReverseButton(javax.swing.AbstractButton c,
java.awt.event.MouseListener l)
Set the control button for reversing the player associated with this control panel. |
void |
setStartButton(javax.swing.AbstractButton c)
Set the control button for starting the player associated with this control panel. |
void |
setStartButton(javax.swing.AbstractButton c,
java.awt.event.ActionListener l)
Set the control button for starting the player associated with this control panel. |
void |
setStopButton(javax.swing.AbstractButton c)
Set the control button for stopping the player associated with this control panel. |
void |
setStopButton(javax.swing.AbstractButton c,
java.awt.event.ActionListener l)
Set the control button for stopping the player associated with this control panel. |
Methods inherited from class net.sf.fmj.ejmf.toolkit.gui.controlpanel.AbstractControlPanel |
---|
getControl, getControls, removeControlComponents, replaceControlComponent, replaceControlComponent, setControlPanelBorder, setControlPanelLayout |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StandardControlPanel(Player p)
p
- A player with which control panel is associated.Player
public StandardControlPanel(Player p, int buttonFlags)
p
- A player with which control panel is associated.buttonFlags
- Control values OR'd together which determine
the controls that are displayed.Player
public StandardControlPanel(Skin skin, Player p)
public StandardControlPanel(Skin skin, Player p, int buttonFlags)
Method Detail |
---|
protected net.sf.fmj.ejmf.toolkit.gui.controlpanel.AbstractControls createControls(Player player)
createControls
in class AbstractControlPanel
player
- Associated Playerpublic void addComponents(int flags)
addComponents
in class AbstractControlPanel
flags
- Is the bit-wise OR of some number
of Control identifiers, e.g. USE_START_CONTROL.
OR'd value of USE values that determine which
control buttons are displayed.public javax.swing.AbstractButton getStartButton()
public javax.swing.AbstractButton getPauseControl()
public javax.swing.AbstractButton getFastForwardButton()
public ProgressSlider getProgressComponent()
public javax.swing.AbstractButton getStopButton()
public javax.swing.AbstractButton getReverseButton()
public AbstractGainButtonPanel getGainButtonPanel()
public javax.swing.AbstractButton getGainMeterButton()
public void setStartButton(javax.swing.AbstractButton c)
c
- An AbstractButtonpublic void setStartButton(javax.swing.AbstractButton c, java.awt.event.ActionListener l)
c
- An AbstractButtonl
- A MouseListener that implements button semantics.public void setStopButton(javax.swing.AbstractButton c)
c
- An AbstractButtonpublic void setStopButton(javax.swing.AbstractButton c, java.awt.event.ActionListener l)
c
- An AbstractButtonl
- An ActionListener that implements button semantics.public void setFastForwardButton(javax.swing.AbstractButton c)
c
- An AbstractButtonpublic void setFastForwardButton(javax.swing.AbstractButton c, java.awt.event.MouseListener l)
c
- An AbstractButtonl
- A MouseListener that implements button semantics.public void setReverseButton(javax.swing.AbstractButton c)
c
- An AbstractButtonpublic void setReverseButton(javax.swing.AbstractButton c, java.awt.event.MouseListener l)
c
- An AbstractButtonl
- A MouseListener that implements button semantics.public void setPauseButton(javax.swing.AbstractButton c)
c
- An AbstractButtonpublic void setPauseButton(javax.swing.AbstractButton c, java.awt.event.ActionListener l)
c
- An AbstractButton to affect pause.l
- A ActionListener that implements button semantics.public void setProgressSlider(ProgressSlider c)
c
- A ProgressBarProgressBar
public void setProgressSlider(ProgressSlider c, javax.swing.event.ChangeListener l)
c
- A ProgressBarProgressSlider
public void setGainMeterButton(javax.swing.AbstractButton c)
c
- An AbstractButtonpublic void setGainMeterButton(javax.swing.AbstractButton c, java.awt.event.ActionListener l)
c
- An AbstractButtonl
- An ActionListener that implements Control semantics.public void setGainButtonPanel(AbstractGainButtonPanel c)
c
- an AbstractGainButtonPanelAbstractGainButtonPanel
public void setGainButtonPanel(AbstractGainButtonPanel c, java.awt.event.ActionListener l)
c
- an AbstractGainButtonPanell
- An ActionListener that implements Control semantics.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |