Class PeerPieceMapView

java.lang.Object
com.biglybt.ui.swt.views.peer.PeerPieceMapView
All Implemented Interfaces:
UISWTViewEventListener, UISWTViewCoreEventListener

public class PeerPieceMapView extends Object implements UISWTViewCoreEventListener
Piece Map subview for Peers View. Testing bed for SubView stuff.
  • Field Details

    • VIEW_ID

      public static final String VIEW_ID
      See Also:
    • BLOCK_FILLSIZE

      private static final int BLOCK_FILLSIZE
      See Also:
    • BLOCK_SPACING

      private static final int BLOCK_SPACING
      See Also:
    • BLOCK_SIZE

      private static final int BLOCK_SIZE
      See Also:
    • BLOCKCOLOR_AVAIL_HAVE

      private static final int BLOCKCOLOR_AVAIL_HAVE
      See Also:
    • BLOCKCOLOR_AVAIL_NOHAVE

      private static final int BLOCKCOLOR_AVAIL_NOHAVE
      See Also:
    • BLOCKCOLOR_NOAVAIL_HAVE

      private static final int BLOCKCOLOR_NOAVAIL_HAVE
      See Also:
    • BLOCKCOLOR_NOAVAIL_NOHAVE

      private static final int BLOCKCOLOR_NOAVAIL_NOHAVE
      See Also:
    • BLOCKCOLOR_TRANSFER

      private static final int BLOCKCOLOR_TRANSFER
      See Also:
    • BLOCKCOLOR_NEXT

      private static final int BLOCKCOLOR_NEXT
      See Also:
    • SHOW_BIG

      private static final byte SHOW_BIG
      See Also:
    • SHOW_SMALL

      private static final byte SHOW_SMALL
      See Also:
    • DEBUG

      private static final boolean DEBUG
      See Also:
    • peerInfoComposite

      private org.eclipse.swt.widgets.Composite peerInfoComposite
    • sc

      private org.eclipse.swt.custom.ScrolledComposite sc
    • peerInfoCanvas

      protected org.eclipse.swt.widgets.Canvas peerInfoCanvas
    • blockColors

      private org.eclipse.swt.graphics.Color[] blockColors
    • topLabel

      private org.eclipse.swt.widgets.Label topLabel
    • imageLabel

      private org.eclipse.swt.widgets.Label imageLabel
    • graphicsUpdate

      private int graphicsUpdate
    • loopFactor

      private int loopFactor
    • peer

      private PEPeer peer
    • countryLocator

      private Plugin countryLocator
    • sCountryImagesDir

      private String sCountryImagesDir
    • font

      private org.eclipse.swt.graphics.Font font
    • img

      org.eclipse.swt.graphics.Image img
    • alreadyFilling

      protected boolean alreadyFilling
    • swtView

      private UISWTView swtView
    • currentNumColumns

      private int currentNumColumns
    • currentNumPieces

      private int currentNumPieces
    • oldBlockInfo

    • distinctPieceCache

      private final List<Integer> distinctPieceCache
  • Constructor Details

    • PeerPieceMapView

      public PeerPieceMapView()
      Initialize
  • Method Details

    • initCountryPlugin

      private void initCountryPlugin()
    • dataSourceChanged

      private void dataSourceChanged(Object newDataSource)
    • getFullTitle

      private String getFullTitle()
    • initialize

      private void initialize(org.eclipse.swt.widgets.Composite composite)
    • createPeerInfoPanel

      private org.eclipse.swt.widgets.Composite createPeerInfoPanel(org.eclipse.swt.widgets.Composite parent)
    • swt_fillPeerInfoSection

      private void swt_fillPeerInfoSection()
    • refresh

      private void refresh()
    • refreshInfoCanvas

      private void refreshInfoCanvas()
      Constructs and image representing the download state of _all_ the pieces in the torrent. Particularly slow when there's lots of pieces, and also wasteful since only a fraction of them ever get painted at any given time. TODO: Construct image for visible area only or something
    • getComposite

      private org.eclipse.swt.widgets.Composite getComposite()
    • delete

      private void delete()
    • obfuscatedImage

      private org.eclipse.swt.graphics.Image obfuscatedImage(org.eclipse.swt.graphics.Image image)
    • 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
    • log

      private static void log(String s)