Package com.biglybt.ui.swt.views
Class GeneralView
- java.lang.Object
-
- com.biglybt.ui.swt.views.GeneralView
-
- All Implemented Interfaces:
ParameterListener
,UIToolBarActivationListener
,UIToolBarEnablerBase
,UIPluginViewToolBarListener
,UISWTViewEventListener
,UISWTViewCoreEventListener
public class GeneralView extends java.lang.Object implements ParameterListener, UISWTViewCoreEventListener, UIPluginViewToolBarListener
View of General information on the torrentSee also
SBC_TorrentDetailsView
-
-
Field Summary
Fields Modifier and Type Field Description (package private) org.eclipse.swt.graphics.Image
aImage
(package private) org.eclipse.swt.widgets.Canvas
availabilityImage
(package private) BufferedLabel
availabilityPercent
(package private) BufferedLabel
ave_completion
private static org.eclipse.swt.graphics.Color
badAvailColor
(package private) BufferedLabel
completedLbl
(package private) BufferedLabel
creation_date
(package private) org.eclipse.swt.widgets.MenuItem[]
date_menus
private org.eclipse.swt.widgets.Display
display
(package private) BufferedLabel
distributedCopies
(package private) BufferedLabel
download
(package private) BufferedLabel
downloadSpeed
(package private) BufferedLabel
fileName
(package private) BufferedLabel
fileSize
(package private) org.eclipse.swt.widgets.Composite
genComposite
(package private) org.eclipse.swt.widgets.Composite
gFile
(package private) org.eclipse.swt.widgets.Group
gInfo
private int
graphicsUpdate
(package private) org.eclipse.swt.widgets.Group
gTransfer
(package private) BufferedLabel
hash
(package private) BufferedLabel
hashFails
(package private) org.eclipse.swt.widgets.Control
lblComment
(package private) int
loopFactor
private DownloadManager
manager
static java.lang.String
MSGID_PREFIX
private org.eclipse.swt.widgets.Composite
parent
(package private) BufferedLabel
peers
(package private) BufferedLabel
pieceNumber
(package private) org.eclipse.swt.widgets.Canvas
piecesImage
private boolean
piecesImageRefreshNeeded
(package private) BufferedLabel
pieceSize
(package private) BufferedLabel
piecesPercent
(package private) int[]
piecesStateCache
(package private) boolean
piecesStateFileBoundariesDone
(package private) long
piecesStateSkippedMarker
(package private) org.eclipse.swt.graphics.Image
pImage
(package private) BufferedLabel
privateStatus
(package private) BufferedLabel
saveIn
private org.eclipse.swt.custom.ScrolledComposite
scrolled_comp
(package private) BufferedLabel
seeds
(package private) BufferedLabel
shareRatio
private static boolean
showTransferring
private UISWTView
swtView
protected AEMonitor
this_mon
(package private) org.eclipse.swt.widgets.Canvas
thumbImage
(package private) org.eclipse.swt.graphics.Image
tImage
(package private) org.eclipse.swt.graphics.Image
tImageResized
(package private) java.lang.String
tImageResizedKey
(package private) BufferedLabel
timeElapsed
(package private) BufferedLabel
timeRemaining
(package private) BufferedLabel
torrentStatus
(package private) BufferedLabel
totalSpeed
private static org.eclipse.swt.graphics.Color
transferringColor
(package private) BufferedLabel
upload
(package private) BufferedLabel
uploadSpeed
(package private) org.eclipse.swt.widgets.Control
user_comment
private boolean
viewBuilt
-
Fields inherited from interface com.biglybt.pif.ui.toolbar.UIToolBarActivationListener
ACTIVATIONTYPE_HELD, ACTIVATIONTYPE_NORMAL, ACTIVATIONTYPE_RIGHTCLICK
-
-
Constructor Summary
Constructors Constructor Description GeneralView()
Initialize GeneralView
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
buildView()
private void
clearThumb()
void
dataSourceChanged(java.lang.Object newDataSource)
void
delete()
boolean
eventOccurred(UISWTViewEvent event)
Triggers when an even listed in UISWTViewEvent occursorg.eclipse.swt.widgets.Composite
getComposite()
private java.lang.String
getFullTitle()
void
initialize(org.eclipse.swt.widgets.Composite composite)
private void
loadThumb()
private org.eclipse.swt.graphics.Image
obfuscatedImage(org.eclipse.swt.graphics.Image image)
void
parameterChanged(java.lang.String parameterName)
Called, when a parameter has changed.void
refresh(boolean force)
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 static boolean
setCommentAndFormatLinks(org.eclipse.swt.widgets.Control c, java.lang.String new_comment)
private void
setInfos(java.lang.String _fileName, java.lang.String _fileSize, java.lang.String _torrentStatus, boolean _statusIsError, java.lang.String _path, java.lang.String _hash, java.lang.String _pieceData, java.lang.String _pieceLength, java.lang.String _comment, java.lang.String _creation_date, java.lang.String _user_comment, java.lang.String isPrivateAndSource)
private void
setStats(java.lang.String dl, java.lang.String ul, java.lang.String dls, java.lang.String uls, java.lang.String ts, java.lang.String dl_speed, java.lang.String ul_speed, java.lang.String s, java.lang.String p, java.lang.String completed, java.lang.String hash_fails, java.lang.String share_ratio, java.lang.String ave_comp, java.lang.String distr_copies)
private void
setThumb()
private void
setThumb(java.io.File file)
private void
setTime(java.lang.String elapsed, java.lang.String remaining)
private void
swt_refreshInfo()
boolean
toolBarItemActivated(ToolBarItem item, long activationType, java.lang.Object datasource)
XXX Should have been UIToolBarItemprivate void
updateAvailability()
private void
updatePiecesInfo(boolean bForce)
-
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 final java.lang.String MSGID_PREFIX
- See Also:
- Constant Field Values
-
badAvailColor
private static org.eclipse.swt.graphics.Color badAvailColor
-
transferringColor
private static org.eclipse.swt.graphics.Color transferringColor
-
showTransferring
private static boolean showTransferring
-
this_mon
protected AEMonitor this_mon
-
display
private org.eclipse.swt.widgets.Display display
-
manager
private DownloadManager manager
-
piecesStateCache
int[] piecesStateCache
-
piecesStateSkippedMarker
long piecesStateSkippedMarker
-
piecesStateFileBoundariesDone
boolean piecesStateFileBoundariesDone
-
loopFactor
int loopFactor
-
genComposite
org.eclipse.swt.widgets.Composite genComposite
-
gFile
org.eclipse.swt.widgets.Composite gFile
-
piecesImage
org.eclipse.swt.widgets.Canvas piecesImage
-
pImage
org.eclipse.swt.graphics.Image pImage
-
piecesPercent
BufferedLabel piecesPercent
-
availabilityImage
org.eclipse.swt.widgets.Canvas availabilityImage
-
aImage
org.eclipse.swt.graphics.Image aImage
-
availabilityPercent
BufferedLabel availabilityPercent
-
gTransfer
org.eclipse.swt.widgets.Group gTransfer
-
timeElapsed
BufferedLabel timeElapsed
-
timeRemaining
BufferedLabel timeRemaining
-
download
BufferedLabel download
-
downloadSpeed
BufferedLabel downloadSpeed
-
upload
BufferedLabel upload
-
uploadSpeed
BufferedLabel uploadSpeed
-
totalSpeed
BufferedLabel totalSpeed
-
ave_completion
BufferedLabel ave_completion
-
distributedCopies
BufferedLabel distributedCopies
-
seeds
BufferedLabel seeds
-
peers
BufferedLabel peers
-
completedLbl
BufferedLabel completedLbl
-
gInfo
org.eclipse.swt.widgets.Group gInfo
-
fileName
BufferedLabel fileName
-
torrentStatus
BufferedLabel torrentStatus
-
fileSize
BufferedLabel fileSize
-
saveIn
BufferedLabel saveIn
-
hash
BufferedLabel hash
-
pieceNumber
BufferedLabel pieceNumber
-
pieceSize
BufferedLabel pieceSize
-
lblComment
org.eclipse.swt.widgets.Control lblComment
-
creation_date
BufferedLabel creation_date
-
date_menus
org.eclipse.swt.widgets.MenuItem[] date_menus
-
privateStatus
BufferedLabel privateStatus
-
user_comment
org.eclipse.swt.widgets.Control user_comment
-
hashFails
BufferedLabel hashFails
-
shareRatio
BufferedLabel shareRatio
-
thumbImage
org.eclipse.swt.widgets.Canvas thumbImage
-
tImage
org.eclipse.swt.graphics.Image tImage
-
tImageResized
org.eclipse.swt.graphics.Image tImageResized
-
tImageResizedKey
java.lang.String tImageResizedKey
-
graphicsUpdate
private int graphicsUpdate
-
piecesImageRefreshNeeded
private boolean piecesImageRefreshNeeded
-
parent
private org.eclipse.swt.widgets.Composite parent
-
scrolled_comp
private org.eclipse.swt.custom.ScrolledComposite scrolled_comp
-
swtView
private UISWTView swtView
-
viewBuilt
private boolean viewBuilt
-
-
Method Detail
-
dataSourceChanged
public void dataSourceChanged(java.lang.Object newDataSource)
-
initialize
public void initialize(org.eclipse.swt.widgets.Composite composite)
-
swt_refreshInfo
private void swt_refreshInfo()
-
buildView
private void buildView()
-
getComposite
public org.eclipse.swt.widgets.Composite getComposite()
-
loadThumb
private void loadThumb()
-
setThumb
private void setThumb()
-
setThumb
private void setThumb(java.io.File file)
-
clearThumb
private void clearThumb()
-
refresh
public void refresh(boolean force)
-
delete
public void delete()
-
getFullTitle
private java.lang.String getFullTitle()
-
updateAvailability
private void updateAvailability()
-
updatePiecesInfo
private void updatePiecesInfo(boolean bForce)
-
setTime
private void setTime(java.lang.String elapsed, java.lang.String remaining)
-
setStats
private void setStats(java.lang.String dl, java.lang.String ul, java.lang.String dls, java.lang.String uls, java.lang.String ts, java.lang.String dl_speed, java.lang.String ul_speed, java.lang.String s, java.lang.String p, java.lang.String completed, java.lang.String hash_fails, java.lang.String share_ratio, java.lang.String ave_comp, java.lang.String distr_copies)
-
setInfos
private void setInfos(java.lang.String _fileName, java.lang.String _fileSize, java.lang.String _torrentStatus, boolean _statusIsError, java.lang.String _path, java.lang.String _hash, java.lang.String _pieceData, java.lang.String _pieceLength, java.lang.String _comment, java.lang.String _creation_date, java.lang.String _user_comment, java.lang.String isPrivateAndSource)
-
setCommentAndFormatLinks
private static boolean setCommentAndFormatLinks(org.eclipse.swt.widgets.Control c, java.lang.String new_comment)
-
parameterChanged
public void parameterChanged(java.lang.String parameterName)
Description copied from interface:ParameterListener
Called, when a parameter has changed. The listener could only react if the parameter name is relevant. Or the listener can just read all parameters again.- Specified by:
parameterChanged
in interfaceParameterListener
- Parameters:
parameterName
- the name of the parameter that has changed
-
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
-
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
-
-