|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.as400.util.html.HTMLTreeElement
com.ibm.as400.util.html.FileTreeElement
public class FileTreeElement extends HTMLTreeElement implements Serializable
The FileTreeElement class represents the Integrated File System within an HTMLTree view.
This example creates an FileTreeElement object:
// Create an HTMLTree object. HTMLTree tree = new HTMLTree(httpServletRequest);Once the elements are added to an HTMLTree object, the FileTreeElements will look like this:// Create a URLParser object. URLParser urlParser = new URLParser(httpServletRequest.getRequestURI());
// Create a object to represent the connection to the system. 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); node.setIconUrl(sl);
// Add the FileTreeElement to the tree. tree.addElement(node); }
| + | include |
| + | locales |
| + | ProdData |
| + | Test Folder |
| + | UserData |
| + | XML |
FileTreeElement objects generate the following events:
DirFilter,
Serialized Form| Constructor and Description |
|---|
FileTreeElement()
Constructs a default FileTreeElement object. |
FileTreeElement(File file)
Constructs a FileTreeElement with the specified file. |
FileTreeElement(File file,
String parameter)
Constructs a FileTreeElement with the specified file. |
FileTreeElement(File file,
String shareName,
String sharePath)
Constructs a FileTreeElement with the specified file, NetServer shareName and sharePath. |
FileTreeElement(File file,
String shareName,
String sharePath,
String parameter)
Constructs a FileTreeElement with the specified file, NetServer shareName and sharePath. |
| Modifier and Type | Method and Description |
|---|---|
File |
getFile()
Returns the file represented by this FileTreeElement. |
String |
getShareName()
Returns the NetServer share name. |
String |
getSharePath()
Returns the NetServer share path. |
boolean |
isLeaf()
Indicates if the FileTreeElement is a leaf. |
void |
selected(int hashcode)
Indicates which FileTreeElement is selected. |
void |
setFile(File file)
Sets the file represented by this FileTreeElement. |
void |
setPatternMatching(int patternMatching)
Sets the pattern-matching behavior used when files are listed. |
void |
setShareName(String shareName)
Sets the name of the NetServer share. |
void |
setSharePath(String sharePath)
Sets the NetServer share path. |
| Methods inherited from class com.ibm.as400.util.html.HTMLTreeElement |
|---|
addElement, addElementListener, addPropertyChangeListener, getCollapsedGif, getDocGif, getExpandedGif, getFOTag, 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(File file)
file - The file.
public FileTreeElement(File file,
String parameter)
file - The file.
public FileTreeElement(File file,
String shareName,
String sharePath)
file - The file.shareName - The name of the NetServer share.sharePath - The path of the NetServer share.
public FileTreeElement(File file,
String shareName,
String sharePath,
String parameter)
file - The file.shareName - The name of the NetServer share.sharePath - The path of the NetServer share.| Method Detail |
|---|
public File getFile()
public String getShareName()
public String getSharePath()
public boolean isLeaf()
isLeaf in class HTMLTreeElementpublic void selected(int hashcode)
selected in class HTMLTreeElementhashcode - The hashcode.public void setFile(File file)
file - The File.public void setShareName(String shareName)
shareName - The share name..public void setSharePath(String sharePath)
sharePath - The share path.public void setPatternMatching(int patternMatching)
patternMatching - Either PATTERN_POSIX, PATTERN_POSIX_ALL, or PATTERN_OS2
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||