org.gudy.azureus2.ui.swt.views
Class ViewUtils

java.lang.Object
  extended by org.gudy.azureus2.ui.swt.views.ViewUtils

public class ViewUtils
extends java.lang.Object

Author:
parg

Nested Class Summary
static class ViewUtils.CustomDateFormat
           
static interface ViewUtils.SpeedAdapter
           
static interface ViewUtils.ViewTitleExtraInfo
           
 
Field Summary
static java.lang.String SM_PROP_PERMIT_DOWNLOAD_DISABLE
           
static java.lang.String SM_PROP_PERMIT_UPLOAD_DISABLE
           
 
Constructor Summary
ViewUtils()
           
 
Method Summary
static ViewUtils.CustomDateFormat addCustomDateFormat(CoreTableColumn column)
           
static void addSpeedMenu(org.eclipse.swt.widgets.Shell shell, org.eclipse.swt.widgets.Menu menuAdvanced, boolean doUpMenu, boolean doDownMenu, boolean isTorrentContext, boolean hasSelection, boolean downSpeedDisabled, boolean downSpeedUnlimited, long totalDownSpeed, long downSpeedSetMax, long maxDownload, boolean upSpeedDisabled, boolean upSpeedUnlimited, long totalUpSpeed, long upSpeedSetMax, long maxUpload, int num_entries, java.util.Map<java.lang.String,java.lang.Object> _properties, ViewUtils.SpeedAdapter adapter)
           
static void addSpeedMenuDown(org.eclipse.swt.widgets.Shell shell, org.eclipse.swt.widgets.Menu menuSpeed, boolean isTorrentContext, boolean hasSelection, boolean downSpeedDisabled, boolean downSpeedUnlimited, long totalDownSpeed, long downSpeedSetMax, long maxDownload, int num_entries, java.util.Map<java.lang.String,java.lang.Object> _properties, ViewUtils.SpeedAdapter adapter)
           
static void addSpeedMenuUp(org.eclipse.swt.widgets.Shell shell, org.eclipse.swt.widgets.Menu menuSpeed, boolean isTorrentContext, boolean hasSelection, boolean upSpeedDisabled, boolean upSpeedUnlimited, long totalUpSpeed, long upSpeedSetMax, long maxUpload, int num_entries, java.util.Map<java.lang.String,java.lang.Object> _properties, ViewUtils.SpeedAdapter adapter)
           
static java.lang.String formatETA(long value, boolean absolute, java.text.SimpleDateFormat override)
           
static DownloadManager getDownloadManagerFromDataSource(java.lang.Object dataSource)
           
static java.util.List<DownloadManager> getDownloadManagersFromDataSource(java.lang.Object dataSource)
           
static int getManualSharedSpeedValue(org.eclipse.swt.widgets.Shell shell, boolean for_download, int num_entries)
           
static int getManualSpeedValue(org.eclipse.swt.widgets.Shell shell, boolean for_download)
           
static void setViewRequiresOneDownload(org.eclipse.swt.widgets.Composite genComposite)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SM_PROP_PERMIT_UPLOAD_DISABLE

public static final java.lang.String SM_PROP_PERMIT_UPLOAD_DISABLE
See Also:
Constant Field Values

SM_PROP_PERMIT_DOWNLOAD_DISABLE

public static final java.lang.String SM_PROP_PERMIT_DOWNLOAD_DISABLE
See Also:
Constant Field Values
Constructor Detail

ViewUtils

public ViewUtils()
Method Detail

formatETA

public static java.lang.String formatETA(long value,
                                         boolean absolute,
                                         java.text.SimpleDateFormat override)

addCustomDateFormat

public static ViewUtils.CustomDateFormat addCustomDateFormat(CoreTableColumn column)

addSpeedMenu

public static void addSpeedMenu(org.eclipse.swt.widgets.Shell shell,
                                org.eclipse.swt.widgets.Menu menuAdvanced,
                                boolean doUpMenu,
                                boolean doDownMenu,
                                boolean isTorrentContext,
                                boolean hasSelection,
                                boolean downSpeedDisabled,
                                boolean downSpeedUnlimited,
                                long totalDownSpeed,
                                long downSpeedSetMax,
                                long maxDownload,
                                boolean upSpeedDisabled,
                                boolean upSpeedUnlimited,
                                long totalUpSpeed,
                                long upSpeedSetMax,
                                long maxUpload,
                                int num_entries,
                                java.util.Map<java.lang.String,java.lang.Object> _properties,
                                ViewUtils.SpeedAdapter adapter)

addSpeedMenuUp

public static void addSpeedMenuUp(org.eclipse.swt.widgets.Shell shell,
                                  org.eclipse.swt.widgets.Menu menuSpeed,
                                  boolean isTorrentContext,
                                  boolean hasSelection,
                                  boolean upSpeedDisabled,
                                  boolean upSpeedUnlimited,
                                  long totalUpSpeed,
                                  long upSpeedSetMax,
                                  long maxUpload,
                                  int num_entries,
                                  java.util.Map<java.lang.String,java.lang.Object> _properties,
                                  ViewUtils.SpeedAdapter adapter)

addSpeedMenuDown

public static void addSpeedMenuDown(org.eclipse.swt.widgets.Shell shell,
                                    org.eclipse.swt.widgets.Menu menuSpeed,
                                    boolean isTorrentContext,
                                    boolean hasSelection,
                                    boolean downSpeedDisabled,
                                    boolean downSpeedUnlimited,
                                    long totalDownSpeed,
                                    long downSpeedSetMax,
                                    long maxDownload,
                                    int num_entries,
                                    java.util.Map<java.lang.String,java.lang.Object> _properties,
                                    ViewUtils.SpeedAdapter adapter)

getManualSpeedValue

public static int getManualSpeedValue(org.eclipse.swt.widgets.Shell shell,
                                      boolean for_download)

getManualSharedSpeedValue

public static int getManualSharedSpeedValue(org.eclipse.swt.widgets.Shell shell,
                                            boolean for_download,
                                            int num_entries)

setViewRequiresOneDownload

public static void setViewRequiresOneDownload(org.eclipse.swt.widgets.Composite genComposite)

getDownloadManagerFromDataSource

public static DownloadManager getDownloadManagerFromDataSource(java.lang.Object dataSource)

getDownloadManagersFromDataSource

public static java.util.List<DownloadManager> getDownloadManagersFromDataSource(java.lang.Object dataSource)