public class RecentFileManager
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
FILE_TYPE_DATASOURCE |
static java.lang.String |
FILE_TYPE_PATH |
static java.lang.String |
FILE_TYPE_WORKSPACE |
限定符和类型 | 方法和说明 |
---|---|
void |
addDatasourceToRecentFile(com.supermap.data.Datasource datasource)
将指定数据源添加到最近文件列表中
|
void |
addPathToRecentFile(java.lang.String path)
将指定路径添加到最近文件列表中
|
void |
addRecentFileChangedListener(com.supermap.desktop.core.Interface.recentFileListeners.RecentFileChangedListener recentFileChangedListener)
添加最近使用改变事件
|
void |
addWorkspaceToRecentFile(com.supermap.data.Workspace workspace)
将指定工作空间添加到最近文件列表中
|
java.util.ArrayList<com.supermap.desktop.core.ui.controls.RecentFileData> |
getDatasourceModel()
获取所有的最近数据源
|
static RecentFileManager |
getInstance()
获取单例实例
|
java.util.ArrayList<com.supermap.desktop.core.ui.controls.RecentFileData> |
getPathModel()
获取所有的最近路径
|
java.util.ArrayList<com.supermap.desktop.core.ui.controls.RecentFileData> |
getWorkspaceModel()
获取所有的最近工作空间
|
void |
removeRecentFile(java.lang.String fileType, java.lang.String filePath)
从最近使用中移除路径
|
void |
removeRecentFileChangedListener(com.supermap.desktop.core.Interface.recentFileListeners.RecentFileChangedListener recentFileChangedListener)
移除最近使用改变事件
|
void |
saveRecentFile(java.lang.String fileType, java.lang.String filePath)
将当前最近使用写入文件中
|
public static final java.lang.String FILE_TYPE_WORKSPACE
public static final java.lang.String FILE_TYPE_DATASOURCE
public static final java.lang.String FILE_TYPE_PATH
public void addDatasourceToRecentFile(com.supermap.data.Datasource datasource)
public void addWorkspaceToRecentFile(com.supermap.data.Workspace workspace)
public void addPathToRecentFile(java.lang.String path)
public void saveRecentFile(java.lang.String fileType, java.lang.String filePath)
public void removeRecentFile(java.lang.String fileType, java.lang.String filePath)
fileType
- 需要删除的类型filePath
- 文件路径FILE_TYPE_WORKSPACE
, FILE_TYPE_DATASOURCE
, FILE_TYPE_PATH
public java.util.ArrayList<com.supermap.desktop.core.ui.controls.RecentFileData> getDatasourceModel()
public java.util.ArrayList<com.supermap.desktop.core.ui.controls.RecentFileData> getWorkspaceModel()
public java.util.ArrayList<com.supermap.desktop.core.ui.controls.RecentFileData> getPathModel()
public static RecentFileManager getInstance()
public void addRecentFileChangedListener(com.supermap.desktop.core.Interface.recentFileListeners.RecentFileChangedListener recentFileChangedListener)
recentFileChangedListener
- 监听事件public void removeRecentFileChangedListener(com.supermap.desktop.core.Interface.recentFileListeners.RecentFileChangedListener recentFileChangedListener)
recentFileChangedListener
- 改变事件