Class ColumnProgressETA
- java.lang.Object
-
- com.biglybt.ui.common.table.impl.TableColumnImpl
-
- com.biglybt.ui.common.table.impl.CoreTableColumn
-
- com.biglybt.ui.swt.views.table.CoreTableColumnSWT
-
- com.biglybt.ui.swt.columns.torrent.ColumnProgressETA
-
- All Implemented Interfaces:
TableCellAddedListener
,TableCellMouseListener
,TableCellRefreshListener
,TableColumn
,TableColumnExtraInfoListener
,TableColumnCore
,TableCellSWTPaintListener
,java.util.Comparator<TableRowCore>
public class ColumnProgressETA extends CoreTableColumnSWT implements TableCellAddedListener, TableCellMouseListener, TableCellRefreshListener, TableCellSWTPaintListener
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
ColumnProgressETA.MyParameterListener
-
Field Summary
Fields Modifier and Type Field Description private static int
borderWidth
private org.eclipse.swt.graphics.Color
cBGcd
private org.eclipse.swt.graphics.Color
cBGdl
private org.eclipse.swt.graphics.Color
cBorder
private ViewUtils.CustomDateFormat
cdf
protected static java.lang.String
CFG_SHOWETA
protected static java.lang.String
CFG_SHOWSPEED
private static java.lang.Object
CLICK_KEY
static java.lang.String
COLUMN_ID
private static int
COLUMN_WIDTH
private org.eclipse.swt.graphics.Color
cText
private org.eclipse.swt.graphics.Color
cTextDrop
static java.lang.Class
DATASOURCE_TYPE
(package private) org.eclipse.swt.widgets.Display
display
private ColumnTorrentFileProgress
fileProgress
private static org.eclipse.swt.graphics.Font
fontText
private org.eclipse.swt.graphics.Image
imgBGTorrent
private ColumnProgressETA.MyParameterListener
myParameterListener
private boolean
progress_eta_absolute
static long
SHOW_ETA_AFTER_MS
protected boolean
showETA
protected boolean
showSpeed
(package private) org.eclipse.swt.graphics.Color
textColor
-
Fields inherited from class com.biglybt.ui.common.table.impl.TableColumnImpl
this_mon
-
Fields inherited from interface com.biglybt.pif.ui.tables.TableColumn
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_LEAD, ALIGN_TOP, ALIGN_TRAIL, CAT_BYTES, CAT_CONNECTION, CAT_CONTENT, CAT_ESSENTIAL, CAT_PEER_IDENTIFICATION, CAT_PROGRESS, CAT_PROTOCOL, CAT_SETTINGS, CAT_SHARING, CAT_SWARM, CAT_TIME, CAT_TRACKER, INTERVAL_GRAPHIC, INTERVAL_INVALID_ONLY, INTERVAL_LIVE, MENU_STYLE_COLUMN_DATA, MENU_STYLE_HEADER, POSITION_INVISIBLE, POSITION_LAST, TYPE_GRAPHIC, TYPE_TEXT, TYPE_TEXT_ONLY, UD_FORCE_VISIBLE
-
-
Constructor Summary
Constructors Constructor Description ColumnProgressETA(java.lang.String sTableID)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cellAdded(TableCell cell)
triggered when a cell is being added.void
cellMouseTrigger(TableCellMouseEvent event)
triggered when a mouse event for the TableCell occurs, excluding mouse move.void
cellPaint(org.eclipse.swt.graphics.GC gc, TableCellSWT cell)
void
fillTableColumnInfo(TableColumnInfo info)
Provide the app with information about your Table ColumnEnhancedDownloadManager
getEDM(DownloadManager dm)
private long
getETA(TableCell cell)
private int
getPercentDone(java.lang.Object ds)
private long
getSpeed(java.lang.Object ds)
private int
getState(TableCell cell)
private boolean
isStopped(TableCell cell)
private void
log(TableCell cell, java.lang.String s)
void
postConfigLoad()
implement this method if you want to be notified when the stored column configuration such as user data or GUI-adjustable properties have been loadedvoid
refresh(TableCell cell)
Triggered based on refresh interval specified inTableColumn.getRefreshInterval()
void
remove()
-
Methods inherited from class com.biglybt.ui.swt.views.table.CoreTableColumnSWT
addListeners
-
Methods inherited from class com.biglybt.ui.common.table.impl.CoreTableColumn
initializeAsGraphic, initializeAsGraphic
-
Methods inherited from class com.biglybt.ui.common.table.impl.TableColumnImpl
addCellAddedListener, addCellClipboardListener, addCellDisposeListener, addCellMouseListener, addCellMouseMoveListener, addCellOtherListener, addCellRefreshListener, addCellToolTipListener, addCellVisibilityListener, addColumnExtraInfoListener, addContextMenuItem, addContextMenuItem, addDataSourceType, addDataSourceTypes, addRefreshTime, compare, doesAutoTooltip, generateDiagnostics, getAlignment, getBackgroundColor, getCellAddedListeners, getCellOtherListeners, getCellRefreshListeners, getClipboardText, getColumnAdded, getColumnExtraInfoListeners, getConsecutiveErrCount, getContextMenuItems, getForDataSourceType, getForDataSourceTypes, getForegroundColor, getIconReference, getInplaceEditorListener, getLastSortValueChange, getMaxWidth, getMinWidth, getName, getNameOverride, getPosition, getPreferredWidth, getPreferredWidthMax, getRefreshInterval, getTableID, getTitleLanguageKey, getTitleLanguageKey, getType, getUseCoreDataSource, getUserData, getUserDataString, getWidth, handlesDataSourceType, hasCellMouseMoveListener, hasCellOtherListeners, hasCellRefreshListener, hasInplaceEditorListener, initialize, initialize, invalidateCell, invalidateCells, invokeCellAddedListeners, invokeCellDisposeListeners, invokeCellMouseListeners, invokeCellRefreshListeners, invokeCellToolTipListeners, invokeCellVisibilityListeners, isDirty, isFirstLoad, isObfuscated, isPreferredWidthAuto, isRemoved, isSortAscending, isSortValueLive, isVisible, loadSettings, preAdd, preConfigSave, removeCellAddedListener, removeCellClipboardListener, removeCellDisposeListener, removeCellMouseListener, removeCellMouseMoveListener, removeCellOtherListener, removeCellRefreshListener, removeCellToolTipListener, removeCellVisibilityListener, removeColumnExtraInfoListener, removeContextMenuItem, removeUserData, reset, saveSettings, setAlignment, setAutoTooltip, setBackgroundColor, setColumnAdded, setConsecutiveErrCount, setDefaultSortAscending, setForegroundColor, setIconReference, setInplaceEditorListener, setLastSortValueChange, setMaxWidth, setMinimumRequiredUserMode, setMinWidth, setNameOverride, setObfuscation, setPosition, setPositionNoShift, setPreferredWidth, setPreferredWidthAuto, setPreferredWidthMax, setRefreshInterval, setSortAscending, setSortValueLive, setTableID, setType, setUseCoreDataSource, setUserData, setVisible, setWidth, setWidthLimits, setWidthPX, showOnlyImage, triggerColumnSizeChange
-
-
-
-
Field Detail
-
DATASOURCE_TYPE
public static final java.lang.Class DATASOURCE_TYPE
-
COLUMN_ID
public static final java.lang.String COLUMN_ID
- See Also:
- Constant Field Values
-
SHOW_ETA_AFTER_MS
public static final long SHOW_ETA_AFTER_MS
- See Also:
- Constant Field Values
-
CFG_SHOWETA
protected static final java.lang.String CFG_SHOWETA
- See Also:
- Constant Field Values
-
CFG_SHOWSPEED
protected static final java.lang.String CFG_SHOWSPEED
- See Also:
- Constant Field Values
-
borderWidth
private static final int borderWidth
- See Also:
- Constant Field Values
-
COLUMN_WIDTH
private static final int COLUMN_WIDTH
- See Also:
- Constant Field Values
-
CLICK_KEY
private static final java.lang.Object CLICK_KEY
-
fontText
private static org.eclipse.swt.graphics.Font fontText
-
myParameterListener
private final ColumnProgressETA.MyParameterListener myParameterListener
-
showETA
protected boolean showETA
-
showSpeed
protected boolean showSpeed
-
display
org.eclipse.swt.widgets.Display display
-
textColor
org.eclipse.swt.graphics.Color textColor
-
cBGdl
private org.eclipse.swt.graphics.Color cBGdl
-
cBGcd
private org.eclipse.swt.graphics.Color cBGcd
-
cBorder
private org.eclipse.swt.graphics.Color cBorder
-
cText
private org.eclipse.swt.graphics.Color cText
-
imgBGTorrent
private org.eclipse.swt.graphics.Image imgBGTorrent
-
cTextDrop
private org.eclipse.swt.graphics.Color cTextDrop
-
cdf
private ViewUtils.CustomDateFormat cdf
-
fileProgress
private ColumnTorrentFileProgress fileProgress
-
progress_eta_absolute
private boolean progress_eta_absolute
-
-
Method Detail
-
remove
public void remove()
- Specified by:
remove
in interfaceTableColumn
- Overrides:
remove
in classTableColumnImpl
-
fillTableColumnInfo
public void fillTableColumnInfo(TableColumnInfo info)
Description copied from interface:TableColumnExtraInfoListener
Provide the app with information about your Table Column- Specified by:
fillTableColumnInfo
in interfaceTableColumnExtraInfoListener
- Overrides:
fillTableColumnInfo
in classCoreTableColumn
- Parameters:
info
- Use setters to set information
-
cellAdded
public void cellAdded(TableCell cell)
Description copied from interface:TableCellAddedListener
triggered when a cell is being added.- Specified by:
cellAdded
in interfaceTableCellAddedListener
- Parameters:
cell
- TableCell that is being added
-
cellMouseTrigger
public void cellMouseTrigger(TableCellMouseEvent event)
Description copied from interface:TableCellMouseListener
triggered when a mouse event for the TableCell occurs, excluding mouse move.- Specified by:
cellMouseTrigger
in interfaceTableCellMouseListener
- Parameters:
event
- Mouse event information
-
refresh
public void refresh(TableCell cell)
Description copied from interface:TableCellRefreshListener
Triggered based on refresh interval specified inTableColumn.getRefreshInterval()
- Specified by:
refresh
in interfaceTableCellRefreshListener
- Parameters:
cell
- TableCell that the refresh trigger is for
-
cellPaint
public void cellPaint(org.eclipse.swt.graphics.GC gc, TableCellSWT cell)
- Specified by:
cellPaint
in interfaceTableCellSWTPaintListener
-
getPercentDone
private int getPercentDone(java.lang.Object ds)
-
getETA
private long getETA(TableCell cell)
-
getState
private int getState(TableCell cell)
-
isStopped
private boolean isStopped(TableCell cell)
-
getSpeed
private long getSpeed(java.lang.Object ds)
-
getEDM
public EnhancedDownloadManager getEDM(DownloadManager dm)
-
log
private void log(TableCell cell, java.lang.String s)
-
postConfigLoad
public void postConfigLoad()
Description copied from interface:TableColumn
implement this method if you want to be notified when the stored column configuration such as user data or GUI-adjustable properties have been loaded- Specified by:
postConfigLoad
in interfaceTableColumn
- Overrides:
postConfigLoad
in classTableColumnImpl
-
-