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

    Fields
    Modifier and Type Field Description
    protected boolean destroyed  
    protected java.io.File file  
    protected javax.swing.filechooser.FileFilter filter  
  • 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 destroyed
    InterfaceTreeNode issueTreeNode()
    Issues a new InterfaceTreeNode 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's InterfaceTreeNode.

    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 interface CleanableObject
    • destroy

      public void destroy()
      Description copied from interface: InterfaceObject
      Destroy this object (prepare it to be removed from memory)
      Specified by:
      destroy in interface InterfaceObject
    • getName

      public java.lang.String getName()
      Description copied from interface: NamedObject
      Gets the name for this object.
      Specified by:
      getName in interface NamedObject
      Returns:
    • isDestroyed

      public boolean isDestroyed()
      Description copied from interface: InterfaceObject
      Test whether this object has been destroyed
      Specified by:
      isDestroyed in interface InterfaceObject
      Returns:
    • setName

      public void setName​(java.lang.String name)
      Description copied from interface: NamedObject
      Sets the name for this object.
      Specified by:
      setName in interface NamedObject
    • 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 interface TreeObject
      Returns:
    • issueTreeNode

      public InterfaceTreeNode issueTreeNode()
      Description copied from interface: TreeObject
      Issues a new InterfaceTreeNode 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 interface TreeObject
      Returns:
    • setTreeNode

      public void setTreeNode​(InterfaceTreeNode node)
      Description copied from interface: TreeObject
      Sets the children for this node's InterfaceTreeNode.
      Specified by:
      setTreeNode in interface TreeObject
    • getDirFilter

      public static javax.swing.filechooser.FileFilter getDirFilter()
    • getFilter

      public static javax.swing.filechooser.FileFilter getFilter​(java.lang.String[] ext, java.lang.String description)