com.compomics.util.gui.spectrum
Class ReferenceArea

java.lang.Object
  extended by com.compomics.util.gui.spectrum.ReferenceArea

public class ReferenceArea
extends java.lang.Object

A reference area to be added to a GraphicsPanel.

Author:
Harald Barsnes.

Constructor Summary
ReferenceArea(java.lang.String label, double start, double end, java.awt.Color areaColor, float alpha, boolean drawOnTop, boolean drawLabel)
          Creates a new ReferenceArea
 
Method Summary
 boolean drawLabel()
          Returns true if the label is to be drawn, false otherwise.
 boolean drawOnTop()
          Returns true if the area is to be drawn in front of the data, false otherwise.
 float getAlpha()
          Get the alpha level (transparency).
 java.awt.Color getAreaColor()
          Get the area color.
 double getEnd()
          Get the end value.
 java.lang.String getLabel()
          Returns the label.
 double getStart()
          Get the start value.
 void setAlpha(float alpha)
          Set the alpha level (transparency).
 void setAreaColor(java.awt.Color areaColor)
          Set the area color.
 void setDrawLabel(boolean drawLabel)
          Set to true if the label is to be drawn, false otherwise.
 void setDrawOnTop(boolean drawOnTop)
          Set to true if the area is to be drawn in front of the data, false otherwise.
 void setEnd(double end)
          Set the end value.
 void setLabel(java.lang.String label)
          Sets the label,
 void setStart(double start)
          Set the start value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferenceArea

public ReferenceArea(java.lang.String label,
                     double start,
                     double end,
                     java.awt.Color areaColor,
                     float alpha,
                     boolean drawOnTop,
                     boolean drawLabel)
              throws java.lang.IllegalArgumentException
Creates a new ReferenceArea

Parameters:
label - the reference label
start - the start of the reference area
end - the end of the reference area
areaColor - the color of the reference area
alpha - the alpha level (transparency) of the reference area
drawOnTop - if the area is to be drawn on top of or behind the data
drawLabel - if the label is to be drawn or not
Throws:
java.lang.IllegalArgumentException - alpha must be in the range 0.0f to 1.0f
Method Detail

getLabel

public java.lang.String getLabel()
Returns the label.

Returns:
the label

setLabel

public void setLabel(java.lang.String label)
Sets the label,

Parameters:
label - the label to set

getStart

public double getStart()
Get the start value.

Returns:
the start

setStart

public void setStart(double start)
Set the start value.

Parameters:
start - the start to set

getEnd

public double getEnd()
Get the end value.

Returns:
the end

setEnd

public void setEnd(double end)
Set the end value.

Parameters:
end - the end to set

getAreaColor

public java.awt.Color getAreaColor()
Get the area color.

Returns:
the areaColor

setAreaColor

public void setAreaColor(java.awt.Color areaColor)
Set the area color.

Parameters:
areaColor - the areaColor to set

getAlpha

public float getAlpha()
Get the alpha level (transparency).

Returns:
the alpha level

setAlpha

public void setAlpha(float alpha)
Set the alpha level (transparency).

Parameters:
alpha - the alpha level to set

drawOnTop

public boolean drawOnTop()
Returns true if the area is to be drawn in front of the data, false otherwise.

Returns:
true if the area is to be drawn in front of the data, false otherwise

setDrawOnTop

public void setDrawOnTop(boolean drawOnTop)
Set to true if the area is to be drawn in front of the data, false otherwise.

Parameters:
drawOnTop - if the area is to be drawn in front of the data

drawLabel

public boolean drawLabel()
Returns true if the label is to be drawn, false otherwise.

Returns:
true if the label is to be drawn, false otherwise

setDrawLabel

public void setDrawLabel(boolean drawLabel)
Set to true if the label is to be drawn, false otherwise.

Parameters:
drawLabel - if the label is to be drawn


Copyright © 2011. All Rights Reserved.