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 java.lang.Object implements UIPluginViewToolBarListener, UISWTViewCoreEventListener
This is the "Swarm" View
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
PeersGraphicView.ManagerData
private static class
PeersGraphicView.PeerComparator
protected static interface
PeersGraphicView.PeerFilter
-
Field Summary
Fields Modifier and Type Field Description private boolean
always_show_dm_name
private double[]
angles
private org.eclipse.swt.widgets.Canvas
canvas
private boolean
comp_focused
private double[]
deltaXXs
private double[]
deltaXYs
private double[]
deltaYXs
private double[]
deltaYYs
private org.eclipse.swt.widgets.Display
display
private PeersGraphicView.ManagerData[]
dm_data
private java.lang.Object
dm_data_lock
private java.lang.Object
focus_pending_ds
private org.eclipse.swt.graphics.Image
img
static java.lang.String
MSGID_PREFIX
private org.eclipse.swt.graphics.Image
my_flag
private static int
NB_ANGLES
private static int
OWN_SIZE
private static int
OWN_SIZE_DEFAULT
private static int
OWN_SIZE_MAX
private static int
OWN_SIZE_MIN
private PeersGraphicView.PeerFilter
peer_filter
private static int
PEER_SIZE
private PeersGraphicView.PeerComparator
peerComparator
private double
perimeter
private double[]
rs
private UISWTView
swtView
-
Fields inherited from interface com.biglybt.pif.ui.toolbar.UIToolBarActivationListener
ACTIVATIONTYPE_HELD, ACTIVATIONTYPE_NORMAL, ACTIVATIONTYPE_RIGHTCLICK
-
-
Constructor Summary
Constructors Constructor Description PeersGraphicView()
PeersGraphicView(PeersGraphicView.PeerFilter _pf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
dataSourceChanged(java.lang.Object newDataSource)
protected void
delete()
boolean
eventOccurred(UISWTViewEvent event)
Triggers when an even listed in UISWTViewEvent occursprotected org.eclipse.swt.widgets.Composite
getComposite()
private java.lang.String
getData()
protected void
initialize(org.eclipse.swt.widgets.Composite composite)
protected void
refresh()
void
refreshToolBarItems(java.util.Map<java.lang.String,java.lang.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)
void
setAlwaysShowDownloadName(boolean b)
protected void
setFocused(boolean foc)
boolean
toolBarItemActivated(ToolBarItem item, long activationType, java.lang.Object datasource)
XXX Should have been UIToolBarItem-
Methods 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
-
-
-
-
Field Detail
-
MSGID_PREFIX
public static java.lang.String MSGID_PREFIX
-
PEER_SIZE
private static final int PEER_SIZE
- See Also:
- Constant Field Values
-
OWN_SIZE_DEFAULT
private static final int OWN_SIZE_DEFAULT
- See Also:
- Constant Field Values
-
OWN_SIZE_MIN
private static final int OWN_SIZE_MIN
- See Also:
- Constant Field Values
-
OWN_SIZE_MAX
private static final int OWN_SIZE_MAX
- See Also:
- Constant Field Values
-
OWN_SIZE
private static int OWN_SIZE
-
NB_ANGLES
private static final int NB_ANGLES
- See Also:
- Constant Field Values
-
perimeter
private double perimeter
-
rs
private double[] rs
-
angles
private final double[] angles
-
deltaXXs
private final double[] deltaXXs
-
deltaXYs
private final double[] deltaXYs
-
deltaYXs
private final double[] deltaYXs
-
deltaYYs
private final double[] deltaYYs
-
peerComparator
private PeersGraphicView.PeerComparator 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
-
dm_data_lock
private java.lang.Object dm_data_lock
-
dm_data
private PeersGraphicView.ManagerData[] dm_data
-
always_show_dm_name
private boolean always_show_dm_name
-
peer_filter
private final PeersGraphicView.PeerFilter peer_filter
-
comp_focused
private boolean comp_focused
-
focus_pending_ds
private java.lang.Object focus_pending_ds
-
swtView
private UISWTView swtView
-
-
Constructor Detail
-
PeersGraphicView
public PeersGraphicView()
-
PeersGraphicView
public PeersGraphicView(PeersGraphicView.PeerFilter _pf)
-
-
Method Detail
-
setAlwaysShowDownloadName
public void setAlwaysShowDownloadName(boolean b)
-
setFocused
protected void setFocused(boolean foc)
-
dataSourceChanged
protected void dataSourceChanged(java.lang.Object newDataSource)
-
delete
protected void delete()
-
getComposite
protected org.eclipse.swt.widgets.Composite getComposite()
-
getData
private java.lang.String getData()
-
initialize
protected void initialize(org.eclipse.swt.widgets.Composite composite)
-
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)
-
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
-
toolBarItemActivated
public boolean toolBarItemActivated(ToolBarItem item, long activationType, java.lang.Object datasource)
Description copied from interface:UIToolBarActivationListener
XXX Should have been UIToolBarItem- Specified by:
toolBarItemActivated
in interfaceUIToolBarActivationListener
-
refreshToolBarItems
public void refreshToolBarItems(java.util.Map<java.lang.String,java.lang.Long> list)
Description copied from interface:UIPluginViewToolBarListener
Fill in list with the toolbar ids and states you wish to set- Specified by:
refreshToolBarItems
in interfaceUIPluginViewToolBarListener
-
-