All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class mesquite.lib.FileElement

java.lang.Object
   |
   +----mesquite.lib.Listened
           |
           +----mesquite.lib.Associable
                   |
                   +----mesquite.lib.AssociableWithSpecs
                           |
                           +----mesquite.lib.FileElement

public class FileElement
extends mesquite.lib.AssociableWithSpecs
implements mesquite.lib.Identifiable, mesquite.lib.Listable, mesquite.lib.Renamable, mesquite.lib.FileDirtier, mesquite.lib.HNode, mesquite.lib.Commandable, mesquite.lib.Explainable, mesquite.lib.Annotatable
A class for file elements. It must remember the file to which it is associated.


Variable Index

 o assignedIDNumber
 o DIRTY
Element is dirty (returned by close()).
 o disposed
 o doomed
 o IN_USE
Element is in use (returned by close()).
 o name
 o OK
Element was disposed (returned by close()).
 o totalCreated

Constructor Index

 o FileElement()
 o FileElement(int)

Method Index

 o addToBrowserPopup(MesquitePopup)
 o addToFile(MesquiteFile, MesquiteProject, ElementManager)
Adds the element to the given file and project, and assigns it the given manager.
 o deleteMe(boolean)
 o dispose()
Deletes the file element.
 o doCommand(String, String, CommandRecord, CommandChecker)
Performs command (for Commandable interface)
 o doom()
 o fileDirtiedByCommand(MesquiteCommand)
for FileDirtier interface
 o getExplanation()
Returns the explanation (e.g., footnote with additional information) of this element
 o getFile()
Gets file to which the FileElement belongs
 o getFileName()
Gets name of the file to which the element belongs
 o getHColor()
 o getHDaughters()
 o getHImage()
 o getHMother()
 o getHShow()
 o getID()
 o getManager()
Returns the FileElement's managing module
 o getName()
Returns name of this element
 o getNexusBlock()
Gets the associated NexusBlock of the FileElement
 o getNumSupplements()
 o getProject()
Gets project to which the FileElement belongs
 o getSupplementName(int)
 o getTypeName()
Returns the type of this element (e.g., "Continuous Data Matrix")
 o hNodeAction(Container, int, int, int)
 o hSupplementTouched(int)
 o isDoomed()
 o okToClose(int)
NOT YET FUNCTIONING If queryUser is true, then if there is a problem with deletion the user will be queried.
 o setFile(MesquiteFile)
Sets the file to which the FileElement belongs
 o setManager(ElementManager)
Sets the FileElement's managing module
 o setName(String)
Sets the name of this element
 o setProject(MesquiteProject)
Sets project to which the FileElement belongs

Variables

 o OK
 public static final int OK
Element was disposed (returned by close()).

 o IN_USE
 public static final int IN_USE
Element is in use (returned by close()).

 o DIRTY
 public static final int DIRTY
Element is dirty (returned by close()).

 o totalCreated
 public static long totalCreated
 o assignedIDNumber
 public long assignedIDNumber
 o name
 protected java.lang.String name
 o disposed
 protected boolean disposed
 o doomed
 protected boolean doomed

Constructors

 o FileElement
 public FileElement(int numParts)
 o FileElement
 public FileElement()

Methods

 o getID
 public long getID()
 o getTypeName
 public java.lang.String getTypeName()
Returns the type of this element (e.g., "Continuous Data Matrix")

 o getName
 public java.lang.String getName()
Returns name of this element

 o setName
 public void setName(java.lang.String name)
Sets the name of this element

 o getExplanation
 public java.lang.String getExplanation()
Returns the explanation (e.g., footnote with additional information) of this element

 o doCommand
 public java.lang.Object doCommand(java.lang.String commandName,
                                   java.lang.String arguments,
                                   mesquite.lib.CommandRecord commandRec,
                                   mesquite.lib.CommandChecker checker)
Performs command (for Commandable interface)

Overrides:
doCommand in class mesquite.lib.Associable
 o deleteMe
 public void deleteMe(boolean queryUser)
 o addToFile
 public mesquite.lib.NexusBlock addToFile(mesquite.lib.MesquiteFile f,
                                          mesquite.lib.MesquiteProject proj,
                                          mesquite.lib.duties.ElementManager manager)
Adds the element to the given file and project, and assigns it the given manager. Also takes care of notifying the manager that it has been added using elementAdded().

 o getNexusBlock
 public mesquite.lib.NexusBlock getNexusBlock()
Gets the associated NexusBlock of the FileElement

 o fileDirtiedByCommand
 public void fileDirtiedByCommand(mesquite.lib.MesquiteCommand command)
for FileDirtier interface

 o getProject
 public mesquite.lib.MesquiteProject getProject()
Gets project to which the FileElement belongs

 o setProject
 public void setProject(mesquite.lib.MesquiteProject project)
Sets project to which the FileElement belongs

 o getFile
 public mesquite.lib.MesquiteFile getFile()
Gets file to which the FileElement belongs

 o setFile
 public void setFile(mesquite.lib.MesquiteFile f)
Sets the file to which the FileElement belongs

 o getFileName
 public java.lang.String getFileName()
Gets name of the file to which the element belongs

 o setManager
 public void setManager(mesquite.lib.duties.ElementManager e)
Sets the FileElement's managing module

 o getManager
 public mesquite.lib.duties.ElementManager getManager()
Returns the FileElement's managing module

 o isDoomed
 public boolean isDoomed()
 o doom
 public void doom()
 o dispose
 public void dispose()
Deletes the file element. Should typically be called via close() to make sure that the file element is not in use etc.

Overrides:
dispose in class mesquite.lib.AssociableWithSpecs
 o okToClose
 public int okToClose(int queryUser)
NOT YET FUNCTIONING If queryUser is true, then if there is a problem with deletion the user will be queried. Otherwise, the deletion is done or not according to whether there are problems with deletion, and the method returns whether the deletion was successful

 o getHDaughters
 public mesquite.lib.HNode[] getHDaughters()
 o getHMother
 public mesquite.lib.HNode getHMother()
 o getNumSupplements
 public int getNumSupplements()
 o getSupplementName
 public java.lang.String getSupplementName(int index)
 o hNodeAction
 public void hNodeAction(java.awt.Container c,
                         int x,
                         int y,
                         int action)
 o addToBrowserPopup
 public void addToBrowserPopup(mesquite.lib.MesquitePopup popup)
 o hSupplementTouched
 public void hSupplementTouched(int index)
 o getHImage
 public java.awt.Image getHImage()
 o getHColor
 public java.awt.Color getHColor()
 o getHShow
 public boolean getHShow()

All Packages  Class Hierarchy  This Package  Previous  Next  Index