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

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

public class ViewUtils
extends Object

Author:
parg

Nested Class Summary
static class ViewUtils.CustomDateFormat
           
static interface ViewUtils.SpeedAdapter
           
static interface ViewUtils.ViewTitleExtraInfo
           
 
Field Summary
static String SM_PROP_PERMIT_DOWNLOAD_DISABLE
           
static 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, Map<String,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, Map<String,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, Map<String,Object> _properties, ViewUtils.SpeedAdapter adapter)
           
static String formatETA(long value, boolean absolute, SimpleDateFormat override)
           
static DownloadManager getDownloadManagerFromDataSource(Object dataSource)
           
static List<DownloadManager> getDownloadManagersFromDataSource(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 String SM_PROP_PERMIT_UPLOAD_DISABLE
See Also:
Constant Field Values

SM_PROP_PERMIT_DOWNLOAD_DISABLE

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

ViewUtils

public ViewUtils()
Method Detail

formatETA

public static String formatETA(long value,
                               boolean absolute,
                               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,
                                Map<String,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,
                                  Map<String,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,
                                    Map<String,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(Object dataSource)

getDownloadManagersFromDataSource

public static List<DownloadManager> getDownloadManagersFromDataSource(Object dataSource)