Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.virtuosotechnologies.asaph.maingui
Class ListsImpl  view ListsImpl download ListsImpl.java

java.lang.Object
  extended bycom.virtuosotechnologies.asaph.maingui.ListsImpl
All Implemented Interfaces:
ListUpdateManager, SelectionManager

class ListsImpl
extends java.lang.Object
implements SelectionManager, ListUpdateManager

Implementation of the database and song lists.


Nested Class Summary
(package private) static class ListsImpl.HeaderPane
           
 
Field Summary
private  com.virtuosotechnologies.lib.util.EventBroadcastHelper broadcaster_
           
private  CommandManagerImpl commandManager_
           
private  DatabaseManagerImpl databaseManager_
           
private  javax.swing.JList databasesList_
           
private  java.util.prefs.Preferences detailPanePrefs_
           
private static java.lang.String DETAILS_PREFSNODE
           
private  com.virtuosotechnologies.asaph.model.opsemantics.PredicateSemantics filterPredicate_
           
private static java.awt.Color INFO_COLOR
           
private static java.awt.Font INFO_FONT
           
private  javax.swing.JPanel infoPanel_
           
private  DatabaseListener listener_
           
private  javax.swing.JSplitPane listsPanel_
           
private  DatabaseManagerImpl.Item selectedDatabase_
           
private  SongListModel.Item[] selectedSongs_
           
private static java.lang.String SHOW_ALTTITLES_PREF
           
private static java.lang.String SHOW_AUTHOR_PREF
           
private static java.lang.String SHOW_COMMENT_PREF
           
private static java.lang.String SHOW_COPYRIGHT_PREF
           
private  boolean showAltTitlesDetail_
           
private  boolean showAuthorDetail_
           
private  boolean showCommentDetail_
           
private  boolean showCopyrightDetail_
           
private  java.util.Map songListModels_
           
private  ListsImpl.HeaderPane songsHeader_
           
private  SongListModel.SizeChangeListener songsHeaderUpdater_
           
private  javax.swing.JList songsList_
           
private  com.virtuosotechnologies.asaph.modelutils.SongUtils songUtils_
           
private static java.lang.String STR_Dialog_DatabaseErrorTitle
           
private static java.lang.String STR_Dialog_ErrorHeader
           
private static java.lang.String STR_Dialog_FirstExceptionTemplate
           
private static java.lang.String STR_Dialog_NextExceptionTemplate
           
private static java.lang.String STR_InfoPane_AltTitlesHeader
           
private static java.lang.String STR_Message_FetchIndexFailed
           
private  javax.swing.JSplitPane upperSplit_
           
 
Fields inherited from interface com.virtuosotechnologies.asaph.maingui.SelectionManager
API_NAME
 
Fields inherited from interface com.virtuosotechnologies.asaph.maingui.ListUpdateManager
API_NAME
 
Constructor Summary
(package private) ListsImpl(com.virtuosotechnologies.asaph.modelutils.SongUtils songUtils, DatabaseManagerImpl databaseManager, javax.swing.JComponent dialogParent)
          Constructor
 
Method Summary
 void addSelectionListener(SelectionListener listener)
          Add a SelectionListener to the main gui.
(package private)  int getBottomSplitPanePosition()
           
(package private)  com.virtuosotechnologies.asaph.model.opsemantics.PredicateSemantics getFilter()
           
(package private)  javax.swing.JComponent getJComponent()
           
(package private)  java.lang.String getNameForSongID(com.virtuosotechnologies.asaph.model.SongID id)
           
 com.virtuosotechnologies.asaph.model.SongDatabase getSelectedDatabase()
          Get the currently selected database.
(package private)  DatabaseHandler getSelectedDatabaseHandler()
           
 java.util.Set getSelectedSongSet()
          Get the Set of currently selected songs.
(package private)  int getTopSplitPanePosition()
           
(package private)  boolean isShowingAltTitlesDetail()
           
(package private)  boolean isShowingAuthorDetail()
           
(package private)  boolean isShowingCommentDetail()
           
(package private)  boolean isShowingCopyrightDetail()
           
(package private)  void refreshDatabaseIndex(com.virtuosotechnologies.asaph.model.SongDatabase database)
           
 void removeSelectionListener(SelectionListener listener)
          Remove a SelectionListener from the main gui.
 void reportSongAdded(com.virtuosotechnologies.asaph.model.SongID songID)
          Notify the main gui that a song has been added by this plugin.
 void reportSongChanged(com.virtuosotechnologies.asaph.model.SongID songID)
          Notify the main gui that a song has been changed by this plugin.
 void reportSongRemoved(com.virtuosotechnologies.asaph.model.SongID songID)
          Notify the main gui that a song has been removed by this plugin.
(package private)  void requestFocus()
           
 void selectDatabase(com.virtuosotechnologies.asaph.model.SongDatabase database)
          Select the specified database in the gui.
(package private)  void setBottomSplitPanePosition(int pos)
           
(package private)  void setCommandManager(CommandManagerImpl commandManager)
           
(package private)  void setFilter(com.virtuosotechnologies.asaph.model.opsemantics.PredicateSemantics filter)
           
(package private)  void setShowingAltTitlesDetail(boolean value)
           
(package private)  void setShowingAuthorDetail(boolean value)
           
(package private)  void setShowingCommentDetail(boolean value)
           
(package private)  void setShowingCopyrightDetail(boolean value)
           
(package private)  void setTopSplitPanePosition(int pos)
           
private  void setupInfoPane(int numSongs)
           
private  void setupInfoPane(com.virtuosotechnologies.asaph.model.SongID songID)
           
(package private)  void shutdown()
           
private  void updateInfoPane()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STR_Dialog_DatabaseErrorTitle

private static final java.lang.String STR_Dialog_DatabaseErrorTitle

STR_Message_FetchIndexFailed

private static final java.lang.String STR_Message_FetchIndexFailed

STR_Dialog_ErrorHeader

private static final java.lang.String STR_Dialog_ErrorHeader

STR_Dialog_FirstExceptionTemplate

private static final java.lang.String STR_Dialog_FirstExceptionTemplate

STR_Dialog_NextExceptionTemplate

private static final java.lang.String STR_Dialog_NextExceptionTemplate

STR_InfoPane_AltTitlesHeader

private static final java.lang.String STR_InfoPane_AltTitlesHeader

INFO_FONT

private static final java.awt.Font INFO_FONT

INFO_COLOR

private static final java.awt.Color INFO_COLOR

DETAILS_PREFSNODE

private static final java.lang.String DETAILS_PREFSNODE
See Also:
Constant Field Values

SHOW_COMMENT_PREF

private static final java.lang.String SHOW_COMMENT_PREF
See Also:
Constant Field Values

SHOW_AUTHOR_PREF

private static final java.lang.String SHOW_AUTHOR_PREF
See Also:
Constant Field Values

SHOW_COPYRIGHT_PREF

private static final java.lang.String SHOW_COPYRIGHT_PREF
See Also:
Constant Field Values

SHOW_ALTTITLES_PREF

private static final java.lang.String SHOW_ALTTITLES_PREF
See Also:
Constant Field Values

databaseManager_

private DatabaseManagerImpl databaseManager_

commandManager_

private CommandManagerImpl commandManager_

songUtils_

private com.virtuosotechnologies.asaph.modelutils.SongUtils songUtils_

selectedDatabase_

private DatabaseManagerImpl.Item selectedDatabase_

selectedSongs_

private SongListModel.Item[] selectedSongs_

songListModels_

private java.util.Map songListModels_

songsHeader_

private ListsImpl.HeaderPane songsHeader_

databasesList_

private javax.swing.JList databasesList_

songsList_

private javax.swing.JList songsList_

infoPanel_

private javax.swing.JPanel infoPanel_

listsPanel_

private javax.swing.JSplitPane listsPanel_

upperSplit_

private javax.swing.JSplitPane upperSplit_

filterPredicate_

private com.virtuosotechnologies.asaph.model.opsemantics.PredicateSemantics filterPredicate_

detailPanePrefs_

private java.util.prefs.Preferences detailPanePrefs_

showCommentDetail_

private boolean showCommentDetail_

showAuthorDetail_

private boolean showAuthorDetail_

showCopyrightDetail_

private boolean showCopyrightDetail_

showAltTitlesDetail_

private boolean showAltTitlesDetail_

broadcaster_

private com.virtuosotechnologies.lib.util.EventBroadcastHelper broadcaster_

listener_

private DatabaseListener listener_

songsHeaderUpdater_

private SongListModel.SizeChangeListener songsHeaderUpdater_
Constructor Detail

ListsImpl

ListsImpl(com.virtuosotechnologies.asaph.modelutils.SongUtils songUtils,
          DatabaseManagerImpl databaseManager,
          javax.swing.JComponent dialogParent)
Constructor

Method Detail

updateInfoPane

private void updateInfoPane()

setupInfoPane

private void setupInfoPane(int numSongs)

setupInfoPane

private void setupInfoPane(com.virtuosotechnologies.asaph.model.SongID songID)

shutdown

void shutdown()

isShowingCommentDetail

boolean isShowingCommentDetail()

isShowingAuthorDetail

boolean isShowingAuthorDetail()

isShowingCopyrightDetail

boolean isShowingCopyrightDetail()

isShowingAltTitlesDetail

boolean isShowingAltTitlesDetail()

setShowingCommentDetail

void setShowingCommentDetail(boolean value)

setShowingAuthorDetail

void setShowingAuthorDetail(boolean value)

setShowingCopyrightDetail

void setShowingCopyrightDetail(boolean value)

setShowingAltTitlesDetail

void setShowingAltTitlesDetail(boolean value)

setTopSplitPanePosition

void setTopSplitPanePosition(int pos)

getTopSplitPanePosition

int getTopSplitPanePosition()

setBottomSplitPanePosition

void setBottomSplitPanePosition(int pos)

getBottomSplitPanePosition

int getBottomSplitPanePosition()

getJComponent

javax.swing.JComponent getJComponent()

getSelectedDatabaseHandler

DatabaseHandler getSelectedDatabaseHandler()

getNameForSongID

java.lang.String getNameForSongID(com.virtuosotechnologies.asaph.model.SongID id)

refreshDatabaseIndex

void refreshDatabaseIndex(com.virtuosotechnologies.asaph.model.SongDatabase database)
                    throws com.virtuosotechnologies.asaph.model.SongDatabaseFailedException

setCommandManager

void setCommandManager(CommandManagerImpl commandManager)

setFilter

void setFilter(com.virtuosotechnologies.asaph.model.opsemantics.PredicateSemantics filter)

getFilter

com.virtuosotechnologies.asaph.model.opsemantics.PredicateSemantics getFilter()

requestFocus

void requestFocus()

getSelectedDatabase

public com.virtuosotechnologies.asaph.model.SongDatabase getSelectedDatabase()
Get the currently selected database.

Specified by:
getSelectedDatabase in interface SelectionManager

getSelectedSongSet

public java.util.Set getSelectedSongSet()
Get the Set of currently selected songs.

Specified by:
getSelectedSongSet in interface SelectionManager

selectDatabase

public void selectDatabase(com.virtuosotechnologies.asaph.model.SongDatabase database)
Select the specified database in the gui.

Specified by:
selectDatabase in interface SelectionManager

addSelectionListener

public void addSelectionListener(SelectionListener listener)
Add a SelectionListener to the main gui. Note that it is added as a weak listener, so make sure it is strongly referenced elsewhere.

Specified by:
addSelectionListener in interface SelectionManager

removeSelectionListener

public void removeSelectionListener(SelectionListener listener)
Remove a SelectionListener from the main gui. Does nothing if the listener is not added.

Specified by:
removeSelectionListener in interface SelectionManager

reportSongAdded

public void reportSongAdded(com.virtuosotechnologies.asaph.model.SongID songID)
Notify the main gui that a song has been added by this plugin. This causes the main gui to update its song list appropriately. It isn't strictly necessary to use this callback, but failure to do so may cause the main gui to get out of sync with the database contents until the user explicitly refreshes the index.

Specified by:
reportSongAdded in interface ListUpdateManager

reportSongRemoved

public void reportSongRemoved(com.virtuosotechnologies.asaph.model.SongID songID)
Notify the main gui that a song has been removed by this plugin. This causes the main gui to update its song list appropriately. It isn't strictly necessary to use this callback, but failure to do so may cause the main gui to get out of sync with the database contents until the user explicitly refreshes the index.

Specified by:
reportSongRemoved in interface ListUpdateManager

reportSongChanged

public void reportSongChanged(com.virtuosotechnologies.asaph.model.SongID songID)
Notify the main gui that a song has been changed by this plugin. This causes the main gui to update its song list appropriately. It isn't strictly necessary to use this callback, but failure to do so may cause the main gui to get out of sync with the database contents until the user explicitly refreshes the index.

Specified by:
reportSongChanged in interface ListUpdateManager