|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ChinaVO.FITSManager.FListViewOperator.FListViewOperator
public class FListViewOperator
A utility class, help programmer using the FListView.
In FListViewOperator, FListView's items all suppose to be File object.
FListViewOperator use a Singleton design pattern, in this application there
will be only one FListViewOperator instance exists.
Examples:
Global.getFListViewOperator().loadData(filelist);
If someone want to listen to FListViewOpeator's events he/she should extens
the FListViewOperateListener.
And call Global.getFListViewOperator().addFListViewOperatListener(
yourListener) to listen to the event.
If someone want to contribute his/her Icons to FListView he/she should
extends the FListViewGetIconListener.
And call Global.getFListViewOperator().setIconCreator(yourListener) to set
the Icon creator.
Constructor Summary | |
---|---|
FListViewOperator()
Constructor. |
Method Summary | |
---|---|
void |
activeDoubleClick(java.io.File f)
Active double click event. |
void |
addFListViewOperatListener(FListViewOperateListener l)
add a new FListViewOperateListener. |
void |
clearData()
|
FListViewItemCell |
getCellValue(int row,
int col)
Provide the information in detail view. The information should be construct in a FListViewItemCell instance. |
java.util.List<java.io.File> |
getFiles()
Get the files showing in FListView. |
FListView |
getFListView()
Get the FListView instance which is used by FListViewOperator. |
javax.swing.Icon |
getIcon(int mIconType,
int i)
Provide a Icon. |
FListViewPopupMenu |
getPopupMenu()
Get FListViewOperator's popupmenu. |
java.io.File |
getSelectedFile()
Get the file which is selected in FListView. |
java.io.File[] |
getSelectedFiles()
Get selected files in FListView. |
int |
getViewType()
Get current view type of FListView. |
void |
insertIntoPopupMenu(java.awt.Component c)
insert a new component into FListViewOperator's Popupmenu. |
boolean |
isFilesSelected()
Check if any file selected in FListView. |
void |
loadData(java.util.List<java.io.File> list)
Clear the items in FListView and load these new files. |
void |
refresh()
Refresh the FListView. FListViewOperator do nothing at here, just announce FListViewOperateListeners the Refresh event occur. |
void |
reLoadData(boolean isReSort)
|
void |
removeFListViewOperateListener(FListViewOperateListener l)
remove a FListViewOperateListener. |
void |
setIconCreator(FListViewGetIconListener l)
Set the Icon creator for items in FListView. There will only exists one icon creator in these application. |
void |
setRefreshListener(FListViewRefreshListener l)
|
void |
setView(int viewType)
Change the view type of FListView. |
void |
sortList(int type)
|
void |
viewFileProperty()
Show the FileProperty dialog. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FListViewOperator()
Method Detail |
---|
public java.util.List<java.io.File> getFiles()
public void reLoadData(boolean isReSort)
reLoadData
in interface FListViewDataRequestInterface
public void addFListViewOperatListener(FListViewOperateListener l)
l
- a FListViewOperateListenerpublic void removeFListViewOperateListener(FListViewOperateListener l)
l
- a FListViewOperateListener;public void setRefreshListener(FListViewRefreshListener l)
public void activeDoubleClick(java.io.File f)
f
- a file which is selected.public FListView getFListView()
public FListViewItemCell getCellValue(int row, int col)
FListViewDataRequestInterface
getCellValue
in interface FListViewDataRequestInterface
row
- row position in detail view.col
- column position in detail view.
public javax.swing.Icon getIcon(int mIconType, int i)
FListViewDataRequestInterface
getIcon
in interface FListViewDataRequestInterface
mIconType
- type of icon.FCommonList.BIGICON=1 | Big Icon |
FCommonList.NormalICON=2 | Normal Icon |
FCommonList.SMALLICON=3 | Small Icon |
FCommonList.THUMBNAIL=4 | Thumbnails |
i
- index of the item, which needs an icon.
public void setIconCreator(FListViewGetIconListener l)
l
- a instance of FListViewGetIconListener.public void clearData()
public void loadData(java.util.List<java.io.File> list)
list
- a list of file.public void sortList(int type)
public void setView(int viewType)
viewType
- type of view in FListView.FListView.VIEWDETAILS=1 | details view |
FListView.VIEWLIST=2 | list view |
FListView.VIEWICONS=3 | icons view |
FListView.VIEWTILES=4 | tiles view |
FListView.VIEWTHUMBNAILS=5 | thumbnails view |
public FListViewPopupMenu getPopupMenu()
public void insertIntoPopupMenu(java.awt.Component c)
c
- component you want to insert.public int getViewType()
public java.io.File getSelectedFile()
public boolean isFilesSelected()
public java.io.File[] getSelectedFiles()
public void viewFileProperty()
public void refresh()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |