casa::WCAxisLabeller Class Reference

Abstract class for drawing grids, axes, ticks and tick labels on a WorldCanvas. More...

#include <WCAxisLabeller.h>

Inheritance diagram for casa::WCAxisLabeller:
casa::DisplayOptions casa::WCCSAxisLabeller casa::WCCSNLAxisLabeller

List of all members.

Public Member Functions

 WCAxisLabeller ()
 Constructor.
virtual ~WCAxisLabeller ()
 Destructor.
virtual Bool draw (const WCRefreshEvent &ev)=0
 Draw axis labels for the provided WorldCanvas refresh event.
virtual void invalidate ()
 Invalidate any cached drawings.
virtual void setDefaultOptions ()
 install the default options for this DisplayData
virtual Bool setOptions (const Record &rec, Record &updatedOptions)
 apply options stored in rec to the DisplayData; return value True means a refresh is needed.
virtual Record getOptions () const
 retrieve the current and default options and parameter types.
virtual Bool setAxisLabelSwitch (const Bool labelswitch=False)
 set/return whether labelling is on or off.
virtual Bool axisLabelSwitch () const
virtual void setSubstituteTitleText (const String substituteImageName)
 set/return the title text.
virtual String titleText () const
virtual String displayedTitleText () const
virtual Bool setTitleTextColor (const String color=String("foreground"))
 set/return the color of the title text.
virtual String titleTextColor () const
virtual Bool setXAxisText (const String text=String(""))
 set/return the X and Y label text.
virtual Bool setYAxisText (const String text=String(""))
virtual Bool unsetXAxisText ()
virtual Bool unsetYAxisText ()
virtual String xAxisText () const
virtual String yAxisText () const
virtual Bool isXAxisTextUnset () const
virtual Bool isYAxisTextUnset () const
virtual Bool setXAxisTextColor (const String color=String("foreground"))
 set/return the color of the label text.
virtual Bool setYAxisTextColor (const String color=String("foreground"))
virtual String xAxisTextColor () const
virtual String yAxisTextColor () const
virtual Bool setXGridType (const String type=String("None"))
 set/return what type of grid is marked in each direction.
virtual Bool setYGridType (const String type=String("None"))
virtual String xGridType () const
virtual String yGridType () const
virtual Bool setXGridColor (const String color=String("foreground"))
 set/return the color of the grid lines per direction.
virtual Bool setYGridColor (const String color=String("foreground"))
virtual String xGridColor () const
virtual String yGridColor () const
virtual Bool setTickLength (const Float length=4.0)
 set/return the tick length in millimetres.
virtual Float tickLength () const
virtual Bool setLabelPosition (const String position=String("Auto"))
 set/return the position of World label strings
virtual String labelPosition () const
virtual Bool setPlotOutline (const Bool outline=True)
 set/return whether there is a plot outline or not.
virtual Bool plotOutline () const
virtual Bool setPlotOutlineColor (const String color=String("foreground"))
 set/return the color used for the plot outline.
virtual String plotOutlineColor () const
virtual Bool setCharSize (const Float size=1.2)
 set/return the char size for the plot graphics
virtual Float charSize () const
virtual Bool setCharFont (const String font="normal")
 set/return the char font for the plot graphics
virtual String charFont () const
virtual Bool setLineWidth (const Float width=0.0)
 set/return the line width for the plot graphics.
virtual Float lineWidth () const

Static Public Attributes

static const String LABEL_CHAR_SIZE
static const String PLOT_TITLE

Protected Attributes

Bool titleChanged

Private Attributes

Bool itsOptionsAxisLabelSwitch
 global switch on or off
String itsOptionsTitleText
 display title text
String itsOptionsTitleTextColor
 title color
String itsOptionsXAxisText
 display axes label text
String itsOptionsYAxisText
Bool itsOptionsXAxisTextUnset
 are the above unset
Bool itsOptionsYAxisTextUnset
String itsOptionsXAxisTextColor
 label text color
String itsOptionsYAxisTextColor
String itsOptionsXGridType
 coordinate grid?
String itsOptionsYGridType
String itsOptionsXGridColor
 coordinate grid colors
String itsOptionsYGridColor
Float itsOptionsTickLength
 tick mark length in mm
String itsOptionsLabelPos
 Label position.
Bool itsOptionsPlotOutline
 plot outline?
String itsOptionsPlotOutlineColor
 plot outline color
Float itsOptionsCharSize
 plot character size
String itsOptionsCharFont
 plot character font
Float itsOptionsLineWidth
 plot line width Int itsOptionsLineWidth;
Bool itsDefaultSwitch
 defaults for on/off switch and character size (from .aipsrc, if they exist there).
Float itsDefaultCharSize
String substituteTitleText

Detailed Description

Abstract class for drawing grids, axes, ticks and tick labels on a WorldCanvas.

Intended use:

Internal

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

WCAxisLabeller stands for WorldCanvas Axis Labeller

Synopsis

This class forms the base for classes which draw axis grids, axes, ticks and tick labels on WorldCanvases. In its present form, it is really a heavily pruned form of the DisplayData.

Example

Motivation

Axis labels are a necessary annotation for meaningful displays of data. This class is motivated by the desire to provide (eventually) many different types of axis labelling.

To Do

Definition at line 84 of file WCAxisLabeller.h.


Constructor & Destructor Documentation

casa::WCAxisLabeller::WCAxisLabeller (  ) 

Constructor.

virtual casa::WCAxisLabeller::~WCAxisLabeller (  )  [virtual]

Destructor.


Member Function Documentation

virtual Bool casa::WCAxisLabeller::axisLabelSwitch (  )  const [inline, virtual]

Definition at line 118 of file WCAxisLabeller.h.

References itsOptionsAxisLabelSwitch.

virtual String casa::WCAxisLabeller::charFont (  )  const [inline, virtual]

Definition at line 253 of file WCAxisLabeller.h.

References itsOptionsCharFont.

virtual Float casa::WCAxisLabeller::charSize (  )  const [inline, virtual]

Definition at line 245 of file WCAxisLabeller.h.

References itsOptionsCharSize.

virtual String casa::WCAxisLabeller::displayedTitleText (  )  const [inline, virtual]

Definition at line 131 of file WCAxisLabeller.h.

References itsOptionsTitleText, String, and substituteTitleText.

virtual Bool casa::WCAxisLabeller::draw ( const WCRefreshEvent ev  )  [pure virtual]

Draw axis labels for the provided WorldCanvas refresh event.

Implemented in casa::WCCSNLAxisLabeller.

virtual Record casa::WCAxisLabeller::getOptions (  )  const [virtual]

retrieve the current and default options and parameter types.

Reimplemented in casa::WCCSAxisLabeller, and casa::WCCSNLAxisLabeller.

virtual void casa::WCAxisLabeller::invalidate (  )  [inline, virtual]

Invalidate any cached drawings.

Reimplemented in casa::WCCSNLAxisLabeller.

Definition at line 98 of file WCAxisLabeller.h.

virtual Bool casa::WCAxisLabeller::isXAxisTextUnset (  )  const [inline, virtual]

Definition at line 158 of file WCAxisLabeller.h.

References itsOptionsXAxisTextUnset.

virtual Bool casa::WCAxisLabeller::isYAxisTextUnset (  )  const [inline, virtual]

Definition at line 161 of file WCAxisLabeller.h.

References itsOptionsYAxisTextUnset.

virtual String casa::WCAxisLabeller::labelPosition (  )  const [inline, virtual]

Definition at line 217 of file WCAxisLabeller.h.

References itsOptionsLabelPos.

virtual Float casa::WCAxisLabeller::lineWidth (  )  const [inline, virtual]

Definition at line 266 of file WCAxisLabeller.h.

References itsOptionsLineWidth.

virtual Bool casa::WCAxisLabeller::plotOutline (  )  const [inline, virtual]

Definition at line 227 of file WCAxisLabeller.h.

References itsOptionsPlotOutline.

virtual String casa::WCAxisLabeller::plotOutlineColor (  )  const [inline, virtual]

Definition at line 237 of file WCAxisLabeller.h.

References itsOptionsPlotOutlineColor.

virtual Bool casa::WCAxisLabeller::setAxisLabelSwitch ( const Bool  labelswitch = False  )  [virtual]

set/return whether labelling is on or off.

This is a global switch. If True is returned from the set function, then a refresh is required.

virtual Bool casa::WCAxisLabeller::setCharFont ( const String  font = "normal"  )  [virtual]

set/return the char font for the plot graphics

virtual Bool casa::WCAxisLabeller::setCharSize ( const Float  size = 1.2  )  [virtual]

set/return the char size for the plot graphics

virtual void casa::WCAxisLabeller::setDefaultOptions (  )  [virtual]

install the default options for this DisplayData

Reimplemented in casa::WCCSAxisLabeller, and casa::WCCSNLAxisLabeller.

virtual Bool casa::WCAxisLabeller::setLabelPosition ( const String  position = String("Auto")  )  [virtual]

set/return the position of World label strings

virtual Bool casa::WCAxisLabeller::setLineWidth ( const Float  width = 0.0  )  [virtual]

set/return the line width for the plot graphics.

virtual Bool casa::WCAxisLabeller::setOptions ( const Record &  rec,
Record &  updatedOptions 
) [virtual]

apply options stored in rec to the DisplayData; return value True means a refresh is needed.

Any fields added to the updatedOptions argument are options which have changed in some way due to the setting of other options - ie. they are context sensitive.

Reimplemented in casa::WCCSAxisLabeller, and casa::WCCSNLAxisLabeller.

virtual Bool casa::WCAxisLabeller::setPlotOutline ( const Bool  outline = True  )  [virtual]

set/return whether there is a plot outline or not.

If True is returned from the set function, then a refresh is probably needed.

virtual Bool casa::WCAxisLabeller::setPlotOutlineColor ( const String  color = String("foreground")  )  [virtual]

set/return the color used for the plot outline.

If True is returned from the set function, then a refresh should be enacted.

virtual void casa::WCAxisLabeller::setSubstituteTitleText ( const String  substituteImageName  )  [virtual]

set/return the title text.

If True is returned from the set function then a refresh is required.

virtual Bool setTitleText(const String text = String(""));

virtual Bool casa::WCAxisLabeller::setTickLength ( const Float  length = 4.0  )  [virtual]

set/return the tick length in millimetres.

If True is returned from the set function, then a refresh is probably needed.

virtual Bool casa::WCAxisLabeller::setTitleTextColor ( const String  color = String("foreground")  )  [virtual]

set/return the color of the title text.

If True is returned from the set function, then a refresh should be called.

virtual Bool casa::WCAxisLabeller::setXAxisText ( const String  text = String("")  )  [virtual]

set/return the X and Y label text.

If True is returned from the set functions, then a refresh is needed.

virtual Bool casa::WCAxisLabeller::setXAxisTextColor ( const String  color = String("foreground")  )  [virtual]

set/return the color of the label text.

If True is returned from the set function, then a refresh is needed.

virtual Bool casa::WCAxisLabeller::setXGridColor ( const String  color = String("foreground")  )  [virtual]

set/return the color of the grid lines per direction.

If True is returned from the set functions, a refresh is needed.

virtual Bool casa::WCAxisLabeller::setXGridType ( const String  type = String("None")  )  [virtual]

set/return what type of grid is marked in each direction.

If True is returned from the set functions, a refresh is needed.

virtual Bool casa::WCAxisLabeller::setYAxisText ( const String  text = String("")  )  [virtual]
virtual Bool casa::WCAxisLabeller::setYAxisTextColor ( const String  color = String("foreground")  )  [virtual]
virtual Bool casa::WCAxisLabeller::setYGridColor ( const String  color = String("foreground")  )  [virtual]
virtual Bool casa::WCAxisLabeller::setYGridType ( const String  type = String("None")  )  [virtual]
virtual Float casa::WCAxisLabeller::tickLength (  )  const [inline, virtual]

Definition at line 209 of file WCAxisLabeller.h.

References itsOptionsTickLength.

virtual String casa::WCAxisLabeller::titleText (  )  const [inline, virtual]

Definition at line 128 of file WCAxisLabeller.h.

References itsOptionsTitleText.

virtual String casa::WCAxisLabeller::titleTextColor (  )  const [inline, virtual]

Definition at line 144 of file WCAxisLabeller.h.

References itsOptionsTitleTextColor.

virtual Bool casa::WCAxisLabeller::unsetXAxisText (  )  [virtual]
virtual Bool casa::WCAxisLabeller::unsetYAxisText (  )  [virtual]
virtual String casa::WCAxisLabeller::xAxisText (  )  const [virtual]

Reimplemented in casa::WCCSAxisLabeller.

virtual String casa::WCAxisLabeller::xAxisTextColor (  )  const [inline, virtual]

Definition at line 171 of file WCAxisLabeller.h.

References itsOptionsXAxisTextColor.

virtual String casa::WCAxisLabeller::xGridColor (  )  const [inline, virtual]

Definition at line 197 of file WCAxisLabeller.h.

References itsOptionsXGridColor.

virtual String casa::WCAxisLabeller::xGridType (  )  const [inline, virtual]

Definition at line 184 of file WCAxisLabeller.h.

References itsOptionsXGridType.

virtual String casa::WCAxisLabeller::yAxisText (  )  const [virtual]

Reimplemented in casa::WCCSAxisLabeller.

virtual String casa::WCAxisLabeller::yAxisTextColor (  )  const [inline, virtual]

Definition at line 174 of file WCAxisLabeller.h.

References itsOptionsYAxisTextColor.

virtual String casa::WCAxisLabeller::yGridColor (  )  const [inline, virtual]

Definition at line 200 of file WCAxisLabeller.h.

References itsOptionsYGridColor.

virtual String casa::WCAxisLabeller::yGridType (  )  const [inline, virtual]

Definition at line 187 of file WCAxisLabeller.h.

References itsOptionsYGridType.


Member Data Documentation

Definition at line 328 of file WCAxisLabeller.h.

defaults for on/off switch and character size (from .aipsrc, if they exist there).

Definition at line 327 of file WCAxisLabeller.h.

global switch on or off

Definition at line 280 of file WCAxisLabeller.h.

Referenced by axisLabelSwitch().

plot character font

Definition at line 319 of file WCAxisLabeller.h.

Referenced by charFont().

plot character size

Definition at line 316 of file WCAxisLabeller.h.

Referenced by charSize().

Label position.

Definition at line 307 of file WCAxisLabeller.h.

Referenced by labelPosition().

plot line width Int itsOptionsLineWidth;

Definition at line 323 of file WCAxisLabeller.h.

Referenced by lineWidth().

plot outline?

Definition at line 310 of file WCAxisLabeller.h.

Referenced by plotOutline().

plot outline color

Definition at line 313 of file WCAxisLabeller.h.

Referenced by plotOutlineColor().

tick mark length in mm

Definition at line 304 of file WCAxisLabeller.h.

Referenced by tickLength().

display title text

Definition at line 283 of file WCAxisLabeller.h.

Referenced by displayedTitleText(), and titleText().

title color

Definition at line 286 of file WCAxisLabeller.h.

Referenced by titleTextColor().

display axes label text

Definition at line 289 of file WCAxisLabeller.h.

label text color

Definition at line 295 of file WCAxisLabeller.h.

Referenced by xAxisTextColor().

are the above unset

Definition at line 292 of file WCAxisLabeller.h.

Referenced by isXAxisTextUnset().

coordinate grid colors

Definition at line 301 of file WCAxisLabeller.h.

Referenced by xGridColor().

coordinate grid?

Definition at line 298 of file WCAxisLabeller.h.

Referenced by xGridType().

Definition at line 289 of file WCAxisLabeller.h.

Definition at line 295 of file WCAxisLabeller.h.

Referenced by yAxisTextColor().

Definition at line 292 of file WCAxisLabeller.h.

Referenced by isYAxisTextUnset().

Definition at line 301 of file WCAxisLabeller.h.

Referenced by yGridColor().

Definition at line 298 of file WCAxisLabeller.h.

Referenced by yGridType().

Definition at line 271 of file WCAxisLabeller.h.

const String casa::WCAxisLabeller::PLOT_TITLE [static]

Definition at line 272 of file WCAxisLabeller.h.

Definition at line 329 of file WCAxisLabeller.h.

Referenced by displayedTitleText().

Definition at line 275 of file WCAxisLabeller.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1