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 classprivate classprivate static class(package private) static classprotected static interface(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate static final double[]private booleanprivate TimerEventPeriodic(package private) static final int(package private) static final int(package private) static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final org.eclipse.swt.graphics.Color[](package private) static final int(package private) static final intprivate org.eclipse.swt.widgets.Canvasprivate booleanprivate static final double[]private static final double[]private static final double[]private static final double[]private org.eclipse.swt.widgets.Displayprivate PeersGraphicView.ManagerData[]private final Objectprivate Objectprivate Objectprivate static final booleanprivate booleanprivate org.eclipse.swt.graphics.Imageprivate static final String[](package private) static final intstatic Stringprivate org.eclipse.swt.graphics.Imageprivate org.eclipse.swt.graphics.Pointprivate static final intprivate static intprivate static final intprivate static final intprivate static final intprivate final Objectprivate final PeersGraphicView.PeerFilterprivate static final intprivate PeersGraphicView.PeerComparatorprivate doubleprivate double[]private UISWTViewFields inherited from interface UIToolBarActivationListener
ACTIVATIONTYPE_HELD, ACTIVATIONTYPE_NORMAL, ACTIVATIONTYPE_RIGHTCLICK -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddataSourceChanged(Object newDataSource) protected voiddelete()private voiddrawArrows(PEPeer peer, org.eclipse.swt.graphics.GC gc, boolean drawLine, int x0, int y0, int x1, int y1, double r, int iAngle, boolean lineOnly) booleaneventOccurred(UISWTViewEvent event) Triggers when an even listed in UISWTViewEvent occursprotected org.eclipse.swt.widgets.Compositeprivate StringgetData()protected voidinitialize(org.eclipse.swt.widgets.Composite parent, boolean showLegend) protected voidrefresh()protected voidrefreshArrows(org.eclipse.swt.graphics.GC gc) voidrefreshToolBarItems(Map<String, Long> list) Fill in list with the toolbar ids and states you wish to setprivate voidrender(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 voidrenderArrows(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) voidsetAlwaysShowDownloadName(boolean b) protected voidsetFocused(boolean foc) booleantoolBarItemActivated(ToolBarItem item, long activationType, Object datasource) XXX Should have been UIToolBarItemMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface UIPluginViewToolBarListener
isActiveMethods inherited from interface 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:UISWTViewEventListenerTriggers when an even listed in UISWTViewEvent occurs- Specified by:
eventOccurredin interfaceUISWTViewEventListener- Parameters:
event- event that occurred- Returns:
- meaning dependent upon event type
-
toolBarItemActivated
Description copied from interface:UIToolBarActivationListenerXXX Should have been UIToolBarItem- Specified by:
toolBarItemActivatedin interfaceUIToolBarActivationListener
-
refreshToolBarItems
Description copied from interface:UIPluginViewToolBarListenerFill in list with the toolbar ids and states you wish to set- Specified by:
refreshToolBarItemsin interfaceUIPluginViewToolBarListener- Parameters:
list-
-