Package com.biglybt.ui.swt.views.peer
Class PeerInfoView
- java.lang.Object
-
- com.biglybt.ui.swt.views.peer.PeerInfoView
-
- All Implemented Interfaces:
UISWTViewEventListener
,UISWTViewCoreEventListener
public class PeerInfoView extends java.lang.Object implements UISWTViewCoreEventListener
Piece Map subview for Peers View. Testing bed for SubView stuff.
-
-
Field Summary
Fields Modifier and Type Field Description private static int
BLOCK_FILLSIZE
private static int
BLOCK_SIZE
private static int
BLOCK_SPACING
private static int
BLOCKCOLOR_AVAIL_HAVE
private static int
BLOCKCOLOR_AVAIL_NOHAVE
private static int
BLOCKCOLOR_AVAILCOUNT
private static int
BLOCKCOLOR_NEXT
private static int
BLOCKCOLOR_NOAVAIL_HAVE
private static int
BLOCKCOLOR_NOAVAIL_NOHAVE
private static int
BLOCKCOLOR_TRANSFER
private org.eclipse.swt.graphics.Color[]
blockColors
private Plugin
countryLocator
private org.eclipse.swt.graphics.Font
font
private int
graphicsUpdate
private org.eclipse.swt.widgets.Label
imageLabel
(package private) org.eclipse.swt.graphics.Image
img
private int
loopFactor
private static int
MAX_PIECES_TO_SHOW
private PEPeer
peer
protected org.eclipse.swt.widgets.Canvas
peerInfoCanvas
private org.eclipse.swt.widgets.Composite
peerInfoComposite
protected boolean
refreshInfoCanvasQueued
private org.eclipse.swt.custom.ScrolledComposite
sc
private java.lang.String
sCountryImagesDir
private UISWTView
swtView
private org.eclipse.swt.widgets.Label
topLabel
-
Constructor Summary
Constructors Constructor Description PeerInfoView()
Initialize
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private org.eclipse.swt.widgets.Composite
createPeerInfoPanel(org.eclipse.swt.widgets.Composite parent)
private void
dataSourceChanged(java.lang.Object newDataSource)
private void
delete()
boolean
eventOccurred(UISWTViewEvent event)
Triggers when an even listed in UISWTViewEvent occursprivate org.eclipse.swt.widgets.Composite
getComposite()
private java.lang.String
getFullTitle()
private void
initCountryPlugin()
private void
initialize(org.eclipse.swt.widgets.Composite composite)
private org.eclipse.swt.graphics.Image
obfuscatedImage(org.eclipse.swt.graphics.Image image)
private void
refresh()
private void
refreshInfoCanvas()
Constructs and image representing the download state of _all_ the pieces in the torrent.private void
swt_fillPeerInfoSection()
-
-
-
Field Detail
-
BLOCK_FILLSIZE
private static final int BLOCK_FILLSIZE
- See Also:
- Constant Field Values
-
BLOCK_SPACING
private static final int BLOCK_SPACING
- See Also:
- Constant Field Values
-
BLOCK_SIZE
private static final int BLOCK_SIZE
- See Also:
- Constant Field Values
-
BLOCKCOLOR_AVAIL_HAVE
private static final int BLOCKCOLOR_AVAIL_HAVE
- See Also:
- Constant Field Values
-
BLOCKCOLOR_AVAIL_NOHAVE
private static final int BLOCKCOLOR_AVAIL_NOHAVE
- See Also:
- Constant Field Values
-
BLOCKCOLOR_NOAVAIL_HAVE
private static final int BLOCKCOLOR_NOAVAIL_HAVE
- See Also:
- Constant Field Values
-
BLOCKCOLOR_NOAVAIL_NOHAVE
private static final int BLOCKCOLOR_NOAVAIL_NOHAVE
- See Also:
- Constant Field Values
-
BLOCKCOLOR_TRANSFER
private static final int BLOCKCOLOR_TRANSFER
- See Also:
- Constant Field Values
-
BLOCKCOLOR_NEXT
private static final int BLOCKCOLOR_NEXT
- See Also:
- Constant Field Values
-
BLOCKCOLOR_AVAILCOUNT
private static final int BLOCKCOLOR_AVAILCOUNT
- See Also:
- Constant Field Values
-
MAX_PIECES_TO_SHOW
private static final int MAX_PIECES_TO_SHOW
- See Also:
- Constant Field Values
-
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 java.lang.String sCountryImagesDir
-
font
private org.eclipse.swt.graphics.Font font
-
img
org.eclipse.swt.graphics.Image img
-
refreshInfoCanvasQueued
protected boolean refreshInfoCanvasQueued
-
swtView
private UISWTView swtView
-
-
Method Detail
-
initCountryPlugin
private void initCountryPlugin()
-
dataSourceChanged
private void dataSourceChanged(java.lang.Object newDataSource)
-
getFullTitle
private java.lang.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. Particularily 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 interfaceUISWTViewEventListener
- Parameters:
event
- event that occurred- Returns:
- meaning dependent upon event type
-
-