mesquite.lib
Class AssociableWithSpecs

java.lang.Object
  extended by mesquite.lib.Listened
      extended by mesquite.lib.Attachable
          extended by mesquite.lib.Associable
              extended by mesquite.lib.AssociableWithSpecs
All Implemented Interfaces:
Annotatable, Commandable, HTMLDescribable, Listable, Listenable, Selectionable
Direct Known Subclasses:
FileElement

public abstract class AssociableWithSpecs
extends Associable

A class that contains serially repeated parts, to each of which may be attached information. For example, a Tree contains many nodes, and information might be attached to each node. A Taxa contains taxons, a CharacterData contains characters, and so on. The purpose of this class is to coordinate this attached ("associated") information. Subclasses include FileElement (and thus CharacterData and Taxa) and Tree.


Field Summary
static int SPECSSET_CHANGED
           
 
Fields inherited from class mesquite.lib.Associable
comment, comments, numParts, rememberDefaultOrder, selected, versionNumber
 
Fields inherited from class mesquite.lib.Listened
allListeners, classes, classesNotified, listeners, listenersRemaining, notifications
 
Fields inherited from interface mesquite.lib.HTMLDescribable
verbose
 
Constructor Summary
AssociableWithSpecs()
           
AssociableWithSpecs(int numParts)
           
 
Method Summary
 boolean addParts(int starting, int num)
           
 boolean deleteParts(int starting, int num)
           
 void dispose()
          Disposes this associable
 void disposing(java.lang.Object obj)
           
 void equalizeParts(AssociableWithSpecs other, int otherPart, int part)
           
 SpecsSet getCurrentSpecsSet(java.lang.Class type)
          returns the given specs set from the list of specs sets
 int getNumSpecsSets(java.lang.Class type)
          returns the number of specs sets
 SpecsSetVector getSpecSetsVector(java.lang.Class type)
           
 java.util.Vector getSpecSetsVectorVector()
           
 SpecsSet getSpecsSet(int index, java.lang.Class type)
          returns the given specs set from the list of specs sets
 SpecsSet getSpecsSet(java.lang.String name, java.lang.Class type)
          returns the given specs set from the list of specs sets
 java.lang.String listAssociates()
           
 boolean moveParts(int starting, int num, int justAfter)
           
 void prepareSpecsSetVector(java.lang.Class type)
           
 void removeSpecsSet(SpecsSet specsSet, java.lang.Class type)
          removes the given specifications set from the list of specs sets
 void setCurrentSpecsSet(SpecsSet specsSet, java.lang.Class type)
           
 void storeSpecsSet(SpecsSet specsSet, java.lang.Class type)
          stores the given specifications set in the list of specs sets.
 boolean swapParts(int first, int second)
           
 java.lang.String toHTMLStringDescription()
           
 
Methods inherited from class mesquite.lib.Associable
anyAssociatedObject, anySelected, clearAllAssociatedBits, contiguousSelection, contiguousSelectionOld, copyCurrentToPreviousOrder, deassignAllAssociatedLongs, deassignAssociated, deassignAssociated, deleteJustAdded, deselectAll, doCommand, equalizeParts, exchangeAssociated, firstSelected, getAnnotation, getAnnotation, getAssociatedBit, getAssociatedBits, getAssociatedDouble, getAssociatedDoubles, getAssociatedLong, getAssociatedLongs, getAssociatedObject, getAssociatedObjects, getDefaultPosition, getDirty, getJustAdded, getNumberAssociatedBits, getNumberAssociatedDoubles, getNumberAssociatedLongs, getNumberAssociatedObjects, getNumberOfParts, getNumberOfSelectableParts, getSelected, getSelectedBits, getSnapshot, getVersionNumber, getWhichAssociatedBits, getWhichAssociatedDouble, getWhichAssociatedLong, getWhichAssociatedObject, inBounds, lastSelected, makeAssociatedBits, makeAssociatedDoubles, makeAssociatedLongs, makeAssociatedObjects, numberSelected, numberSelected, readAssociated, recordCurrentOrder, recordDefaultOrder, recordPreviousOrder, removeAssociatedBits, removeAssociatedDoubles, removeAssociatedLongs, removeAssociatedObjects, resetDefaultOrderToCurrent, resetJustAdded, restoreToPreviousOrder, selectAll, setAnnotation, setAnnotation, setAssociatedBit, setAssociatedDouble, setAssociatedLong, setAssociatedObject, setAssociateds, setDefaultPosition, setDirty, setJustAdded, setNumberOfParts, setSelected, transferAssociated, writeAssociated, zeroAllAssociatedDoubles, zeroAllAssociatedLongs, zeroAllAssociatedObjects
 
Methods inherited from class mesquite.lib.Attachable
anyAttachments, attach, attachIfUniqueName, detach, getAttachment, getAttachment, getAttachments, listAttachments, readAttachments, setAttachments, writeAttachments
 
Methods inherited from class mesquite.lib.Listened
addListener, addListenerHighPriority, amIListening, decrementNotifySuppress, doAfterNotify, getRemainingListeners, incrementNotifySuppress, listListeners, notifyDisposing, notifyListeners, notifyListeners, removeListener, reportListeners, setDumpNotified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface mesquite.lib.Listable
getName
 
Methods inherited from interface mesquite.lib.Listenable
addListener, addListenerHighPriority, amIListening, decrementNotifySuppress, incrementNotifySuppress, listListeners, notifyListeners, removeListener
 

Field Detail

SPECSSET_CHANGED

public static final int SPECSSET_CHANGED
See Also:
Constant Field Values
Constructor Detail

AssociableWithSpecs

public AssociableWithSpecs(int numParts)

AssociableWithSpecs

public AssociableWithSpecs()
Method Detail

toHTMLStringDescription

public java.lang.String toHTMLStringDescription()
Specified by:
toHTMLStringDescription in interface HTMLDescribable
Overrides:
toHTMLStringDescription in class Associable

listAssociates

public java.lang.String listAssociates()
Overrides:
listAssociates in class Associable

disposing

public void disposing(java.lang.Object obj)

dispose

public void dispose()
Description copied from class: Associable
Disposes this associable

Overrides:
dispose in class Associable

equalizeParts

public void equalizeParts(AssociableWithSpecs other,
                          int otherPart,
                          int part)

addParts

public boolean addParts(int starting,
                        int num)
Overrides:
addParts in class Associable

deleteParts

public boolean deleteParts(int starting,
                           int num)
Overrides:
deleteParts in class Associable

moveParts

public boolean moveParts(int starting,
                         int num,
                         int justAfter)
Overrides:
moveParts in class Associable

swapParts

public boolean swapParts(int first,
                         int second)
Overrides:
swapParts in class Associable

getSpecSetsVectorVector

public java.util.Vector getSpecSetsVectorVector()

getSpecSetsVector

public SpecsSetVector getSpecSetsVector(java.lang.Class type)

prepareSpecsSetVector

public void prepareSpecsSetVector(java.lang.Class type)

storeSpecsSet

public void storeSpecsSet(SpecsSet specsSet,
                          java.lang.Class type)
stores the given specifications set in the list of specs sets. If an appropriate specs set vector is not found, a new one is made.


removeSpecsSet

public void removeSpecsSet(SpecsSet specsSet,
                           java.lang.Class type)
removes the given specifications set from the list of specs sets


getNumSpecsSets

public int getNumSpecsSets(java.lang.Class type)
returns the number of specs sets


getCurrentSpecsSet

public SpecsSet getCurrentSpecsSet(java.lang.Class type)
returns the given specs set from the list of specs sets


setCurrentSpecsSet

public void setCurrentSpecsSet(SpecsSet specsSet,
                               java.lang.Class type)

getSpecsSet

public SpecsSet getSpecsSet(java.lang.String name,
                            java.lang.Class type)
returns the given specs set from the list of specs sets


getSpecsSet

public SpecsSet getSpecsSet(int index,
                            java.lang.Class type)
returns the given specs set from the list of specs sets