apollo.config
Class TierProperty

java.lang.Object
  extended by apollo.config.TierProperty
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class TierProperty
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

TierProperty holds a list of FeatureProperties. This corresponds to a "Tier" in the tiers file. Tiers are what is displayed in the Types panel (should probably be called TiersPanel, you have to right click on a tier you see all of its types/feature properties) A Tier holds a bunch of "Types" (visual types), a Type is captured by a FeatureProperty. Each FeatureProperty can have a different color, etc... A "Tier" is the unit for collapsing and hiding, all FeatureProperties in a Tier expand and collapse together, hide and show together. TierProperty is an Observable so it does a setChanged() and notifyObservers() when its changed. Observers add themselves with addObserver. PropertyScheme observes TierProperties. Thats now changed. Observer stuff replaced with PropSchemeChangeEvent.

See Also:
Serialized Form

Field Summary
protected  CaseInsensitiveStringHash analysis_types
           
protected  java.util.Vector comments
           
protected  boolean curated
           
protected  boolean expanded
           
protected  boolean isFirstTier
           
protected  java.lang.String label
           
protected  boolean labeled
           
protected  int maxRow
           
static boolean NOT_VISIBLE
           
protected  boolean sorted
           
protected  boolean visible
           
static boolean VISIBLE
           
protected  boolean warnOnEdit
          warnOnEdit can be set at the Tier level (here) or at the individual FeatureProperty level
 
Constructor Summary
TierProperty()
           
TierProperty(java.lang.String label)
           
TierProperty(java.lang.String label, boolean visible)
           
TierProperty(java.lang.String label, boolean visible, boolean expanded)
           
TierProperty(java.lang.String label, boolean visible, boolean expanded, boolean sorted)
           
TierProperty(java.lang.String label, boolean visible, boolean expanded, boolean sorted, int maxRow)
           
TierProperty(java.lang.String label, boolean visible, boolean expanded, boolean sorted, int maxRow, boolean labeled)
           
TierProperty(TierProperty from)
           
 
Method Summary
 void addAnalysisType(FeatureProperty fp, java.lang.String analysis)
           
protected  void addComment(java.lang.String comment)
           
 void addFeatureProperty(FeatureProperty fp)
           
 java.lang.Object clone()
           
 FeatureProperty featureForAnalysisType(java.lang.String analysis_type)
           
 java.awt.Color getColour()
           
protected  java.util.Vector getComments()
           
 java.util.Vector getFeatureProperties()
           
 FeatureProperty getFeatureProperty(java.lang.String type)
           
 java.lang.String getLabel()
           
 int getMaxRow()
           
 java.lang.String getTypesAsString()
           
 boolean holdsType(java.lang.String type)
           
 boolean isCurated()
           
 boolean isExpanded()
           
 boolean isFirstTier()
           
 boolean isLabeled()
           
 boolean isLabeled(boolean checkExpanded)
           
 boolean isProtein()
          Default is false
 boolean isSorted()
           
 boolean isVisible()
           
 boolean labelEquals(java.lang.String name)
           
protected  java.lang.String quoteIfSpace(java.lang.String str)
           
 void setCurated(boolean curated)
          Whether this tier represents curated annotations (to be shown in the annotation view rather than result view).
 void setExpanded(boolean expanded)
           
 void setExpanded(boolean expanded, boolean isTemporary)
           
protected  void setIsFirstTier(boolean firstTier)
           
 void setLabel(java.lang.String label)
           
 void setLabeled(boolean labeled)
           
 void setLabeled(boolean labeled, boolean isTemporary)
           
 void setMaxRow(int maxRow)
           
 void setSorted(boolean sorted)
           
 void setVisible(boolean visible)
           
 void setVisible(boolean visible, boolean isTemporary)
           
 void setWarnOnEdit(boolean warn)
          Whether the user should be warned if they try to edit features of a given type.
 java.lang.String toString()
           
 boolean warnOnEdit()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

label

protected java.lang.String label

expanded

protected boolean expanded

visible

protected boolean visible

sorted

protected boolean sorted

labeled

protected boolean labeled

maxRow

protected int maxRow

curated

protected boolean curated

warnOnEdit

protected boolean warnOnEdit
warnOnEdit can be set at the Tier level (here) or at the individual FeatureProperty level


comments

protected java.util.Vector comments

analysis_types

protected CaseInsensitiveStringHash analysis_types

VISIBLE

public static boolean VISIBLE

NOT_VISIBLE

public static boolean NOT_VISIBLE

isFirstTier

protected boolean isFirstTier
Constructor Detail

TierProperty

public TierProperty()

TierProperty

public TierProperty(java.lang.String label,
                    boolean visible,
                    boolean expanded,
                    boolean sorted,
                    int maxRow,
                    boolean labeled)

TierProperty

public TierProperty(java.lang.String label,
                    boolean visible,
                    boolean expanded,
                    boolean sorted,
                    int maxRow)

TierProperty

public TierProperty(java.lang.String label,
                    boolean visible,
                    boolean expanded,
                    boolean sorted)

TierProperty

public TierProperty(java.lang.String label,
                    boolean visible,
                    boolean expanded)

TierProperty

public TierProperty(java.lang.String label,
                    boolean visible)

TierProperty

public TierProperty(java.lang.String label)

TierProperty

public TierProperty(TierProperty from)
Method Detail

setLabel

public void setLabel(java.lang.String label)

getLabel

public java.lang.String getLabel()

setVisible

public void setVisible(boolean visible,
                       boolean isTemporary)

setVisible

public void setVisible(boolean visible)

isVisible

public boolean isVisible()

setExpanded

public void setExpanded(boolean expanded,
                        boolean isTemporary)

setExpanded

public void setExpanded(boolean expanded)

isExpanded

public boolean isExpanded()

setSorted

public void setSorted(boolean sorted)

isSorted

public boolean isSorted()

setMaxRow

public void setMaxRow(int maxRow)

getMaxRow

public int getMaxRow()

setLabeled

public void setLabeled(boolean labeled,
                       boolean isTemporary)

setLabeled

public void setLabeled(boolean labeled)

isLabeled

public boolean isLabeled()

isLabeled

public boolean isLabeled(boolean checkExpanded)

setCurated

public void setCurated(boolean curated)
Whether this tier represents curated annotations (to be shown in the annotation view rather than result view). Default is false.


isCurated

public boolean isCurated()

setWarnOnEdit

public void setWarnOnEdit(boolean warn)
Whether the user should be warned if they try to edit features of a given type. Default is false. Applies to all types belonging to this tier; can be overridden by individual types.


warnOnEdit

public boolean warnOnEdit()

quoteIfSpace

protected java.lang.String quoteIfSpace(java.lang.String str)

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

getFeatureProperty

public FeatureProperty getFeatureProperty(java.lang.String type)

getFeatureProperties

public java.util.Vector getFeatureProperties()

addFeatureProperty

public void addFeatureProperty(FeatureProperty fp)

addAnalysisType

public void addAnalysisType(FeatureProperty fp,
                            java.lang.String analysis)

featureForAnalysisType

public FeatureProperty featureForAnalysisType(java.lang.String analysis_type)

getTypesAsString

public java.lang.String getTypesAsString()

labelEquals

public boolean labelEquals(java.lang.String name)

holdsType

public boolean holdsType(java.lang.String type)

getColour

public java.awt.Color getColour()

isProtein

public boolean isProtein()
Default is false


addComment

protected void addComment(java.lang.String comment)

getComments

protected java.util.Vector getComments()

setIsFirstTier

protected void setIsFirstTier(boolean firstTier)

isFirstTier

public boolean isFirstTier()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object