Package com.biglybt.ui.swt.views
Class PieceGraphView
- java.lang.Object
-
- com.biglybt.ui.swt.views.PieceGraphView
-
- All Implemented Interfaces:
UISWTViewEventListener
,UISWTViewCoreEventListener
public class PieceGraphView extends java.lang.Object implements UISWTViewCoreEventListener
-
-
Field Summary
Fields Modifier and Type Field Description private int
BLOCK_FILLSIZE
private int
BLOCK_SIZE
private static int
BLOCK_SPACING
private static int
BLOCKCOLOR_DOWNLOADING
private static int
BLOCKCOLOR_HAVEALL
private static int
BLOCKCOLOR_HAVESOME
private static int
BLOCKCOLOR_NOAVAIL
private static int
BLOCKCOLOR_NOHAVE
private static int
BLOCKCOLOR_UPLOADING
private org.eclipse.swt.graphics.Color[]
blockColors
private org.eclipse.swt.widgets.Canvas
canvas
private java.util.Comparator
compFindPEPiece
private DownloadManager
dlm
private org.eclipse.swt.graphics.Image
img
private org.eclipse.swt.graphics.Image
imgHaveAll
private org.eclipse.swt.graphics.Image
imgNoHave
private boolean
onePiecePerBlock
private SWTSkinProperties
properties
private double[]
squareCache
-
Constructor Summary
Constructors Constructor Description PieceGraphView()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
buildImage()
private void
calcBlockSize()
private void
dataSourceChanged(java.lang.Object newDataSource)
private void
delete()
boolean
eventOccurred(UISWTViewEvent event)
Triggers when an even listed in UISWTViewEvent occursprivate double
getPercentDone(int startNo, int count, DiskManagerPiece[] dm_pieces)
private void
initialize(org.eclipse.swt.widgets.Composite parent)
private void
refresh()
-
-
-
Field Detail
-
onePiecePerBlock
private boolean onePiecePerBlock
-
BLOCK_FILLSIZE
private int BLOCK_FILLSIZE
-
BLOCK_SPACING
private static final int BLOCK_SPACING
- See Also:
- Constant Field Values
-
BLOCK_SIZE
private int BLOCK_SIZE
-
BLOCKCOLOR_HAVEALL
private static final int BLOCKCOLOR_HAVEALL
- See Also:
- Constant Field Values
-
BLOCKCOLOR_NOHAVE
private static final int BLOCKCOLOR_NOHAVE
- See Also:
- Constant Field Values
-
BLOCKCOLOR_UPLOADING
private static final int BLOCKCOLOR_UPLOADING
- See Also:
- Constant Field Values
-
BLOCKCOLOR_DOWNLOADING
private static final int BLOCKCOLOR_DOWNLOADING
- See Also:
- Constant Field Values
-
BLOCKCOLOR_NOAVAIL
private static final int BLOCKCOLOR_NOAVAIL
- See Also:
- Constant Field Values
-
BLOCKCOLOR_HAVESOME
private static final int BLOCKCOLOR_HAVESOME
- See Also:
- Constant Field Values
-
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 java.util.Comparator compFindPEPiece
-
properties
private final SWTSkinProperties properties
-
squareCache
private double[] squareCache
-
-
Method Detail
-
initialize
private void initialize(org.eclipse.swt.widgets.Composite parent)
-
dataSourceChanged
private void dataSourceChanged(java.lang.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 interfaceUISWTViewEventListener
- Parameters:
event
- event that occurred- Returns:
- meaning dependent upon event type
-
delete
private void delete()
- Since:
- 3.1.0.1
-
-