de.axelwernicke.mypod
Class myPod

java.lang.Object
  extended byde.axelwernicke.mypod.myPod

public class myPod
extends java.lang.Object

This is the main class of myPod. It contains all the code for starting and shutting down myPod, as well as the gui logic (actions etc.). It's kind of glue between application logic and gui.

Author:
axel wernicke

Field Summary
static int MENU_ACTION
          has accelerator, small icon and text // TODO: we should clean them up, but they are contained in the frontend.jave...
static java.lang.String myPodBaseDir
          current directory is mypods base diectory
static java.lang.String myPodVersion
          current myPod version
static int POPUP_ACTION
           
static int TOOLBAR_ACTION
           
 
Constructor Summary
myPod()
           
 
Method Summary
static javax.swing.AbstractAction getAboutAction(int mode)
          Gets an ReorganizeClipsAction.
static javax.swing.AbstractAction getAddClipsToPlaylistAction(java.lang.String name)
          Gets an AddClipsToPlaylistAction.
static Backend getBackend()
          Gets the myPod Backend.
static javax.swing.AbstractAction getClipPropertiesAction(int mode)
          Gets an ClipPropertiesAction.
static DataPool getDataPool()
          Gets the myPod data pool.
static javax.swing.AbstractAction getDeleteClipsAction(int mode)
          Gets an Delete Clips Action.
static javax.swing.AbstractAction getDeletePlaylistAction(int mode)
          gets an delete playlist action
static javax.swing.AbstractAction getExitAction()
           
static javax.swing.AbstractAction getExportPlaylistAction(int mode)
          gets an Export Playlist Action
static Frontend getFrontend()
          Gets the myPod Frontend.
static javax.swing.AbstractAction getHelpAction(int mode)
          Gets an ReorganizeClipsAction.
static javax.swing.AbstractAction getImportPlaylistAction(int mode)
          gets an Export Playlist Action.
static javax.swing.AbstractAction getNewAutoPlaylistAction(int mode)
          gets an add autoplaylist action
static javax.swing.AbstractAction getNewPlaylistAction(int mode)
          gets an add playlist action
static java.lang.Long getOid(java.lang.String filename)
          Gets the oid of a clip.
static javax.swing.AbstractAction getPlayClipsAddAction(int mode)
          gets an Add Play External Action
static javax.swing.AbstractAction getPlayClipsAppendAction(int mode)
          gets an Add Play External Action
static Playlist getPlaylist(int index)
          Gets a playlist by its index.
static javax.swing.DefaultListModel getPlaylistListModel()
          gets the list model of all playlists.
static java.util.Vector getPlaylistMenuItems()
          Gets a Vector containing the menu items for playlists to add clips to.
static javax.swing.AbstractAction getPlaylistPropertyAction(int mode)
          gets an delete playlist action
static javax.swing.AbstractAction getPlayPlaylistAddAction(int mode)
          gets an Add Play External Action
static javax.swing.AbstractAction getPlayPlaylistAppendAction(int mode)
          gets an Add Play External Action
static javax.swing.AbstractAction getPreferencesAction(int mode)
          Gets an Preferences Action.
static javax.swing.AbstractAction getRelocateMissingClipsAction(int mode)
          Gets an RemoveMissingClipsAction.
static javax.swing.AbstractAction getRemoveClipsMyPodAction(int mode)
          Gets an Delete Clips Action.
static javax.swing.AbstractAction getRemoveClipsPlaylistAction(int mode)
          Gets an Remove Clips Action.
static javax.swing.AbstractAction getRemoveMissingClipsAction(int mode)
          Gets an RemoveMissingClipsAction.
static javax.swing.AbstractAction getRenamePlaylistAction(int mode)
          gets an delete playlist action.
static javax.swing.AbstractAction getReorganizeClipsAction(int mode)
          Gets an ReorganizeClipsAction.
static javax.swing.AbstractAction getScanAction(int mode)
          Get the scan action.
static Playlist getSelectedPlaylist()
          Gets the selected playlist from the list of playlists
static int getSelectedPlaylistIndex()
          Gets the index of the currently selected playlist from the list of playlists
static javax.swing.AbstractAction getSetIPodNameAction()
          Gets an SynchronizeIPodAction.
static javax.swing.AbstractAction getSetIPodSyncAction(int mode)
          gets an Export Playlist Action
static javax.swing.DefaultListModel getSpreaderListModel(int columnCode)
          Gets the spreader list model initialized for the current view
static javax.swing.DefaultListModel getSpreaderListModel(int columnCode, int playlistIndex)
          Gets the spreader list model initialized for the current view
static javax.swing.AbstractAction getSynchronizeIPodAction(int mode)
          Gets an SynchronizeIPodAction.
static javax.swing.AbstractAction getUpdateAutoPlaylistAction(int mode)
          gets an update autoplaylist action
static javax.swing.AbstractAction getWipeIPodAction(int mode)
          Gets an WipeIPodAction.
static void main(java.lang.String[] args)
          myPods main class - never call this method directly.
static void setClipsTableColumnListener(ListView clipsTableView)
          Sets a column listener to a JTable object.
static void updateClipsTableModel(Playlist playlist)
          Updates the clips tables content using the selected playlist
static void updateModels()
          Updates the models for clips table and spreader list
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myPodVersion

public static final java.lang.String myPodVersion
current myPod version

See Also:
Constant Field Values

myPodBaseDir

public static final java.lang.String myPodBaseDir
current directory is mypods base diectory


MENU_ACTION

public static final int MENU_ACTION
has accelerator, small icon and text // TODO: we should clean them up, but they are contained in the frontend.jave...

See Also:
Constant Field Values

POPUP_ACTION

public static final int POPUP_ACTION
See Also:
Constant Field Values

TOOLBAR_ACTION

public static final int TOOLBAR_ACTION
See Also:
Constant Field Values
Constructor Detail

myPod

public myPod()
Method Detail

main

public static void main(java.lang.String[] args)
myPods main class - never call this method directly.
- show splash screen
- check jvm version
- create backend object
- create frontend
- update all auto playlists
- hide splas screen
- show frontend ( main window )

Parameters:
args - the command line arguments

getPlaylist

public static Playlist getPlaylist(int index)
Gets a playlist by its index.

Parameters:
index - of the playlist
Returns:
playlist at position 'index'

getSelectedPlaylistIndex

public static int getSelectedPlaylistIndex()
Gets the index of the currently selected playlist from the list of playlists

Returns:
the index of the selected playlist in the playlist list model

getSelectedPlaylist

public static Playlist getSelectedPlaylist()
Gets the selected playlist from the list of playlists

Returns:
the playlist item selected in the playlist list view

getOid

public static java.lang.Long getOid(java.lang.String filename)
Gets the oid of a clip.

Parameters:
filename - of the clip
Returns:
oid for the clip

getBackend

public static Backend getBackend()
Gets the myPod Backend.

Returns:
myPod backend

getFrontend

public static Frontend getFrontend()
Gets the myPod Frontend.

Returns:
myPod frontend

getDataPool

public static DataPool getDataPool()
Gets the myPod data pool.

Returns:
data pool

setClipsTableColumnListener

public static void setClipsTableColumnListener(ListView clipsTableView)
Sets a column listener to a JTable object. This method is used to add enable sorting to a table.

Parameters:
clipsTableView - to set the column listener for

getPlaylistListModel

public static javax.swing.DefaultListModel getPlaylistListModel()
gets the list model of all playlists.

Returns:
list of playlists

getSpreaderListModel

public static javax.swing.DefaultListModel getSpreaderListModel(int columnCode)
Gets the spreader list model initialized for the current view

Parameters:
columnCode - of the column to get a model for
Returns:
spreader list model for the selected column

getSpreaderListModel

public static javax.swing.DefaultListModel getSpreaderListModel(int columnCode,
                                                                int playlistIndex)
Gets the spreader list model initialized for the current view

Parameters:
columnCode - of the column to create a model for
playlistIndex - to determine the content of the model from
Returns:
the initialized spreader list model

getPlaylistMenuItems

public static java.util.Vector getPlaylistMenuItems()
Gets a Vector containing the menu items for playlists to add clips to.

Returns:
vector of menu items

updateClipsTableModel

public static void updateClipsTableModel(Playlist playlist)
Updates the clips tables content using the selected playlist

Parameters:
playlist - to update the table model with

updateModels

public static void updateModels()
Updates the models for clips table and spreader list


getScanAction

public static javax.swing.AbstractAction getScanAction(int mode)
Get the scan action.

Parameters:
mode - the action is for
Returns:
a scan action

getPreferencesAction

public static javax.swing.AbstractAction getPreferencesAction(int mode)
Gets an Preferences Action.

Parameters:
mode - the action is for
Returns:
an Preferences Action

getExitAction

public static javax.swing.AbstractAction getExitAction()

getNewPlaylistAction

public static javax.swing.AbstractAction getNewPlaylistAction(int mode)
gets an add playlist action

Parameters:
mode - gui object the action is for
Returns:
an add playlist action

getNewAutoPlaylistAction

public static javax.swing.AbstractAction getNewAutoPlaylistAction(int mode)
gets an add autoplaylist action

Parameters:
mode - defines the kind of gui element the action is instatiated for
Returns:
an add autoplaylist action

getUpdateAutoPlaylistAction

public static javax.swing.AbstractAction getUpdateAutoPlaylistAction(int mode)
gets an update autoplaylist action

Parameters:
mode - defines the kind of gui element the action is instatiated for
Returns:
an update autoplaylist action

getDeletePlaylistAction

public static javax.swing.AbstractAction getDeletePlaylistAction(int mode)
gets an delete playlist action

Parameters:
mode - defines the kind of gui element the action is instatiated for
Returns:
an delete playlist action

getRenamePlaylistAction

public static javax.swing.AbstractAction getRenamePlaylistAction(int mode)
gets an delete playlist action.

Parameters:
mode - defines the kind of gui element the action is instatiated for
Returns:
an delete playlist action

getPlaylistPropertyAction

public static javax.swing.AbstractAction getPlaylistPropertyAction(int mode)
gets an delete playlist action

Parameters:
mode - defines the kind of gui element the action is instatiated for
Returns:
an delete playlist action

getPlayClipsAddAction

public static javax.swing.AbstractAction getPlayClipsAddAction(int mode)
gets an Add Play External Action

Parameters:
mode - defines the kind of gui element the action is instatiated for
Returns:
an Play External Action

getPlayPlaylistAddAction

public static javax.swing.AbstractAction getPlayPlaylistAddAction(int mode)
gets an Add Play External Action

Parameters:
mode - defines the kind of gui element the action is instatiated for
Returns:
an Play External Action

getPlayClipsAppendAction

public static javax.swing.AbstractAction getPlayClipsAppendAction(int mode)
gets an Add Play External Action

Parameters:
mode - defines the kind of gui element the action is instatiated for
Returns:
an Play External Action

getPlayPlaylistAppendAction

public static javax.swing.AbstractAction getPlayPlaylistAppendAction(int mode)
gets an Add Play External Action

Parameters:
mode - defines the kind of gui element the action is instatiated for
Returns:
an Play External Action

getImportPlaylistAction

public static javax.swing.AbstractAction getImportPlaylistAction(int mode)
gets an Export Playlist Action.

Parameters:
mode - defines the kind of gui element the action is instatiated for
Returns:
an Export Playlist Action

getExportPlaylistAction

public static javax.swing.AbstractAction getExportPlaylistAction(int mode)
gets an Export Playlist Action

Parameters:
mode - gui object the action is for
Returns:
an Export Playlist Action

getSetIPodSyncAction

public static javax.swing.AbstractAction getSetIPodSyncAction(int mode)
gets an Export Playlist Action

Parameters:
mode - gui object the action is for
Returns:
an Export Playlist Action

getRemoveClipsPlaylistAction

public static javax.swing.AbstractAction getRemoveClipsPlaylistAction(int mode)
Gets an Remove Clips Action.

Parameters:
mode - that describes action properties
Returns:
an Remove Clips Action

getRemoveClipsMyPodAction

public static javax.swing.AbstractAction getRemoveClipsMyPodAction(int mode)
Gets an Delete Clips Action.

Parameters:
mode - that describes action properties
Returns:
an Delete Clips Action

getDeleteClipsAction

public static javax.swing.AbstractAction getDeleteClipsAction(int mode)
Gets an Delete Clips Action.

Parameters:
mode - that describes action properties
Returns:
an Delete Clips Action

getAddClipsToPlaylistAction

public static javax.swing.AbstractAction getAddClipsToPlaylistAction(java.lang.String name)
Gets an AddClipsToPlaylistAction.

Parameters:
name - of the action
Returns:
an Remove Clips Action

getClipPropertiesAction

public static javax.swing.AbstractAction getClipPropertiesAction(int mode)
Gets an ClipPropertiesAction.

Parameters:
mode - that describes action properties
Returns:
an ClipPropertiesAction

getSetIPodNameAction

public static javax.swing.AbstractAction getSetIPodNameAction()
Gets an SynchronizeIPodAction.

Returns:
an SynchronizeIPodAction

getSynchronizeIPodAction

public static javax.swing.AbstractAction getSynchronizeIPodAction(int mode)
Gets an SynchronizeIPodAction.

Parameters:
mode - describes action properties
Returns:
an SynchronizeIPodAction

getWipeIPodAction

public static javax.swing.AbstractAction getWipeIPodAction(int mode)
Gets an WipeIPodAction.

Parameters:
mode - describes action properties
Returns:
an WipeIPodAction

getRemoveMissingClipsAction

public static javax.swing.AbstractAction getRemoveMissingClipsAction(int mode)
Gets an RemoveMissingClipsAction.

Parameters:
mode - that describes action properties
Returns:
an RemoveMissingClipsAction

getRelocateMissingClipsAction

public static javax.swing.AbstractAction getRelocateMissingClipsAction(int mode)
Gets an RemoveMissingClipsAction.

Parameters:
mode - that describes action properties
Returns:
an RemoveMissingClipsAction

getReorganizeClipsAction

public static javax.swing.AbstractAction getReorganizeClipsAction(int mode)
Gets an ReorganizeClipsAction.

Parameters:
mode - that describes action properties
Returns:
an ReorganizeClipsAction

getAboutAction

public static javax.swing.AbstractAction getAboutAction(int mode)
Gets an ReorganizeClipsAction.

Parameters:
mode - that describes action properties
Returns:
an ReorganizeClipsAction

getHelpAction

public static javax.swing.AbstractAction getHelpAction(int mode)
Gets an ReorganizeClipsAction.

Parameters:
mode - that describes action properties
Returns:
an ReorganizeClipsAction