Class MainStatusBar

java.lang.Object
com.biglybt.ui.swt.mainwindow.MainStatusBar
All Implemented Interfaces:
UIUpdatable, UIUpdatableAlways, IMainStatusBar

public class MainStatusBar extends Object implements IMainStatusBar, UIUpdatableAlways
Moved from MainWindow and GUIUpdater
  • Field Details

    • STATUS_ICON_WARN

      private static final String STATUS_ICON_WARN
      Warning status icon identifier
      See Also:
    • ID

      private static final String ID
      See Also:
    • this_mon

      private AEMonitor this_mon
    • updateWindow

      private UpdateWindow updateWindow
    • parent

      private org.eclipse.swt.widgets.Composite parent
    • statusBar

      private org.eclipse.swt.widgets.Composite statusBar
    • statusText

      private org.eclipse.swt.custom.CLabel statusText
    • statusTextKey

      private String statusTextKey
    • statusImageKey

      private String statusImageKey
    • statusImage

      private org.eclipse.swt.graphics.Image statusImage
    • progressBar

      private AZProgressBar progressBar
    • ipBlocked

      private MainStatusBar.CLabelPadding ipBlocked
    • srStatus

      private MainStatusBar.CLabelPadding srStatus
    • natStatus

      private MainStatusBar.CLabelPadding natStatus
    • dhtStatus

      private MainStatusBar.CLabelPadding dhtStatus
    • statusDown

      private MainStatusBar.CLabelPadding statusDown
    • statusUp

      private MainStatusBar.CLabelPadding statusUp
    • plugin_label_composite

      private org.eclipse.swt.widgets.Composite plugin_label_composite
    • listRunAfterInit

      private ArrayList<Runnable> listRunAfterInit
    • display

      private org.eclipse.swt.widgets.Display display
    • last_sr_ratio

      private long last_sr_ratio
    • last_sr_status

      private int last_sr_status
    • lastNATstatus

      private int lastNATstatus
    • lastNATInfo

      private String lastNATInfo
    • lastNATimageID

      private String lastNATimageID
    • lastDHTstatus

      private int lastDHTstatus
    • lastDHTcount

      private long lastDHTcount
    • numberFormat

      private NumberFormat numberFormat
    • overall_stats

      private OverallStats overall_stats
    • connection_manager

      private ConnectionManager connection_manager
    • dhtPlugin

      private DHTPlugin dhtPlugin
    • uiFunctions

      UIFunctions uiFunctions
    • clickListener

      private UIStatusTextClickListener clickListener
    • borderFlag

      private static final int borderFlag
      See Also:
    • isAZ3

      private boolean isAZ3
      Just a flag to differentiate az3 from other versions; default status bar text is handled differently between versions. Specifically speaking the Vuze UI status text is just empty whereas the Classic UI status text has an icon and the application version number.
    • PRManager

      private ProgressReportingManager PRManager
      Just a reference to the static ProgressReportingManager to make the code look cleaner instead of using ProgressReportingManager.getInstance().xxx() everywhere.
    • progressGridData

      private org.eclipse.swt.layout.GridData progressGridData
      A GridData for the progress bar; used to dynamically provide .widthHint to the layout manager
    • progressViewerImageLabel

      private MainStatusBar.CLabelPadding progressViewerImageLabel
      A clickable image label that brings up the Progress viewer
    • lastSRimageID

      private String lastSRimageID
    • last_dl_limit

      private int last_dl_limit
    • last_rec_data

      private long last_rec_data
    • last_rec_prot

      private long last_rec_prot
    • max_rec

      private long[] max_rec
    • max_sent

      private long[] max_sent
    • imgRec

      private org.eclipse.swt.graphics.Image imgRec
    • imgSent

      private org.eclipse.swt.graphics.Image imgSent
    • warningIcon

      private org.eclipse.swt.graphics.Image warningIcon
    • warningGreyIcon

      private org.eclipse.swt.graphics.Image warningGreyIcon
    • infoIcon

      private org.eclipse.swt.graphics.Image infoIcon
    • statusWarnings

      private MainStatusBar.CLabelPadding statusWarnings
    • progressListener

      private MainStatusBar.ProgressListener progressListener
    • mapConfigListeners

      private Map<String,ParameterListener> mapConfigListeners
    • alertHistoryListener

      private Alerts.AlertHistoryListener alertHistoryListener
    • alert_flasher_event

      private TimerEventPeriodic alert_flasher_event
    • alert_flasher_event_start_time

      private long alert_flasher_event_start_time
    • alert_flash_activate

      private boolean alert_flash_activate
    • was_hidden

      boolean was_hidden
  • Constructor Details

    • MainStatusBar

      public MainStatusBar()
  • Method Details

    • initStatusBar

      public org.eclipse.swt.widgets.Composite initStatusBar(org.eclipse.swt.widgets.Composite _parent)
      Returns:
      composite holding the statusbar
    • updateStatusWarnings

      protected void updateStatusWarnings(LogAlert current_alert, boolean current_added)
    • relayout

      public void relayout()
    • addFeedBack

      private void addFeedBack()
    • _addFeedBack

      private void _addFeedBack()
    • addStatusBarMenu

      private void addStatusBarMenu(org.eclipse.swt.widgets.Composite cSB)
      Parameters:
      cSB -
      Since:
      4.0.0.1
    • setStatusText

      public void setStatusText(String key)
      Specified by:
      setStatusText in interface IMainStatusBar
      Parameters:
      key -
    • setStatusImageKey

      private void setStatusImageKey(String newStatusImageKey)
    • resetStatus

      private void resetStatus()
    • setStatusText

      public void setStatusText(int statustype, String string, UIStatusTextClickListener l)
      Specified by:
      setStatusText in interface IMainStatusBar
      Parameters:
      statustype -
      string -
      l -
    • updateStatusText

      public void updateStatusText()
    • refreshStatusText

      public void refreshStatusText()
    • setUpdateNeeded

      public void setUpdateNeeded(UpdateWindow updateWindow)
      Specified by:
      setUpdateNeeded in interface IMainStatusBar
      Parameters:
      updateWindow -
    • updateUI

      public void updateUI()
      Description copied from interface: UIUpdatable
      Update your UI!
      Specified by:
      updateUI in interface UIUpdatable
    • updateUI

      public void updateUI(boolean is_visible)
      Specified by:
      updateUI in interface UIUpdatableAlways
    • updateGraph

      private void updateGraph(MainStatusBar.CLabelPadding label, org.eclipse.swt.graphics.Image img, long newVal, long[] max)
    • updateDHTStatus

      private void updateDHTStatus()
      Since:
      3.1.1.1
    • updateNatStatus

      private void updateNatStatus()
      Since:
      3.1.1.1
    • updateShareRatioStatus

      private void updateShareRatioStatus()
      Since:
      3.1.1.1
    • updateIPBlocked

      private void updateIPBlocked()
      Since:
      3.1.1.1
    • setDebugInfo

      public void setDebugInfo(String string)
      Specified by:
      setDebugInfo in interface IMainStatusBar
      Parameters:
      string -
    • isMouseOver

      public boolean isMouseOver()
      Specified by:
      isMouseOver in interface IMainStatusBar
    • createStatusEntry

      public void createStatusEntry(IMainStatusBar.CLabelUpdater updater)
      Specified by:
      createStatusEntry in interface IMainStatusBar
    • layoutPluginComposite

      private void layoutPluginComposite()
    • showProgressBar

      private void showProgressBar(boolean state)
      Show or hide the Progress Bar
      Parameters:
      state -
    • getBounds

      public org.eclipse.swt.graphics.Rectangle getBounds()
    • getUpdateUIName

      public String getUpdateUIName()
      Description copied from interface: UIUpdatable
      A name for this UIUpdatable so we can track who's being bad
      Specified by:
      getUpdateUIName in interface UIUpdatable
      Returns:
      some name