net.shredzone.ifish
Class IFishPane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by net.shredzone.ifish.IFishPane
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class IFishPane
extends JPanel

This is the IFish's main pane, with all the buttons and stuff.

Version:
$Id: IFishPane.java 291 2009-04-28 21:29:27Z shred $
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static String ACTION_ABOUT
           
static String ACTION_DELETEDATABASE
           
static String ACTION_EXPORTDATABASE
           
static String ACTION_PLAYER_PAUSE
           
static String ACTION_PLAYER_PLAY
           
static String ACTION_PLAYER_STOP
           
static String ACTION_PREFS
           
static String ACTION_QUIT
           
static String ACTION_READDATABASE
           
static String ACTION_SAVEDATABASE
           
static String ACTION_SYNCDATABASE
           
static String ACTION_TAB_DB
           
static String ACTION_TAB_PLAYLIST
           
static String ACTION_TAB_SCANNER
           
 
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
IFishPane()
          Create the IFish's main pane.
 
Method Summary
 boolean confirmChanges()
          Confirm if the user really wants to lose all unsaved changes.
 IFishAction getAction(String key)
          Get the Action named with the given key.
 NaviDbTableModel getDatabase()
          Get the current NaviDb database
 PlaylistDb getPlaylist()
          Get the current PlaylistDb database
 PlaylistSource getPlaylistSource()
          Get the playlist source which is to be used for playlist selection.
 String getPLBase()
          Get the Playlist's base directory.
 IFishPrefs getPrefs()
          Get the Preferences
 Entry[] getSelectedDatabaseEntries()
          Get the entries currently selected in the database pane.
 Entry[] getSelectedEntries()
          Get the currently selected Entries in the database or the playlist.
 StatusProgressBar getStatusBar()
          Get the StatusProgressBar that shows the status.
 boolean isUnsaved()
          Check if there are unsaved changes.
 void recallGUI(Preferences prefs)
          Recall previously stored GUI settings, or use reasonable defaults if there are none stored yet.
 void setDatabase(NaviDbTableModel model)
          Set a new database.
 void setPlaylist(PlaylistDb playlist)
          Set a new playlist database.
 void setPlaylistSource(PlaylistSource source)
          Set the playlist source which is to be used for playlist selection.
 void setUnsaved(boolean unsaved)
          Set that there have been unsaved changes.
 void storeGUI(Preferences prefs)
          Store the GUI settings, like selected tabs.
 void updateStatus(NaviDbTableModel model)
          Update the status panes with the data of the given model.
 
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, getBaseline, getBaselineResizeBehavior, 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, isPaintingForPrint, 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, 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, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ACTION_READDATABASE

public static final String ACTION_READDATABASE
See Also:
Constant Field Values

ACTION_SYNCDATABASE

public static final String ACTION_SYNCDATABASE
See Also:
Constant Field Values

ACTION_SAVEDATABASE

public static final String ACTION_SAVEDATABASE
See Also:
Constant Field Values

ACTION_DELETEDATABASE

public static final String ACTION_DELETEDATABASE
See Also:
Constant Field Values

ACTION_EXPORTDATABASE

public static final String ACTION_EXPORTDATABASE
See Also:
Constant Field Values

ACTION_ABOUT

public static final String ACTION_ABOUT
See Also:
Constant Field Values

ACTION_PREFS

public static final String ACTION_PREFS
See Also:
Constant Field Values

ACTION_QUIT

public static final String ACTION_QUIT
See Also:
Constant Field Values

ACTION_TAB_SCANNER

public static final String ACTION_TAB_SCANNER
See Also:
Constant Field Values

ACTION_TAB_DB

public static final String ACTION_TAB_DB
See Also:
Constant Field Values

ACTION_TAB_PLAYLIST

public static final String ACTION_TAB_PLAYLIST
See Also:
Constant Field Values

ACTION_PLAYER_PLAY

public static final String ACTION_PLAYER_PLAY
See Also:
Constant Field Values

ACTION_PLAYER_PAUSE

public static final String ACTION_PLAYER_PAUSE
See Also:
Constant Field Values

ACTION_PLAYER_STOP

public static final String ACTION_PLAYER_STOP
See Also:
Constant Field Values
Constructor Detail

IFishPane

public IFishPane()
Create the IFish's main pane.

Method Detail

getAction

public IFishAction getAction(String key)
Get the Action named with the given key.

Parameters:
key - Action you are asking for
Returns:
The Action or null

getPrefs

public IFishPrefs getPrefs()
Get the Preferences

Returns:
Preferences

getPLBase

public String getPLBase()
Get the Playlist's base directory.

Returns:
Base directory, default is "ifish".

setUnsaved

public void setUnsaved(boolean unsaved)
Set that there have been unsaved changes. This is a bound property with the name "unsaved".

Parameters:
unsaved - Unsaved changes

isUnsaved

public boolean isUnsaved()
Check if there are unsaved changes.

Returns:
true if there are unsaved changes.

confirmChanges

public boolean confirmChanges()
Confirm if the user really wants to lose all unsaved changes.

Returns:
true: there are no unsaved changes, or the user wants to lose them. false: there are unsaved changes and the user aborted the operation.

getStatusBar

public StatusProgressBar getStatusBar()
Get the StatusProgressBar that shows the status.

Returns:
StatusProgressBar

getDatabase

public NaviDbTableModel getDatabase()
Get the current NaviDb database

Returns:
Current Database

setDatabase

public void setDatabase(NaviDbTableModel model)
Set a new database. This is a bound property with the name "database".

Parameters:
model - Database model to be shown

getPlaylist

public PlaylistDb getPlaylist()
Get the current PlaylistDb database

Returns:
Current Playlist database

setPlaylist

public void setPlaylist(PlaylistDb playlist)
Set a new playlist database. This is a bound property with the name "playlist".

Parameters:
playlist - Playlist database

updateStatus

public void updateStatus(NaviDbTableModel model)
Update the status panes with the data of the given model. This is not necessarily the current database.

Parameters:
model - Database model to be shown

setPlaylistSource

public void setPlaylistSource(PlaylistSource source)
Set the playlist source which is to be used for playlist selection. This is a bound property with the name "playlistsource".

Parameters:
source - Playlist Source

getPlaylistSource

public PlaylistSource getPlaylistSource()
Get the playlist source which is to be used for playlist selection.

Returns:
Playlist source or null if none was set yet.

getSelectedEntries

public Entry[] getSelectedEntries()
Get the currently selected Entries in the database or the playlist.

Returns:
Array of Entry, might be empty but never null

getSelectedDatabaseEntries

public Entry[] getSelectedDatabaseEntries()
Get the entries currently selected in the database pane.

Returns:
Array of Entry, might be empty but never null

storeGUI

public void storeGUI(Preferences prefs)
Store the GUI settings, like selected tabs.

Parameters:
prefs - Preferences context to store into.

recallGUI

public void recallGUI(Preferences prefs)
Recall previously stored GUI settings, or use reasonable defaults if there are none stored yet.

Parameters:
prefs - Preferences context to recall from.


Copyright © 2007-2011 shredzone.org. All Rights Reserved.