Class OpenTorrentOptionsWindow.OpenTorrentInstance
- java.lang.Object
-
- com.biglybt.ui.swt.shells.opentorrent.OpenTorrentOptionsWindow.OpenTorrentInstance
-
- All Implemented Interfaces:
ParameterListener
,TableViewFilterCheck<TorrentOpenFileOptions>
- Enclosing class:
- OpenTorrentOptionsWindow
protected class OpenTorrentOptionsWindow.OpenTorrentInstance extends java.lang.Object implements TableViewFilterCheck<TorrentOpenFileOptions>, ParameterListener
-
-
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 protected boolean
bSkipDataDirModify
private org.eclipse.swt.widgets.Button
btnCheckAvailability
private org.eclipse.swt.widgets.Button
btnCheckComments
private org.eclipse.swt.widgets.Button
btnDataDIr
private org.eclipse.swt.widgets.Button
btnMarkSelected
private org.eclipse.swt.widgets.Button
btnPrivacy
private org.eclipse.swt.widgets.Button
btnRename
private org.eclipse.swt.widgets.Button
btnRetarget
private org.eclipse.swt.widgets.Button
btnSelectAll
private org.eclipse.swt.widgets.Button
btnSequentialDownload
private org.eclipse.swt.widgets.Button
btnSwarmIt
private org.eclipse.swt.widgets.Button
btnTreeView
private org.eclipse.swt.widgets.Button
btnUnmarkSelected
private OpenTorrentOptionsWindow.OpenTorrentInstanceListener
changeListener
private org.eclipse.swt.widgets.Combo
cmbDataDir
private boolean
cmbDataDirEnabled
private org.eclipse.swt.widgets.Combo
cmbQueueLocation
private org.eclipse.swt.widgets.Combo
cmbStartMode
private long
currentSelectedDataSize
private boolean
diskFreeInfoRefreshPending
private boolean
diskFreeInfoRefreshRunning
private org.eclipse.swt.widgets.Composite
diskspaceComp
private java.util.Map
fileStatCache
private HashWrapper
hash
private boolean
isSingleOptions
private java.util.List<org.eclipse.swt.widgets.Button>
network_buttons
private org.eclipse.swt.widgets.Composite
parent
private java.util.Map
parentToRootCache
private java.util.concurrent.atomic.AtomicInteger
settingToDownload
private org.eclipse.swt.widgets.Shell
shell
private SWTSkin
skin
private SWTSkinObjectExpandItem
soExpandItemFiles
private SWTSkinObjectExpandItem
soExpandItemSaveTo
private SWTSkinObjectExpandItem
soExpandItemTorrentInfo
private SWTSkinObjectText
soFileAreaInfo
private SWTSkinObjectExpandItem
soStartOptionsExpandItem
private TagFeatureFileLocation
tag_save_location
private org.eclipse.swt.widgets.Composite
tagButtonsArea
private TagButtonsUI
tagButtonsUI
private boolean
tbp_build_pending
private boolean
tbp_building
private TorrentOpenOptions
torrentOptions
private java.util.List<TorrentOpenOptions>
torrentOptionsMulti
private java.util.Set<OpenTorrentOptionsWindow.TreeNode>
treePendingExpansions
private boolean
treeViewDisableUpdates
private TableViewSWT<TorrentOpenFileOptions>
tvFiles
private org.eclipse.swt.widgets.Text
txtSubFolder
-
Constructor Summary
Constructors Modifier Constructor Description private
OpenTorrentInstance(HashWrapper _hash, org.eclipse.swt.widgets.Composite _parent, TorrentOpenOptions _torrentOptions, OpenTorrentOptionsWindow.OpenTorrentInstanceListener _changeListener)
private
OpenTorrentInstance(org.eclipse.swt.widgets.Composite _parent, java.util.List<TorrentOpenOptions> _torrentOptionsMulti, OpenTorrentOptionsWindow.OpenTorrentInstanceListener _changeListener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
addInitialTag(java.util.List<Tag> tags, Tag tag)
private void
buildTagButtonPanel()
private void
buildTagButtonPanelSupport()
private void
cancelPressed()
private boolean
canRemoveTopLevelFolder()
private void
changeFileDestination(TorrentOpenFileOptions[] infos, boolean allAtOnce)
private void
checkSeedingMode()
protected void
cmbDataDirChanged()
private void
dispose()
private void
expandItems(org.eclipse.swt.widgets.TreeItem[] items)
boolean
filterCheck(TorrentOpenFileOptions ds, java.lang.String filter, boolean regex)
void
filterSet(java.lang.String filter)
private Tag
findOtherTag(Tag tagToFind)
If tagToFind is DiscoveredTag, returnsOpenTorrentOptionsWindow.DiscoveredTag.existingTag
.private long
getCachedDirFreeSpace(java.io.File directory)
private boolean
getCachedExistsStat(java.io.File directory)
protected org.eclipse.swt.widgets.Composite
getComposite()
private java.lang.String
getEncodingName(TOTorrent torrent)
private void
getExpandedNodes(org.eclipse.swt.widgets.TreeItem[] items, java.util.Set<OpenTorrentOptionsWindow.TreeNode> nodes)
private HashWrapper
getHash()
protected int
getIndex()
private org.eclipse.swt.widgets.TreeItem
getItemForNode(org.eclipse.swt.widgets.Tree tree, OpenTorrentOptionsWindow.TreeNode node)
private void
getNodes(OpenTorrentOptionsWindow.TreeNode node, java.util.Set<OpenTorrentOptionsWindow.TreeNode> nodes, boolean parents_only)
protected TorrentOpenOptions
getOptions()
private java.lang.String
getSavePath()
protected long
getSelectedDataSize()
private java.util.Set<OpenTorrentOptionsWindow.TreeNode>
getUnExpandedNodes(org.eclipse.swt.widgets.TreeItem[] items)
private void
initialize()
private void
layout()
private boolean
okPressed(java.lang.String dataDirPassed, boolean auto)
void
parameterChanged(java.lang.String parameterName)
Called, when a parameter has changed.private void
refresh()
private boolean
removeInitialTag(java.util.List<Tag> tags, Tag tag)
private void
removeTopLevelFolder()
protected void
renameFilenames(TorrentOpenFileOptions[] torrentFileInfos)
protected void
renameFilenames(TorrentOpenFileOptions[] torrentFileInfos, int index)
private void
setSavePath()
private void
setSavePath(java.lang.String path)
private void
setSavePathEnabled(boolean enabled)
protected void
setSelectedQueueLocation(int iLocation)
protected void
setSelectedStartMode(int iStartID)
protected void
setSequentalDownload(boolean seq)
private void
setToDownload(TorrentOpenFileOptions[] infos, boolean download)
private void
setTopLevelFolder(java.io.File newDir, boolean removedTop)
private void
setupFileAreaButtons(SWTSkinObjectContainer so)
private void
setupFileAreaInfo(SWTSkinObjectText so)
private void
setupInfoSection(SWTSkin skin)
private void
setupIPFilterOption(SWTSkinObjectContainer so)
private void
setupPeerSourcesAndNetworkOptions(SWTSkinObjectContainer so)
private void
setupSaveLocation(SWTSkinObjectContainer soInputArea, SWTSkinObjectButton soBrowseButton, SWTSkinObjectContainer soMoreArea)
private void
setupStartOptions(SWTSkinObjectExpandItem so)
private void
setupTrackers(SWTSkinObjectContainer so)
private void
setupTVFiles(SWTSkinObjectContainer soFilesTable, SWTSkinObjectTextbox soFilesFilter)
private void
setupUpDownLimitOption(SWTSkinObjectContainer so)
private void
showAvailability()
private void
showComments()
private void
showTreeView()
private void
sortTree(org.eclipse.swt.widgets.Tree tree, OpenTorrentOptionsWindow.TreeNode root, int col_index, boolean asc)
private void
updateDataDirCombo()
protected void
updateFileButtons()
private void
updateInitialSaveTags(java.util.List<Tag> tags, TagFeatureFileLocation removed)
private void
updateNetworkOptions()
private void
updateNodeFromTable(org.eclipse.swt.widgets.Tree tree, OpenTorrentOptionsWindow.TreeNode node, boolean selected)
private void
updateNodeFromTree(org.eclipse.swt.widgets.Tree tree, org.eclipse.swt.widgets.TreeItem item, OpenTorrentOptionsWindow.TreeNode node, boolean selected)
private void
updateQueueLocationCombo()
private void
updateSequentialDownloadButton()
private void
updateSize()
private void
updateStartModeCombo()
private void
updateStartOptionsHeader()
private void
updateSubTree(org.eclipse.swt.widgets.TreeItem[] items)
private void
updateTreeItem(org.eclipse.swt.widgets.TreeItem item, OpenTorrentOptionsWindow.TreeNode node)
void
updateUI()
-
-
-
Field Detail
-
hash
private final HashWrapper hash
-
torrentOptions
private final TorrentOpenOptions torrentOptions
-
torrentOptionsMulti
private final java.util.List<TorrentOpenOptions> torrentOptionsMulti
-
isSingleOptions
private final boolean isSingleOptions
-
changeListener
private final OpenTorrentOptionsWindow.OpenTorrentInstanceListener changeListener
-
parent
private final org.eclipse.swt.widgets.Composite parent
-
shell
private final org.eclipse.swt.widgets.Shell shell
-
skin
private SWTSkin skin
-
bSkipDataDirModify
protected boolean bSkipDataDirModify
-
btnTreeView
private org.eclipse.swt.widgets.Button btnTreeView
-
btnPrivacy
private org.eclipse.swt.widgets.Button btnPrivacy
-
btnCheckComments
private org.eclipse.swt.widgets.Button btnCheckComments
-
btnCheckAvailability
private org.eclipse.swt.widgets.Button btnCheckAvailability
-
btnSwarmIt
private org.eclipse.swt.widgets.Button btnSwarmIt
-
network_buttons
private java.util.List<org.eclipse.swt.widgets.Button> network_buttons
-
cmbDataDirEnabled
private boolean cmbDataDirEnabled
-
cmbDataDir
private org.eclipse.swt.widgets.Combo cmbDataDir
-
btnDataDIr
private org.eclipse.swt.widgets.Button btnDataDIr
-
cmbQueueLocation
private org.eclipse.swt.widgets.Combo cmbQueueLocation
-
btnSequentialDownload
private org.eclipse.swt.widgets.Button btnSequentialDownload
-
cmbStartMode
private org.eclipse.swt.widgets.Combo cmbStartMode
-
diskFreeInfoRefreshPending
private volatile boolean diskFreeInfoRefreshPending
-
diskFreeInfoRefreshRunning
private volatile boolean diskFreeInfoRefreshRunning
-
diskspaceComp
private org.eclipse.swt.widgets.Composite diskspaceComp
-
currentSelectedDataSize
private long currentSelectedDataSize
-
fileStatCache
private final java.util.Map fileStatCache
-
parentToRootCache
private final java.util.Map parentToRootCache
-
soExpandItemFiles
private SWTSkinObjectExpandItem soExpandItemFiles
-
soExpandItemSaveTo
private SWTSkinObjectExpandItem soExpandItemSaveTo
-
soExpandItemTorrentInfo
private SWTSkinObjectExpandItem soExpandItemTorrentInfo
-
soFileAreaInfo
private SWTSkinObjectText soFileAreaInfo
-
tvFiles
private TableViewSWT<TorrentOpenFileOptions> tvFiles
-
txtSubFolder
private org.eclipse.swt.widgets.Text txtSubFolder
-
soStartOptionsExpandItem
private SWTSkinObjectExpandItem soStartOptionsExpandItem
-
settingToDownload
private java.util.concurrent.atomic.AtomicInteger settingToDownload
-
btnSelectAll
private org.eclipse.swt.widgets.Button btnSelectAll
-
btnMarkSelected
private org.eclipse.swt.widgets.Button btnMarkSelected
-
btnUnmarkSelected
private org.eclipse.swt.widgets.Button btnUnmarkSelected
-
btnRename
private org.eclipse.swt.widgets.Button btnRename
-
btnRetarget
private org.eclipse.swt.widgets.Button btnRetarget
-
tagButtonsArea
private org.eclipse.swt.widgets.Composite tagButtonsArea
-
tag_save_location
private TagFeatureFileLocation tag_save_location
-
treeViewDisableUpdates
private boolean treeViewDisableUpdates
-
treePendingExpansions
private java.util.Set<OpenTorrentOptionsWindow.TreeNode> treePendingExpansions
-
tagButtonsUI
private TagButtonsUI tagButtonsUI
-
tbp_building
private boolean tbp_building
-
tbp_build_pending
private boolean tbp_build_pending
-
-
Constructor Detail
-
OpenTorrentInstance
private OpenTorrentInstance(HashWrapper _hash, org.eclipse.swt.widgets.Composite _parent, TorrentOpenOptions _torrentOptions, OpenTorrentOptionsWindow.OpenTorrentInstanceListener _changeListener)
-
OpenTorrentInstance
private OpenTorrentInstance(org.eclipse.swt.widgets.Composite _parent, java.util.List<TorrentOpenOptions> _torrentOptionsMulti, OpenTorrentOptionsWindow.OpenTorrentInstanceListener _changeListener)
-
-
Method Detail
-
getHash
private HashWrapper getHash()
-
getOptions
protected TorrentOpenOptions getOptions()
-
getIndex
protected int getIndex()
-
getComposite
protected org.eclipse.swt.widgets.Composite getComposite()
-
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
-
initialize
private void initialize()
-
layout
private void layout()
-
refresh
private void refresh()
-
showTreeView
private void showTreeView()
-
sortTree
private void sortTree(org.eclipse.swt.widgets.Tree tree, OpenTorrentOptionsWindow.TreeNode root, int col_index, boolean asc)
-
getExpandedNodes
private void getExpandedNodes(org.eclipse.swt.widgets.TreeItem[] items, java.util.Set<OpenTorrentOptionsWindow.TreeNode> nodes)
-
getUnExpandedNodes
private java.util.Set<OpenTorrentOptionsWindow.TreeNode> getUnExpandedNodes(org.eclipse.swt.widgets.TreeItem[] items)
-
expandItems
private void expandItems(org.eclipse.swt.widgets.TreeItem[] items)
-
getNodes
private void getNodes(OpenTorrentOptionsWindow.TreeNode node, java.util.Set<OpenTorrentOptionsWindow.TreeNode> nodes, boolean parents_only)
-
updateTreeItem
private void updateTreeItem(org.eclipse.swt.widgets.TreeItem item, OpenTorrentOptionsWindow.TreeNode node)
-
getItemForNode
private org.eclipse.swt.widgets.TreeItem getItemForNode(org.eclipse.swt.widgets.Tree tree, OpenTorrentOptionsWindow.TreeNode node)
-
updateNodeFromTree
private void updateNodeFromTree(org.eclipse.swt.widgets.Tree tree, org.eclipse.swt.widgets.TreeItem item, OpenTorrentOptionsWindow.TreeNode node, boolean selected)
-
updateSubTree
private void updateSubTree(org.eclipse.swt.widgets.TreeItem[] items)
-
updateNodeFromTable
private void updateNodeFromTable(org.eclipse.swt.widgets.Tree tree, OpenTorrentOptionsWindow.TreeNode node, boolean selected)
-
showAvailability
private void showAvailability()
-
showComments
private void showComments()
-
checkSeedingMode
private void checkSeedingMode()
-
cmbDataDirChanged
protected void cmbDataDirChanged()
-
getCachedDirFreeSpace
private long getCachedDirFreeSpace(java.io.File directory)
-
getCachedExistsStat
private boolean getCachedExistsStat(java.io.File directory)
-
setSelectedQueueLocation
protected void setSelectedQueueLocation(int iLocation)
-
setSequentalDownload
protected void setSequentalDownload(boolean seq)
-
updateStartOptionsHeader
private void updateStartOptionsHeader()
-
setSelectedStartMode
protected void setSelectedStartMode(int iStartID)
-
setupFileAreaButtons
private void setupFileAreaButtons(SWTSkinObjectContainer so)
-
setToDownload
private void setToDownload(TorrentOpenFileOptions[] infos, boolean download)
-
setupFileAreaInfo
private void setupFileAreaInfo(SWTSkinObjectText so)
-
setupSaveLocation
private void setupSaveLocation(SWTSkinObjectContainer soInputArea, SWTSkinObjectButton soBrowseButton, SWTSkinObjectContainer soMoreArea)
-
setupStartOptions
private void setupStartOptions(SWTSkinObjectExpandItem so)
-
buildTagButtonPanel
private void buildTagButtonPanel()
-
buildTagButtonPanelSupport
private void buildTagButtonPanelSupport()
-
updateInitialSaveTags
private void updateInitialSaveTags(java.util.List<Tag> tags, TagFeatureFileLocation removed)
-
findOtherTag
private Tag findOtherTag(Tag tagToFind)
If tagToFind is DiscoveredTag, returnsOpenTorrentOptionsWindow.DiscoveredTag.existingTag
. Otherwise, returns DiscoveredTag with same name, if available.
-
setupTVFiles
private void setupTVFiles(SWTSkinObjectContainer soFilesTable, SWTSkinObjectTextbox soFilesFilter)
-
filterCheck
public boolean filterCheck(TorrentOpenFileOptions ds, java.lang.String filter, boolean regex)
- Specified by:
filterCheck
in interfaceTableViewFilterCheck<TorrentOpenFileOptions>
-
filterSet
public void filterSet(java.lang.String filter)
- Specified by:
filterSet
in interfaceTableViewFilterCheck<TorrentOpenFileOptions>
-
updateFileButtons
protected void updateFileButtons()
-
renameFilenames
protected void renameFilenames(TorrentOpenFileOptions[] torrentFileInfos)
-
renameFilenames
protected void renameFilenames(TorrentOpenFileOptions[] torrentFileInfos, int index)
-
setSavePath
private void setSavePath()
-
canRemoveTopLevelFolder
private boolean canRemoveTopLevelFolder()
-
removeTopLevelFolder
private void removeTopLevelFolder()
-
setTopLevelFolder
private void setTopLevelFolder(java.io.File newDir, boolean removedTop)
-
changeFileDestination
private void changeFileDestination(TorrentOpenFileOptions[] infos, boolean allAtOnce)
-
setupInfoSection
private void setupInfoSection(SWTSkin skin)
-
getEncodingName
private java.lang.String getEncodingName(TOTorrent torrent)
-
setupTrackers
private void setupTrackers(SWTSkinObjectContainer so)
-
setupUpDownLimitOption
private void setupUpDownLimitOption(SWTSkinObjectContainer so)
-
setupIPFilterOption
private void setupIPFilterOption(SWTSkinObjectContainer so)
-
setupPeerSourcesAndNetworkOptions
private void setupPeerSourcesAndNetworkOptions(SWTSkinObjectContainer so)
-
updateNetworkOptions
private void updateNetworkOptions()
-
updateDataDirCombo
private void updateDataDirCombo()
-
setSavePath
private void setSavePath(java.lang.String path)
-
setSavePathEnabled
private void setSavePathEnabled(boolean enabled)
-
getSavePath
private java.lang.String getSavePath()
-
updateQueueLocationCombo
private void updateQueueLocationCombo()
-
updateSequentialDownloadButton
private void updateSequentialDownloadButton()
-
updateSize
private void updateSize()
-
getSelectedDataSize
protected long getSelectedDataSize()
-
updateStartModeCombo
private void updateStartModeCombo()
-
updateUI
public void updateUI()
-
cancelPressed
private void cancelPressed()
-
okPressed
private boolean okPressed(java.lang.String dataDirPassed, boolean auto)
-
dispose
private void dispose()
-
-