Class FileHashItemBase
- 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.views.tableitems.files.FileHashItemBase
-
- All Implemented Interfaces:
TableCellMouseListener
,TableCellRefreshListener
,TableColumn
,TableColumnExtraInfoListener
,TableColumnCore
,java.util.Comparator<TableRowCore>
- Direct Known Subclasses:
FileCRC32Item
,FileMD5Item
,FileSHA1Item
public class FileHashItemBase extends CoreTableColumnSWT implements TableCellRefreshListener, TableCellMouseListener
-
-
Field Summary
Fields Modifier and Type Field Description private static DiskManagerFileInfo
active
private static java.lang.String
active_hash
private static int
active_percent
private static AsyncDispatcher
dispatcher
(package private) java.lang.String
hash_type
protected static java.lang.String
HT_CRC32
protected static java.lang.String
HT_MD5
protected static java.lang.String
HT_SHA1
(package private) TableContextMenuItem
menuItem
private static java.util.Map<DiskManagerFileInfo,java.util.Set<java.lang.String>>
pending
-
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 FileHashItemBase(java.lang.String _hash_type, int width)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cellMouseTrigger(TableCellMouseEvent event)
triggered when a mouse event for the TableCell occurs, excluding mouse move.void
fillTableColumnInfo(TableColumnInfo info)
Provide the app with information about your Table Columnprivate static java.lang.String
getHash(java.lang.String hash_type, DiskManagerFileInfo file)
private static boolean
isFileReady(DiskManagerFileInfo file)
void
refresh(TableCell cell)
Triggered based on refresh interval specified inTableColumn.getRefreshInterval()
private static void
updateHash(java.lang.String hash_type, DiskManagerFileInfo file)
-
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, postConfigLoad, preAdd, preConfigSave, remove, 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
-
HT_CRC32
protected static final java.lang.String HT_CRC32
- See Also:
- Constant Field Values
-
HT_MD5
protected static final java.lang.String HT_MD5
- See Also:
- Constant Field Values
-
HT_SHA1
protected static final java.lang.String HT_SHA1
- See Also:
- Constant Field Values
-
hash_type
final java.lang.String hash_type
-
menuItem
final TableContextMenuItem menuItem
-
dispatcher
private static AsyncDispatcher dispatcher
-
pending
private static java.util.Map<DiskManagerFileInfo,java.util.Set<java.lang.String>> pending
-
active
private static volatile DiskManagerFileInfo active
-
active_hash
private static volatile java.lang.String active_hash
-
active_percent
private static volatile int active_percent
-
-
Method Detail
-
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
-
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
-
isFileReady
private static boolean isFileReady(DiskManagerFileInfo file)
-
updateHash
private static void updateHash(java.lang.String hash_type, DiskManagerFileInfo file)
-
getHash
private static java.lang.String getHash(java.lang.String hash_type, DiskManagerFileInfo file)
-
-