Class DaemonOptionsPanelController

java.lang.Object
  extended byNSWindowController
      extended byWindowController
          extended byDaemonOptionsPanelController

public class DaemonOptionsPanelController
extends WindowController

Controls the DaemonOptionsPanel panel.

See Also:
Serialized Form

Field Summary
(package private)  NSTextField allServersComment
           
(package private)  NSTableView allServersList
           
(package private)  NSMatrix autoUpdateServers
           
(package private)  NSButton connectButton
           
(package private)  NSTextView consoleView
           
(package private)  NSTextField downloadRate
           
(package private)  NSTextField maxServers
           
(package private)  NSButton restartButton
           
(package private)  NSButton serverMetButton
           
(package private)  NSTextField serversComment
           
(package private)  NSTableView serversList
           
(package private)  NSTextField uploadCommentField
           
(package private)  NSTextField uploadCreditField
           
(package private)  NSTextField uploadRate
           
 
Constructor Summary
DaemonOptionsPanelController(DonkeyTalker talker, DownloadItemSource source)
          Loads the nib, but does not show the window
 
Method Summary
 void addAServer(java.lang.Object sender)
          Opens the window that allows to add a given server to the core
 void addServerMet(java.lang.Object sender)
          Adds a list of servers to the daemon (a server.met file)
 void addServers(java.lang.Object sender)
          Ask the core to add servers
 void cancel(java.lang.Object sender)
          Unused
 void connectServer(java.lang.Object sender)
          Opens the window that allows to add a given server to the core
 void emptyTrash(java.lang.Object sender)
          Deletes "by hand" the files that have been canceled.
static boolean killCore(DonkeyTalker talker)
           
 int numberOfRowsInTableView(NSTableView aTableView)
          For the servers list.
 void recoverTrash(java.lang.Object sender)
          Recovers from the temp directory the files that are there but are not in the list
 void removeOldServers(java.lang.Object sender)
          Asks the server to remove the unused servers
 void restartDaemon(java.lang.Object sender)
          Tries to kill and then to restart the core
 void save(java.lang.Object sender)
          Saves the options to the core
 void tableViewDidClickTableColumn(NSTableView tableView, NSTableColumn tableColumn)
          For the servers list.
 java.lang.Object tableViewObjectValueForLocation(NSTableView aTableView, NSTableColumn aTableColumn, int rowIndex)
          For the servers list.
 void tableViewSelectionDidChange(NSNotification aNotification)
           
 void tabViewDidSelectTabViewItem(NSTabView tabView, NSTabViewItem tabViewItem)
           
 void use15UploadCredit(java.lang.Object sender)
           
 void useAllUploadCredit(java.lang.Object sender)
           
 void useHalfUploadCredit(java.lang.Object sender)
           
 void windowDidLoad()
          Updates the display and launches the thread that will update it
 void windowWillClose(NSNotification aNotification)
          Closes the window and stops the update thread
 
Methods inherited from class WindowController
colorForRow, scrollViewOf, shouldRememberWindowPos, tableViewWillDisplayCell
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

downloadRate

NSTextField downloadRate

uploadRate

NSTextField uploadRate

uploadCommentField

NSTextField uploadCommentField

uploadCreditField

NSTextField uploadCreditField

serversList

NSTableView serversList

serversComment

NSTextField serversComment

maxServers

NSTextField maxServers

autoUpdateServers

NSMatrix autoUpdateServers

consoleView

NSTextView consoleView

allServersList

NSTableView allServersList

allServersComment

NSTextField allServersComment

connectButton

NSButton connectButton

restartButton

NSButton restartButton

serverMetButton

NSButton serverMetButton
Constructor Detail

DaemonOptionsPanelController

public DaemonOptionsPanelController(DonkeyTalker talker,
                                    DownloadItemSource source)
Loads the nib, but does not show the window

Method Detail

windowDidLoad

public void windowDidLoad()
Updates the display and launches the thread that will update it

Overrides:
windowDidLoad in class WindowController

useAllUploadCredit

public void useAllUploadCredit(java.lang.Object sender)

useHalfUploadCredit

public void useHalfUploadCredit(java.lang.Object sender)

use15UploadCredit

public void use15UploadCredit(java.lang.Object sender)

cancel

public void cancel(java.lang.Object sender)
Unused


save

public void save(java.lang.Object sender)
Saves the options to the core


addServers

public void addServers(java.lang.Object sender)
Ask the core to add servers


addAServer

public void addAServer(java.lang.Object sender)
Opens the window that allows to add a given server to the core


addServerMet

public void addServerMet(java.lang.Object sender)
Adds a list of servers to the daemon (a server.met file)


connectServer

public void connectServer(java.lang.Object sender)
Opens the window that allows to add a given server to the core


emptyTrash

public void emptyTrash(java.lang.Object sender)
Deletes "by hand" the files that have been canceled. Often, the core removes the file but does not really delete it


recoverTrash

public void recoverTrash(java.lang.Object sender)
Recovers from the temp directory the files that are there but are not in the list


removeOldServers

public void removeOldServers(java.lang.Object sender)
Asks the server to remove the unused servers


restartDaemon

public void restartDaemon(java.lang.Object sender)
Tries to kill and then to restart the core


killCore

public static boolean killCore(DonkeyTalker talker)

windowWillClose

public void windowWillClose(NSNotification aNotification)
Closes the window and stops the update thread

Overrides:
windowWillClose in class WindowController

numberOfRowsInTableView

public int numberOfRowsInTableView(NSTableView aTableView)
For the servers list.


tableViewObjectValueForLocation

public final java.lang.Object tableViewObjectValueForLocation(NSTableView aTableView,
                                                              NSTableColumn aTableColumn,
                                                              int rowIndex)
For the servers list.


tableViewDidClickTableColumn

public void tableViewDidClickTableColumn(NSTableView tableView,
                                         NSTableColumn tableColumn)
For the servers list. Sorts the list


tableViewSelectionDidChange

public void tableViewSelectionDidChange(NSNotification aNotification)

tabViewDidSelectTabViewItem

public void tabViewDidSelectTabViewItem(NSTabView tabView,
                                        NSTabViewItem tabViewItem)