Package com.biglybt.ui.swt.views
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
private class
private static class
(package private) static class
protected static interface
(package private) static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private static final double[]
private boolean
private TimerEventPeriodic
(package private) static final int
(package private) static final int
(package private) static final int
private static final int
private static final int
private static final int
private static final int
private static final org.eclipse.swt.graphics.Color[]
(package private) static final int
(package private) static final int
private org.eclipse.swt.widgets.Canvas
private boolean
private static final double[]
private static final double[]
private static final double[]
private static final double[]
private org.eclipse.swt.widgets.Display
private PeersGraphicView.ManagerData[]
private final Object
private Object
private Object
private static final boolean
private boolean
private org.eclipse.swt.graphics.Image
private static final String[]
(package private) static final int
static String
private org.eclipse.swt.graphics.Image
private org.eclipse.swt.graphics.Point
private static final int
private static int
private static final int
private static final int
private static final int
private final Object
private final PeersGraphicView.PeerFilter
private static final int
private PeersGraphicView.PeerComparator
private double
private double[]
private UISWTView
Fields inherited from interface com.biglybt.pif.ui.toolbar.UIToolBarActivationListener
ACTIVATIONTYPE_HELD, ACTIVATIONTYPE_NORMAL, ACTIVATIONTYPE_RIGHTCLICK
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
dataSourceChanged
(Object newDataSource) protected void
delete()
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) boolean
eventOccurred
(UISWTViewEvent event) Triggers when an even listed in UISWTViewEvent occursprotected org.eclipse.swt.widgets.Composite
private String
getData()
protected void
initialize
(org.eclipse.swt.widgets.Composite parent, boolean showLegend) protected void
refresh()
protected void
refreshArrows
(org.eclipse.swt.graphics.GC gc) void
refreshToolBarItems
(Map<String, Long> list) Fill in list with the toolbar ids and states you wish to setprivate 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) 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) void
setAlwaysShowDownloadName
(boolean b) protected void
setFocused
(boolean foc) boolean
toolBarItemActivated
(ToolBarItem item, long activationType, Object datasource) XXX Should have been UIToolBarItemMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.biglybt.pif.ui.UIPluginViewToolBarListener
isActive
Methods inherited from interface com.biglybt.ui.swt.pif.UISWTViewEventListener
builderNotRequired, informOfDuplicates
-
Field Details
-
MSGID_PREFIX
-
FORCE_FULL_REPAINT
private static final boolean FORCE_FULL_REPAINT- See Also:
-
DM_DATA_CACHE_KEY
-
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
-
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
-
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
-
arrow_redraw_pending
private boolean arrow_redraw_pending -
full_redraw_pending
private boolean full_redraw_pending -
dm_data_lock
-
dm_data
-
always_show_dm_name
private boolean always_show_dm_name -
peer_filter
-
comp_focused
private boolean comp_focused -
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
-
-
Constructor Details
-
PeersGraphicView
public PeersGraphicView() -
PeersGraphicView
-
-
Method Details
-
setAlwaysShowDownloadName
public void setAlwaysShowDownloadName(boolean b) -
setFocused
protected void setFocused(boolean foc) -
dataSourceChanged
-
delete
protected void delete() -
getComposite
protected org.eclipse.swt.widgets.Composite getComposite() -
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
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
-
toolBarItemActivated
Description copied from interface:UIToolBarActivationListener
XXX Should have been UIToolBarItem- Specified by:
toolBarItemActivated
in interfaceUIToolBarActivationListener
-
refreshToolBarItems
Description copied from interface:UIPluginViewToolBarListener
Fill in list with the toolbar ids and states you wish to set- Specified by:
refreshToolBarItems
in interfaceUIPluginViewToolBarListener
- Parameters:
list
-
-