|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.limegroup.gnutella.gui.tables.AbstractTableMediator
com.limegroup.gnutella.gui.upload.UploadMediator
This class acts as a mediator between all of the components of the upload window. It also constructs all of the upload window components.
| Nested Class Summary |
| Nested classes inherited from class com.limegroup.gnutella.gui.tables.AbstractTableMediator |
AbstractTableMediator.Resorter |
| Field Summary |
| Fields inherited from class com.limegroup.gnutella.gui.tables.AbstractTableMediator |
BUTTON_ROW, CHAT_RENDERER, COLOR_RENDERER, DATA_MODEL, DEFAULT_LISTENER, HEADER_LISTENER, ID, MAIN_PANEL, PROGRESS_BAR_RENDERER, REMOVE_LISTENER, RESORTER, SCROLL_PANE, SELECTION_LISTENER, SETTINGS, TABLE, TABLE_PANE, ZERO_DIMENSION |
| Constructor Summary | |
UploadMediator()
Constructs all of the elements of the upload window, including the table, the buttons, etc. |
|
| Method Summary | |
void |
add(java.lang.Object uploader)
Override the default add. |
protected void |
buildListeners()
Build some extra listeners |
protected void |
buildSettings()
Overriden to have different default values for tooltips. |
protected javax.swing.JPopupMenu |
createPopupMenu()
Abstract method for creating a right-click popup menu for the table. |
void |
doRefresh()
Override the default refresh so we can set the clear button. |
int |
getActiveUploads()
Returns the total number of active Uploads. |
int |
getCurrentUploads()
Returns the total number of current Uploads. |
int |
getTotalUploads()
Returns the total number of Uploads that have occurred in this session. |
void |
handleMouseDoubleClick(java.awt.Point p)
Don't do anything on a double click. |
void |
handleNoSelection()
Handles the deselection of all rows in the upload table, disabling all necessary buttons and menu items. |
void |
handleSelection(int row)
Handles the selection of the specified row in the download window, enabling or disabling buttons and chat menu items depending on the values in the row. |
static UploadMediator |
instance()
|
void |
remove(java.lang.Object uploader)
Override the default remove Removes a upload from the list if the user has configured their system to automatically clear completed upload and if the upload is complete. |
void |
removeSelection()
Override the default remove to not actually remove, but instead just call 'cleanup'. |
protected void |
setupConstants()
Set us up the constants |
protected void |
updateSplashScreen()
Update the splash screen |
| Methods inherited from class com.limegroup.gnutella.gui.tables.AbstractTableMediator |
addListeners, addUnsorted, clearSelection, clearTable, createColumnSelectionMenu, createDefaultColumnPreferencesHandler, forceResort, getComponent, getScrolledTablePane, getSize, handleHeaderColumnLeftClick, handleHeaderColumnPressed, handleHeaderColumnReleased, handleHeaderPopupMenu, handlePopupMenu, handleRightMouseClick, refresh, removeRow, resort, setButtonEnabled, setDefaultEditors, setDefaultRenderers, setupMainPanel, setupTable, setupTableHeaders, sortAndMaintainSelection, update, updateTheme |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public UploadMediator()
| Method Detail |
public static UploadMediator instance()
protected void buildSettings()
buildSettings in class AbstractTableMediatorprotected void buildListeners()
buildListeners in class AbstractTableMediatorprotected void setupConstants()
setupConstants in class AbstractTableMediatorprotected void updateSplashScreen()
updateSplashScreen in class AbstractTableMediatorpublic void doRefresh()
doRefresh in class AbstractTableMediatorpublic int getTotalUploads()
public int getCurrentUploads()
public int getActiveUploads()
public void add(java.lang.Object uploader)
With HTTP1.1 support, swarm downloads, and chunking, it becomes important that the GUI should not get updated whenever a little chunk of a file is uploaded.
add in interface ComponentMediatoradd in class AbstractTableMediatorpublic void remove(java.lang.Object uploader)
remove in interface ComponentMediatorremove in class AbstractTableMediatoruploader - the Uploader to remove from the list if it is
complete.public void removeSelection()
removeSelection in interface ComponentMediatorremoveSelection in class AbstractTableMediatorpublic void handleMouseDoubleClick(java.awt.Point p)
protected javax.swing.JPopupMenu createPopupMenu()
AbstractTableMediator
createPopupMenu in class AbstractTableMediatorpublic void handleSelection(int row)
row - the selected rowpublic void handleNoSelection()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||