|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.as400.util.html.HTMLTreeElement | +--com.ibm.as400.util.html.FileTreeElement
The FileTreeElement class represents the Integrated File System within an HTMLTree view.
This example creates an FileTreeElement object:
// Create a URLParser object. URLParser urlParser = new URLParser(httpServletRequest.getRequestURI());Once the elements are added to an HTMLTree object, the FileTreeElements will look like this:// Create an AS400 object. AS400 system = new AS400(mySystem, myUserId, myPassword);
// Create an IFS object. IFSJavaFile root = new IFSJavaFile(system, "/QIBM");
// Create a DirFilter object and get the directories. DirFilter filter = new DirFilter(); File[] dirList = root.listFiles(filter);
for (int i=0; i < dirList.length; i++) {
// Create a FileTreeElement. FileTreeElement node = new FileTreeElement(dirList[i]);
// Set the Icon URL. ServletHyperlink sl = new ServletHyperlink(urlParser.getURI()); sl.setHttpServletResponse(resp); element.setIconUrl(sl);
// Add the FileTreeElement to the tree. tree.addElement(element); }
+ | include |
+ | locales |
+ | ProdData |
+ | Test Folder |
+ | UserData |
+ | XML |
FileTreeElement objects generate the following events:
DirFilter
, Serialized FormConstructor Summary | |
FileTreeElement()
Constructs a default FileTreeElement object. |
|
FileTreeElement(java.io.File file)
Constructs an FileTreeElement with the specified file. |
Method Summary | |
java.io.File |
getFile()
Returns the file represented by this FileTreeElement. |
boolean |
isLeaf()
Indicates if the FileTreeElement is a leaf. |
void |
selected(int hashcode)
Indicates which FileTreeElement is selected. |
void |
setFile(java.io.File file)
Sets the file represented by this FileTreeElement. |
Methods inherited from class com.ibm.as400.util.html.HTMLTreeElement |
addElement,
addElementListener,
addPropertyChangeListener,
getCollapsedGif,
getDocGif,
getExpandedGif,
getIconUrl,
getTag,
getText,
getTextUrl,
isExpanded,
removeElement,
removeElementListener,
removePropertyChangeListener,
setCollapsedGif,
setDocGif,
setExpanded,
setExpandedGif,
setIconUrl,
setText,
setText,
setTextUrl,
sort |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public FileTreeElement()
public FileTreeElement(java.io.File file)
file
- The file.Method Detail |
public java.io.File getFile()
public boolean isLeaf()
public void selected(int hashcode)
hashcode
- The hashcode.public void setFile(java.io.File file)
file
- The File.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |