Package mgui.interfaces.io
Class InterfaceFile
java.lang.Object
mgui.interfaces.io.InterfaceFile
- All Implemented Interfaces:
InterfaceObject
,NamedObject
,TreeObject
,CleanableObject
public class InterfaceFile extends java.lang.Object implements InterfaceObject
-
Field Summary
-
Constructor Summary
Constructors Constructor Description InterfaceFile(java.io.File file)
InterfaceFile(java.io.File file, javax.swing.filechooser.FileFilter filter)
-
Method Summary
Modifier and Type Method Description void
clean()
Instructs this object to search its members for any object which has been destroyed, and release the pointer to it.void
destroy()
Destroy this object (prepare it to be removed from memory)static javax.swing.filechooser.FileFilter
getDirFilter()
java.io.File
getFile()
javax.swing.filechooser.FileFilter
getFileFilter()
static javax.swing.filechooser.FileFilter
getFilter(java.lang.String[] ext, java.lang.String description)
java.lang.String
getName()
Gets the name for this object.java.lang.String
getTreeLabel()
Returns the label text to appear in a tree node.boolean
isDestroyed()
Test whether this object has been destroyedInterfaceTreeNode
issueTreeNode()
Issues a newInterfaceTreeNode
for this object.void
setFile(java.io.File file)
void
setFileFilter(javax.swing.filechooser.FileFilter filter)
void
setName(java.lang.String name)
Sets the name for this object.void
setTreeNode(InterfaceTreeNode node)
Sets the children for this node'sInterfaceTreeNode
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
file
protected java.io.File file -
filter
protected javax.swing.filechooser.FileFilter filter -
destroyed
protected boolean destroyed
-
-
Constructor Details
-
InterfaceFile
public InterfaceFile(java.io.File file) -
InterfaceFile
public InterfaceFile(java.io.File file, javax.swing.filechooser.FileFilter filter)
-
-
Method Details
-
setFile
public void setFile(java.io.File file) -
getFile
public java.io.File getFile() -
setFileFilter
public void setFileFilter(javax.swing.filechooser.FileFilter filter) -
getFileFilter
public javax.swing.filechooser.FileFilter getFileFilter() -
clean
public void clean()Description copied from interface:CleanableObject
Instructs this object to search its members for any object which has been destroyed, and release the pointer to it.- Specified by:
clean
in interfaceCleanableObject
-
destroy
public void destroy()Description copied from interface:InterfaceObject
Destroy this object (prepare it to be removed from memory)- Specified by:
destroy
in interfaceInterfaceObject
-
getName
public java.lang.String getName()Description copied from interface:NamedObject
Gets the name for this object.- Specified by:
getName
in interfaceNamedObject
- Returns:
-
isDestroyed
public boolean isDestroyed()Description copied from interface:InterfaceObject
Test whether this object has been destroyed- Specified by:
isDestroyed
in interfaceInterfaceObject
- Returns:
-
setName
public void setName(java.lang.String name)Description copied from interface:NamedObject
Sets the name for this object.- Specified by:
setName
in interfaceNamedObject
-
getTreeLabel
public java.lang.String getTreeLabel()Description copied from interface:TreeObject
Returns the label text to appear in a tree node.- Specified by:
getTreeLabel
in interfaceTreeObject
- Returns:
-
issueTreeNode
Description copied from interface:TreeObject
Issues a newInterfaceTreeNode
for this object. The object is responsible for maintaining, updating, and destroying the tree nodes it issues, or notifying containers -- i.e., parent trees -- of changes which require the tree nodes to be modified or destroyed.- Specified by:
issueTreeNode
in interfaceTreeObject
- Returns:
-
setTreeNode
Description copied from interface:TreeObject
Sets the children for this node'sInterfaceTreeNode
.- Specified by:
setTreeNode
in interfaceTreeObject
-
getDirFilter
public static javax.swing.filechooser.FileFilter getDirFilter() -
getFilter
public static javax.swing.filechooser.FileFilter getFilter(java.lang.String[] ext, java.lang.String description)
-