Class ClientStatsView
- java.lang.Object
-
- com.biglybt.ui.swt.views.table.impl.TableViewTab<ClientStatsDataSource>
-
- com.biglybt.ui.swt.views.clientstats.ClientStatsView
-
- All Implemented Interfaces:
DownloadManagerPeerListener
,GlobalManagerListener
,AEDiagnosticsEvidenceGenerator
,TableLifeCycleListener
,TableViewFilterCheck<ClientStatsDataSource>
,ObfuscateImage
,UISWTViewEventListener
,UISWTViewCoreEventListener
public class ClientStatsView extends TableViewTab<ClientStatsDataSource> implements TableLifeCycleListener, GlobalManagerListener, DownloadManagerPeerListener, TableViewFilterCheck<ClientStatsDataSource>
This view needs to be reworked so that the data collection is separate from UI
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.biglybt.ui.common.table.TableViewFilterCheck
TableViewFilterCheck.TableViewFilterCheckEx<DATASOURCETYPE>
-
-
Field Summary
Fields Modifier and Type Field Description private BloomFilter
bloomFilter
private static int
BLOOMFILTER_PEERID_SIZE
private static int
BLOOMFILTER_SIZE
private BloomFilter
bloomFilterPeerId
private java.util.GregorianCalendar
calendar
private boolean
columnsAdded
private static java.lang.String
CONFIG_FILE
private static java.lang.String
CONFIG_FILE_ARCHIVE
private Core
core
private long
lastAdd
private int
lastAddMonth
private java.util.Map<java.lang.String,ClientStatsDataSource>
mapData
private ClientStatsOverall
overall
private org.eclipse.swt.widgets.Composite
parent
private static boolean
registered
private long
startedListeningOn
private static java.lang.String
TABLEID
private long
totalTime
private TableViewSWT<ClientStatsDataSource>
tv
-
Fields inherited from interface com.biglybt.ui.common.table.TableLifeCycleListener
EVENT_TABLELIFECYCLE_DESTROYED, EVENT_TABLELIFECYCLE_INITIALIZED, EVENT_TABLELIFECYCLE_SHUTDOWN
-
-
Constructor Summary
Constructors Constructor Description ClientStatsView()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addPeer(PEPeer peer)
void
destroyed()
void
destroyInitiated()
void
downloadManagerAdded(DownloadManager dm)
void
downloadManagerRemoved(DownloadManager dm)
boolean
filterCheck(ClientStatsDataSource ds, java.lang.String filter, boolean regex)
void
filterSet(java.lang.String filter)
private java.lang.String
getID(PEPeer peer)
private void
initAndLoad()
private void
initColumns(Core core)
org.eclipse.swt.widgets.Composite
initComposite(org.eclipse.swt.widgets.Composite composite)
TableViewSWT<ClientStatsDataSource>
initYourTableView()
void
peerAdded(PEPeer peer)
void
peerManagerAdded(PEPeerManager manager)
void
peerManagerRemoved(PEPeerManager manager)
void
peerManagerWillBeAdded(PEPeerManager manager)
Called when a peer manager is created but not yet startedvoid
peerRemoved(PEPeer peer)
protected void
register(Core core)
private void
save(java.lang.String filename)
void
seedingStatusChanged(boolean seedingOnlyMode, boolean potentiallySeedingOnlyMode)
Notification of global seeding status changes.void
tableLifeCycleEventOccurred(TableView tv, int eventype, java.util.Map<java.lang.String,java.lang.Object> data)
void
tableViewTabInitComplete()
-
Methods inherited from class com.biglybt.ui.swt.views.table.impl.TableViewTab
allowCreate, dataSourceChanged, delete, enableFilterCheck, eventOccurred, generate, getComposite, getFullTitle, getPropertiesPrefix, getSWTView, getTableView, initialize, obfuscatedImage, parentDataSourceChanged, refresh, updateLanguage, viewActivated
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.biglybt.core.global.GlobalManagerListener
destroyInitiated
-
-
-
-
Field Detail
-
CONFIG_FILE
private static final java.lang.String CONFIG_FILE
- See Also:
- Constant Field Values
-
CONFIG_FILE_ARCHIVE
private static final java.lang.String CONFIG_FILE_ARCHIVE
- See Also:
- Constant Field Values
-
BLOOMFILTER_SIZE
private static final int BLOOMFILTER_SIZE
- See Also:
- Constant Field Values
-
BLOOMFILTER_PEERID_SIZE
private static final int BLOOMFILTER_PEERID_SIZE
- See Also:
- Constant Field Values
-
TABLEID
private static final java.lang.String TABLEID
- See Also:
- Constant Field Values
-
core
private Core core
-
tv
private TableViewSWT<ClientStatsDataSource> tv
-
columnsAdded
private boolean columnsAdded
-
mapData
private final java.util.Map<java.lang.String,ClientStatsDataSource> mapData
-
parent
private org.eclipse.swt.widgets.Composite parent
-
bloomFilter
private BloomFilter bloomFilter
-
bloomFilterPeerId
private BloomFilter bloomFilterPeerId
-
overall
private ClientStatsOverall overall
-
startedListeningOn
private long startedListeningOn
-
totalTime
private long totalTime
-
lastAdd
private long lastAdd
-
calendar
private java.util.GregorianCalendar calendar
-
lastAddMonth
private int lastAddMonth
-
registered
private static boolean registered
-
-
Method Detail
-
initComposite
public org.eclipse.swt.widgets.Composite initComposite(org.eclipse.swt.widgets.Composite composite)
- Overrides:
initComposite
in classTableViewTab<ClientStatsDataSource>
-
tableViewTabInitComplete
public void tableViewTabInitComplete()
- Overrides:
tableViewTabInitComplete
in classTableViewTab<ClientStatsDataSource>
-
initYourTableView
public TableViewSWT<ClientStatsDataSource> initYourTableView()
- Specified by:
initYourTableView
in classTableViewTab<ClientStatsDataSource>
-
initColumns
private void initColumns(Core core)
-
initAndLoad
private void initAndLoad()
-
filterCheck
public boolean filterCheck(ClientStatsDataSource ds, java.lang.String filter, boolean regex)
- Specified by:
filterCheck
in interfaceTableViewFilterCheck<ClientStatsDataSource>
-
filterSet
public void filterSet(java.lang.String filter)
- Specified by:
filterSet
in interfaceTableViewFilterCheck<ClientStatsDataSource>
-
save
private void save(java.lang.String filename)
-
tableLifeCycleEventOccurred
public void tableLifeCycleEventOccurred(TableView tv, int eventype, java.util.Map<java.lang.String,java.lang.Object> data)
- Specified by:
tableLifeCycleEventOccurred
in interfaceTableLifeCycleListener
-
register
protected void register(Core core)
-
destroyInitiated
public void destroyInitiated()
- Specified by:
destroyInitiated
in interfaceGlobalManagerListener
-
destroyed
public void destroyed()
- Specified by:
destroyed
in interfaceGlobalManagerListener
-
downloadManagerAdded
public void downloadManagerAdded(DownloadManager dm)
- Specified by:
downloadManagerAdded
in interfaceGlobalManagerListener
-
downloadManagerRemoved
public void downloadManagerRemoved(DownloadManager dm)
- Specified by:
downloadManagerRemoved
in interfaceGlobalManagerListener
-
seedingStatusChanged
public void seedingStatusChanged(boolean seedingOnlyMode, boolean potentiallySeedingOnlyMode)
Description copied from interface:GlobalManagerListener
Notification of global seeding status changes.- Specified by:
seedingStatusChanged
in interfaceGlobalManagerListener
- Parameters:
seedingOnlyMode
- true if only seeding torrents (no downloads), false otherwisepotentiallySeedingOnlyMode
- - as above but true if queued seeds
-
peerAdded
public void peerAdded(PEPeer peer)
- Specified by:
peerAdded
in interfaceDownloadManagerPeerListener
-
addPeer
protected void addPeer(PEPeer peer)
-
peerManagerAdded
public void peerManagerAdded(PEPeerManager manager)
- Specified by:
peerManagerAdded
in interfaceDownloadManagerPeerListener
-
peerManagerRemoved
public void peerManagerRemoved(PEPeerManager manager)
- Specified by:
peerManagerRemoved
in interfaceDownloadManagerPeerListener
-
peerManagerWillBeAdded
public void peerManagerWillBeAdded(PEPeerManager manager)
Description copied from interface:DownloadManagerPeerListener
Called when a peer manager is created but not yet started- Specified by:
peerManagerWillBeAdded
in interfaceDownloadManagerPeerListener
-
peerRemoved
public void peerRemoved(PEPeer peer)
- Specified by:
peerRemoved
in interfaceDownloadManagerPeerListener
-
getID
private java.lang.String getID(PEPeer peer)
-
-