Class PieceGraphView

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

public class PieceGraphView extends Object implements UISWTViewCoreEventListener
  • Field Details

    • onePiecePerBlock

      private boolean onePiecePerBlock
    • BLOCK_FILLSIZE

      private int BLOCK_FILLSIZE
    • BLOCK_SPACING

      private static final int BLOCK_SPACING
      See Also:
    • BLOCK_SIZE

      private int BLOCK_SIZE
    • BLOCKCOLOR_HAVEALL

      private static final int BLOCKCOLOR_HAVEALL
      See Also:
    • BLOCKCOLOR_NOHAVE

      private static final int BLOCKCOLOR_NOHAVE
      See Also:
    • BLOCKCOLOR_UPLOADING

      private static final int BLOCKCOLOR_UPLOADING
      See Also:
    • BLOCKCOLOR_DOWNLOADING

      private static final int BLOCKCOLOR_DOWNLOADING
      See Also:
    • BLOCKCOLOR_NOAVAIL

      private static final int BLOCKCOLOR_NOAVAIL
      See Also:
    • BLOCKCOLOR_HAVESOME

      private static final int BLOCKCOLOR_HAVESOME
      See Also:
    • blockColors

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

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

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

      private org.eclipse.swt.graphics.Image imgHaveAll
    • imgNoHave

      private org.eclipse.swt.graphics.Image imgNoHave
    • dlm

      private DownloadManager dlm
    • compFindPEPiece

      private Comparator compFindPEPiece
    • properties

      private final SWTSkinProperties properties
    • squareCache

      private double[] squareCache
  • Constructor Details

    • PieceGraphView

      public PieceGraphView()
  • Method Details

    • initialize

      private void initialize(org.eclipse.swt.widgets.Composite parent)
    • dataSourceChanged

      private void dataSourceChanged(Object newDataSource)
    • refresh

      private void refresh()
    • calcBlockSize

      private void calcBlockSize()
    • buildImage

      private void buildImage()
    • getPercentDone

      private double getPercentDone(int startNo, int count, DiskManagerPiece[] dm_pieces)
      Parameters:
      startNo -
      count -
      dm_pieces -
      Returns:
      Since:
      3.0.1.1
    • 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
    • delete

      private void delete()
      Since:
      3.1.0.1