Package adams.gui.visualization.sequence
Class XYSequenceContainer
- java.lang.Object
-
- adams.gui.visualization.container.AbstractContainer
-
- adams.gui.visualization.sequence.XYSequenceContainer
-
- All Implemented Interfaces:
IDHandler,MutableIDHandler,ColorContainer,NamedContainer,VisibilityContainer,Serializable,Comparable<AbstractContainer>
- Direct Known Subclasses:
SequencePlotContainer
public class XYSequenceContainer extends AbstractContainer implements ColorContainer, VisibilityContainer, NamedContainer
A container class for an XY sequence.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Colorm_Colorthe associated color.protected booleanm_Visiblewhether the sequence is visible.-
Fields inherited from class adams.gui.visualization.container.AbstractContainer
m_Manager, m_Payload, m_Updating
-
-
Constructor Summary
Constructors Constructor Description XYSequenceContainer(XYSequenceContainerManager manager, XYSequence data)Initializes the container.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassign(XYSequenceContainer c)Updates itself with the values from given container (the manager is excluded!).intcompareTo(AbstractContainer o)Compares this object with the specified object for order.ColorgetColor()Returns the current color in use.XYSequencegetData()Returns the stored sequence.StringgetDisplayID()Returns the displayed container's ID.StringgetID()Returns the container's ID.inthashCode()Returns the hashcode of the sequence.protected voidinitialize()Initializes members.booleanisVisible()Returns whether the sequence is visible.voidsetColor(Color value)Sets the color to use.voidsetData(XYSequence value)Sets the sequence.voidsetID(String value)Sets the container's ID.voidsetVisible(boolean value)Sets the sequence's visibility.StringtoString()Returns a short string representation of the container.-
Methods inherited from class adams.gui.visualization.container.AbstractContainer
assign, copy, equals, getManager, getPayload, invalidate, postProcessPayload, setManager, setPayload
-
-
-
-
Field Detail
-
m_Color
protected Color m_Color
the associated color.
-
m_Visible
protected boolean m_Visible
whether the sequence is visible.
-
-
Constructor Detail
-
XYSequenceContainer
public XYSequenceContainer(XYSequenceContainerManager manager, XYSequence data)
Initializes the container.- Parameters:
manager- the owning managerdata- the sequence to encapsulate
-
-
Method Detail
-
initialize
protected void initialize()
Initializes members.- Overrides:
initializein classAbstractContainer
-
assign
public void assign(XYSequenceContainer c)
Updates itself with the values from given container (the manager is excluded!).- Parameters:
c- the container to get the values from
-
setColor
public void setColor(Color value)
Sets the color to use.- Specified by:
setColorin interfaceColorContainer- Parameters:
value- the color
-
getColor
public Color getColor()
Returns the current color in use.- Specified by:
getColorin interfaceColorContainer- Returns:
- the color
-
setVisible
public void setVisible(boolean value)
Sets the sequence's visibility.- Specified by:
setVisiblein interfaceVisibilityContainer- Parameters:
value- if true then the sequence will be visible
-
isVisible
public boolean isVisible()
Returns whether the sequence is visible.- Specified by:
isVisiblein interfaceVisibilityContainer- Returns:
- true if the sequence is visible
-
setData
public void setData(XYSequence value)
Sets the sequence.- Parameters:
value- the sequence
-
getData
public XYSequence getData()
Returns the stored sequence.- Returns:
- the sequence
-
setID
public void setID(String value)
Sets the container's ID.- Specified by:
setIDin interfaceMutableIDHandler- Specified by:
setIDin interfaceNamedContainer- Parameters:
value- the new ID
-
getID
public String getID()
Returns the container's ID.- Specified by:
getIDin interfaceIDHandler- Specified by:
getIDin interfaceNamedContainer- Returns:
- the ID
-
getDisplayID
public String getDisplayID()
Returns the displayed container's ID.- Specified by:
getDisplayIDin interfaceNamedContainer- Returns:
- the displayed ID
-
compareTo
public int compareTo(AbstractContainer o)
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.- Specified by:
compareToin interfaceComparable<AbstractContainer>- Overrides:
compareToin classAbstractContainer- Parameters:
o- the object to be compared.- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
- Throws:
ClassCastException- if the specified object's type prevents it from being compared to this object.
-
hashCode
public int hashCode()
Returns the hashcode of the sequence.
-
toString
public String toString()
Returns a short string representation of the container.- Overrides:
toStringin classAbstractContainer- Returns:
- a string representation
-
-