|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.AbstractButton
org.tanager.ui.CScrollablePane
org.tanager.ui.CPlaylistViewer
public class CPlaylistViewer
This class represents a scollable pane that shows the current playlist.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.AbstractButton |
|---|
javax.swing.AbstractButton.AccessibleAbstractButton, javax.swing.AbstractButton.ButtonChangeListener |
| 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 | |
|---|---|
private static boolean |
debugPlaylistViewerButton_
Represents whether or not we want to output menu selection debugging information to the console. |
private CDownButtonAction |
downButtonCallback_
Represents the down button callback. |
private CLeftButtonAction |
leftButtonCallback_
Represents the left button callback. |
protected javax.swing.JTable |
playlistTable_
Represents the table that contains the playlist. |
private static long |
serialVersionUID
Represents the universal version ID of this class. |
private CUpButtonAction |
upButtonCallback_
Represents the up button callback. |
| Fields inherited from class org.tanager.ui.CScrollablePane |
|---|
menuButtonCallback_, powerButtonCallback_ |
| Fields inherited from class javax.swing.AbstractButton |
|---|
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY |
| 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 javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
CPlaylistViewer(CPlaylistTypeEnum playlistType,
java.util.Vector playlist,
CUIStateContext uiStateContext)
This is the only constructor allowed for a CPlaylistViewer object. |
|
| Method Summary | |
|---|---|
protected void |
addMouseDoubleClickListener(CMouseDoubleClickListener listener)
This method is used to add a CMouseDoubleClickListener
to the playlist table. |
void |
addPlaylistViewerListener(IPlaylistViewerListener listener)
This method adds a new listener to the collection. |
private void |
configureAlbumColumn(javax.swing.table.TableColumn albumColumn,
int extraWidth)
This method configures the album column. |
private void |
configureArtistColumn(javax.swing.table.TableColumn artistColumn,
int extraWidth)
This method configures the artist column. |
private void |
configureDateDownloadedColumn(javax.swing.table.TableColumn dateDownloadedColumn)
This method configures the date downloaded column. |
private void |
configureTitleColumn(javax.swing.table.TableColumn titleColumn,
int extraWidth)
This method configures the song title column. |
private javax.swing.JTable |
createAndConfigurePlaylistTable(java.util.Vector playlist)
This method creates the playlist table and confgures it to be read-only and row-scrollable. |
protected void |
debugPlaylistViewerButton(java.lang.String dbg)
This method is used to output debug information to the console. |
void |
downButtonPressed()
This method is used to process the downButtonPressed() event
and will move down from the current
playlist table row to the one directly
below it. |
CDownButtonAction |
getDownButtonCallback()
This method returns the implementor's down button callback. |
CLeftButtonAction |
getLeftButtonCallback()
This method returns the implementor's left button callback. |
protected javax.swing.JTable |
getPlaylistTable()
Poseidon-generated accessor method. |
CUpButtonAction |
getUpButtonCallback()
This method returns the implementor's up button callback. |
void |
leftButtonPressed()
This method is used to process the leftButtonPressed() event. |
private void |
scrollToRow(int newRow)
This method is used to scroll to the given row in the playlist table, and it must make sure the row is displayed in the viewport. |
boolean |
supportsDownButton()
This method indicates whether or not the implementor supports the down button. |
boolean |
supportsLeftButton()
This method indicates whether or not the implementor supports the left button. |
boolean |
supportsUpButton()
This method indicates whether or not the implementor supports the up button. |
void |
upButtonPressed()
This method is used to process the upButtonPressed() event and
will move up from the current playlist
table row to the one directly above it. |
| Methods inherited from class javax.swing.AbstractButton |
|---|
addActionListener, addChangeListener, addImpl, addItemListener, checkHorizontalKey, checkVerticalKey, configurePropertiesFromAction, createActionListener, createActionPropertyChangeListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getActionListeners, getChangeListeners, getDisabledIcon, getDisabledSelectedIcon, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getItemListeners, getLabel, getMargin, getMnemonic, getModel, getMultiClickThreshhold, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, init, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, isSelected, paintBorder, paramString, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setDisplayedMnemonicIndex, setEnabled, setFocusPainted, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabel, setLayout, setMargin, setMnemonic, setMnemonic, setModel, setMultiClickThreshhold, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition, updateUI |
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, 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, 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, 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, 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, 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 |
| Field Detail |
|---|
private static final long serialVersionUID
Represents the universal version ID of this
class. This ID is recommended for all
classes that implement the
Serializable interface.
private final CUpButtonAction upButtonCallback_
Represents the up button callback.
private final CDownButtonAction downButtonCallback_
Represents the down button callback.
private final CLeftButtonAction leftButtonCallback_
Represents the left button callback.
protected javax.swing.JTable playlistTable_
Represents the table that contains the playlist.
private static boolean debugPlaylistViewerButton_
Represents whether or not we want to output menu selection debugging information to the console.
| Constructor Detail |
|---|
public CPlaylistViewer(CPlaylistTypeEnum playlistType,
java.util.Vector playlist,
CUIStateContext uiStateContext)
This is the only constructor allowed for a
CPlaylistViewer object. The
caller must supply the playlist type and
the playlist vector.
createAndConfigurePlaylistTable()
method to create a new JTable
representation of the playlist vector configureDateDownloadedColumn()
method to configure the date downloaded
column configureTitleColumn(),
configureArtistColumn(),
and configureAlbumColumn()
methods to configure the title, artist, and
album columns JList to hold
the playlist table
setScrollPane()
method with the new JList
playlistType - the playlist typeplaylist - the playlist vectoruiStateContext - the State Context
that controls the menus| Method Detail |
|---|
public void addPlaylistViewerListener(IPlaylistViewerListener listener)
This method adds a new listener to the collection.
Semantics:addListener method with the
given listener
listener - a reference to an object
implementing the
IPlaylistViewerListener
interfaceprivate javax.swing.JTable createAndConfigurePlaylistTable(java.util.Vector playlist)
This method creates the playlist table and confgures it to be read-only and row-scrollable.
Semantics:CPlaylistViewerTableModel
using the given playlist vector JTable
using the new
CPlaylistViewerTableModel
JTable
playlist - the playlist vector
private void configureDateDownloadedColumn(javax.swing.table.TableColumn dateDownloadedColumn)
This method configures the date downloaded column.
Semantics:CPlaylistViewerCellRenderer
renderer object, so the cell will be
displayed normally even when it has the
focus
dateDownloadedColumn - the column
containing the date downloaded field
private void configureTitleColumn(javax.swing.table.TableColumn titleColumn,
int extraWidth)
This method configures the song title column.
Semantics:CPlaylistViewerCellRenderer
renderer object, so the cell will be
displayed normally even when it has the
focus
titleColumn - the column containing
the album fieldextraWidth - extra column width
padding required to make the table
fit in the area it needs to fill
private void configureArtistColumn(javax.swing.table.TableColumn artistColumn,
int extraWidth)
This method configures the artist column.
Semantics:CPlaylistViewerCellRenderer
renderer object, so the cell will be
displayed normally even when it has the
focus
artistColumn - the column containing
the album fieldextraWidth - extra column width
padding required to make the table
fit in the area it needs to fill
private void configureAlbumColumn(javax.swing.table.TableColumn albumColumn,
int extraWidth)
This method configures the album column.
Semantics:CPlaylistViewerCellRenderer
renderer object, so the cell will be
displayed normally even when it has the
focus
albumColumn - the column containing
the album fieldextraWidth - extra column width
padding required to make the table
fit in the area it needs to fillprotected javax.swing.JTable getPlaylistTable()
Poseidon-generated accessor method.
protected void addMouseDoubleClickListener(CMouseDoubleClickListener listener)
This method is used to add a
CMouseDoubleClickListener
to the playlist table.
listener - public boolean supportsUpButton()
This method indicates whether or not the implementor supports the up button.
Semantics:true
supportsUpButton in interface IButtonHandlersupportsUpButton in class CScrollablePanepublic boolean supportsDownButton()
This method indicates whether or not the implementor supports the down button.
Semantics:true
supportsDownButton in interface IButtonHandlersupportsDownButton in class CScrollablePanepublic boolean supportsLeftButton()
This method indicates whether or not the implementor supports the left button.
Semantics:true
supportsLeftButton in interface IButtonHandlersupportsLeftButton in class CScrollablePanetruepublic CUpButtonAction getUpButtonCallback()
This method returns the implementor's up
button callback. Note:
that this method is only valid when
supportsUpButton() returns
true
getUpButtonCallback in interface IButtonHandlergetUpButtonCallback in class CScrollablePanepublic CDownButtonAction getDownButtonCallback()
This method returns the implementor's down
button callback. Note:
that this method is only valid when
supportsDownButton() returns
true
getDownButtonCallback in interface IButtonHandlergetDownButtonCallback in class CScrollablePanepublic CLeftButtonAction getLeftButtonCallback()
This method returns the implementor's left
button callback. Note:
that this method is only valid when
supportsLeftButton() returns
true
getLeftButtonCallback in interface IButtonHandlergetLeftButtonCallback in class CScrollablePanepublic void upButtonPressed()
This method is used to process the
upButtonPressed() event and
will move up from the current playlist
table row to the one directly above it.
This is part of the
IUpButtonCallback interface.
scrollToRow()
method passing the new row
upButtonPressed in interface IUpButtonCallbackpublic void downButtonPressed()
This method is used to process the
downButtonPressed() event
and will move down from the current
playlist table row to the one directly
below it. This is part of the
IDownButtonCallback
interface.
scrollToRow()
method passing the new row
downButtonPressed in interface IDownButtonCallbackpublic void leftButtonPressed()
This method is used to process the
leftButtonPressed() event.
This is part of the
ILeftButtonCallback
interface.
previousPane() method
leftButtonPressed in interface ILeftButtonCallbackprotected void debugPlaylistViewerButton(java.lang.String dbg)
This method is used to output debug information to the console.
dbg - private void scrollToRow(int newRow)
This method is used to scroll to the given row in the playlist table, and it must make sure the row is displayed in the viewport.
Semantics:scrollRectToVisible() to
ensure the new scroll position is visible
newRow -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||