Class PeersGraphicView

java.lang.Object
com.biglybt.ui.swt.views.PeersGraphicView
All Implemented Interfaces:
UIToolBarActivationListener, UIToolBarEnablerBase, UIPluginViewToolBarListener, UISWTViewEventListener, UISWTViewCoreEventListener

public class PeersGraphicView extends Object implements UIPluginViewToolBarListener, UISWTViewCoreEventListener
This is the "Swarm" View
  • Field Details

    • MSGID_PREFIX

      public static String MSGID_PREFIX
    • FORCE_FULL_REPAINT

      private static final boolean FORCE_FULL_REPAINT
      See Also:
    • DM_DATA_CACHE_KEY

      private final Object DM_DATA_CACHE_KEY
    • PEER_DATA_KEY

      private final Object PEER_DATA_KEY
    • BLOCKCOLOR_DOWN_SMALL

      private static final int BLOCKCOLOR_DOWN_SMALL
      See Also:
    • BLOCKCOLOR_DOWN_BIG

      private static final int BLOCKCOLOR_DOWN_BIG
      See Also:
    • BLOCKCOLOR_UP_SMALL

      private static final int BLOCKCOLOR_UP_SMALL
      See Also:
    • BLOCKCOLOR_UP_BIG

      private static final int BLOCKCOLOR_UP_BIG
      See Also:
    • blockColors

      private static final org.eclipse.swt.graphics.Color[] blockColors
    • legendKeys

      private static final String[] legendKeys
    • PEER_SIZE

      private static final int PEER_SIZE
      See Also:
    • OWN_SIZE_DEFAULT

      private static final int OWN_SIZE_DEFAULT
      See Also:
    • OWN_SIZE_MIN

      private static final int OWN_SIZE_MIN
      See Also:
    • OWN_SIZE_MAX

      private static final int OWN_SIZE_MAX
      See Also:
    • OWN_SIZE

      private static int OWN_SIZE
    • NB_ANGLES

      private static final int NB_ANGLES
      See Also:
    • angles

      private static final double[] angles
    • deltaXXs

      private static final double[] deltaXXs
    • deltaXYs

      private static final double[] deltaXYs
    • deltaYXs

      private static final double[] deltaYXs
    • deltaYYs

      private static final double[] deltaYYs
    • perimeter

      private double perimeter
    • rs

      private double[] rs
    • peerComparator

      private PeersGraphicView.PeerComparator peerComparator
    • my_flag

      private org.eclipse.swt.graphics.Image my_flag
    • display

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

      private org.eclipse.swt.widgets.Canvas canvas
    • img

      private org.eclipse.swt.graphics.Image img
    • mySizeCache

      private org.eclipse.swt.graphics.Point mySizeCache
    • arrow_refresher

      private TimerEventPeriodic arrow_refresher
    • arrow_redraw_pending

      private boolean arrow_redraw_pending
    • full_redraw_pending

      private boolean full_redraw_pending
    • dm_data_lock

      private Object dm_data_lock
    • dm_data

      private PeersGraphicView.ManagerData[] dm_data
    • always_show_dm_name

      private boolean always_show_dm_name
    • peer_filter

      private final PeersGraphicView.PeerFilter peer_filter
    • comp_focused

      private boolean comp_focused
    • focus_pending_ds

      private Object focus_pending_ds
    • BUCKET_LENGTH

      static final int BUCKET_LENGTH
      See Also:
    • BUCKET_CAPACITY

      static final int BUCKET_CAPACITY
      See Also:
    • BIG_BUCKET_CAPACITY_MULT

      static final int BIG_BUCKET_CAPACITY_MULT
      See Also:
    • BIG_BUCKET_CAPACITY

      static final int BIG_BUCKET_CAPACITY
      See Also:
    • MAX_BUCKETS

      static final int MAX_BUCKETS
      See Also:
    • BLOB_R

      static final int BLOB_R
      See Also:
    • swtView

      private UISWTView swtView
  • Constructor Details

  • Method Details

    • setAlwaysShowDownloadName

      public void setAlwaysShowDownloadName(boolean b)
    • setFocused

      protected void setFocused(boolean foc)
    • dataSourceChanged

      protected void dataSourceChanged(Object newDataSource)
    • delete

      protected void delete()
    • getComposite

      protected org.eclipse.swt.widgets.Composite getComposite()
    • getData

      private String getData()
    • initialize

      protected void initialize(org.eclipse.swt.widgets.Composite parent, boolean showLegend)
    • refresh

      protected void refresh()
    • render

      private void render(DownloadManager manager, PeersGraphicView.ManagerData data, org.eclipse.swt.graphics.GC gc, PEPeer[] sortedPeers, org.eclipse.swt.graphics.Point panelSize, org.eclipse.swt.graphics.Point panelOffset)
    • drawArrows

      private void drawArrows(PEPeer peer, org.eclipse.swt.graphics.GC gc, boolean drawLine, int x0, int y0, int x1, int y1, double r, int iAngle, boolean lineOnly)
    • refreshArrows

      protected void refreshArrows(org.eclipse.swt.graphics.GC gc)
    • renderArrows

      private void renderArrows(DownloadManager manager, PeersGraphicView.ManagerData data, org.eclipse.swt.graphics.GC gc, PEPeer[] sortedPeers, org.eclipse.swt.graphics.Point panelSize, org.eclipse.swt.graphics.Point panelOffset)
    • eventOccurred

      public boolean eventOccurred(UISWTViewEvent event)
      Description copied from interface: UISWTViewEventListener
      Triggers when an even listed in UISWTViewEvent occurs
      Specified by:
      eventOccurred in interface UISWTViewEventListener
      Parameters:
      event - event that occurred
      Returns:
      meaning dependent upon event type
    • toolBarItemActivated

      public boolean toolBarItemActivated(ToolBarItem item, long activationType, Object datasource)
      Description copied from interface: UIToolBarActivationListener
      XXX Should have been UIToolBarItem
      Specified by:
      toolBarItemActivated in interface UIToolBarActivationListener
    • refreshToolBarItems

      public void refreshToolBarItems(Map<String,Long> list)
      Description copied from interface: UIPluginViewToolBarListener
      Fill in list with the toolbar ids and states you wish to set
      Specified by:
      refreshToolBarItems in interface UIPluginViewToolBarListener
      Parameters:
      list -