Interface and simple implementation of axis labelling. More...
#include <AxesDisplayData.h>
Public Member Functions | |
AxesDisplayData () | |
Constructor. | |
virtual | ~AxesDisplayData () |
Destructor. | |
virtual void | setDefaultOptions () |
Install the default options for this DisplayData. | |
virtual Bool | setOptions (Record &rec, Record &recOut) |
Apply options stored in rec to the DisplayData. | |
virtual Record | getOptions (bool scrub=false) const |
Retrieve the current and default options and parameter types. | |
virtual Display::DisplayDataType | classType () |
Return the type of this DisplayData. | |
virtual CachingDisplayMethod * | newDisplayMethod (WorldCanvas *worldCanvas, AttributeBuffer *wchAttributes, AttributeBuffer *ddAttributes, CachingDisplayData *dd) |
Create a new AxesDisplayMethod for drawing on the given WorldCanvas when the AttributeBuffers are suitably matched to the current state of this DisplayData and of the WorldCanvas/Holder. | |
virtual AttributeBuffer | optionsAsAttributes () |
Return the current options of this DisplayData as an AttributeBuffer. | |
virtual String | titleText () const |
Get the title text for labelling. | |
virtual String | xAxisText (const WorldCanvas *wc=0) const |
Get the X and Y axis text Strings for labelling. | |
virtual String | yAxisText (const WorldCanvas *wc=0) const |
virtual String | xGridType () const |
Get what type of grid should be marked in each direction. | |
virtual String | yGridType () const |
virtual String | titleTextColor () const |
Get the color to use for the title text, the X axis text, and the Y axis text labels. | |
virtual String | xAxisColor () const |
virtual String | yAxisColor () const |
virtual Float | lineWidth () const |
Get the line width for labelling. | |
virtual String | charFont () const |
Get the character font for labelling. | |
virtual Float | charSize () const |
Get the character size for labelling. | |
virtual String | outlineColor () const |
Get the color of the plot outline. | |
Static Public Attributes | |
static const float | AXIS_LABEL_DEFAULT_CHAR_SIZE |
Protected Member Functions | |
AxesDisplayData (const AxesDisplayData &other) | |
(Required) copy constructor. | |
void | operator= (const AxesDisplayData &other) |
(Required) copy assignment. | |
Private Attributes | |
DParameterString * | itsParamTitleText |
display title text | |
DParameterString * | itsParamXAxisText |
Store for X axis label text String. | |
DParameterString * | itsParamYAxisText |
Store for Y axis label text String. | |
DParameterChoice * | itsParamXGridType |
coordinate grid? | |
DParameterChoice * | itsParamYGridType |
DParameterColorChoice * | itsParamTitleColor |
title color | |
DParameterColorChoice * | itsParamXAxisColor |
String itsOptionsTitleTextColor;. | |
DParameterColorChoice * | itsParamYAxisColor |
DParameterRange< Float > * | itsParamLineWidth |
String itsOptionsXAxisColor, itsOptionsYAxisColor;. | |
DParameterChoice * | itsParamCharacterFont |
plot character font | |
DParameterRange< Float > * | itsParamCharacterSize |
plot character size | |
DParameterColorChoice * | itsParamOutlineColor |
plot outline color |
Interface and simple implementation of axis labelling.
This class adds to the interface defined by CachingDisplayData to provide the necessary infrastructure for drawing axis labels on WorldCanvases. This class serves as a basic implementation which can (and probably should) be over-written in derived classes.
Definition at line 60 of file AxesDisplayData.h.
casa::AxesDisplayData::AxesDisplayData | ( | ) |
Constructor.
virtual casa::AxesDisplayData::~AxesDisplayData | ( | ) | [virtual] |
Destructor.
casa::AxesDisplayData::AxesDisplayData | ( | const AxesDisplayData & | other | ) | [protected] |
(Required) copy constructor.
virtual String casa::AxesDisplayData::charFont | ( | ) | const [inline, virtual] |
Get the character font for labelling.
Definition at line 144 of file AxesDisplayData.h.
References itsParamCharacterFont, and casa::DParameterChoice::value().
virtual Float casa::AxesDisplayData::charSize | ( | ) | const [inline, virtual] |
Get the character size for labelling.
Definition at line 149 of file AxesDisplayData.h.
References itsParamCharacterSize, and casa::DParameterRange< T >::value().
virtual Display::DisplayDataType casa::AxesDisplayData::classType | ( | ) | [inline, virtual] |
Return the type of this DisplayData.
Implements casa::DisplayData.
Definition at line 83 of file AxesDisplayData.h.
References casa::Display::CanvasAnnotation.
virtual Record casa::AxesDisplayData::getOptions | ( | bool | scrub = false |
) | const [virtual] |
Retrieve the current and default options and parameter types.
Reimplemented from casa::PassiveCachingDD.
Reimplemented in casa::WorldAxesDD.
virtual Float casa::AxesDisplayData::lineWidth | ( | ) | const [inline, virtual] |
Get the line width for labelling.
Definition at line 139 of file AxesDisplayData.h.
References itsParamLineWidth, and casa::DParameterRange< T >::value().
virtual CachingDisplayMethod* casa::AxesDisplayData::newDisplayMethod | ( | WorldCanvas * | worldCanvas, | |
AttributeBuffer * | wchAttributes, | |||
AttributeBuffer * | ddAttributes, | |||
CachingDisplayData * | dd | |||
) | [virtual] |
Create a new AxesDisplayMethod for drawing on the given WorldCanvas when the AttributeBuffers are suitably matched to the current state of this DisplayData and of the WorldCanvas/Holder.
The tag is a unique number used to identify the age of the newly constructed CachingDisplayMethod.
Reimplemented in casa::WorldAxesDD.
void casa::AxesDisplayData::operator= | ( | const AxesDisplayData & | other | ) | [protected] |
(Required) copy assignment.
Reimplemented from casa::PassiveCachingDD.
Reimplemented in casa::WorldAxesDD.
virtual AttributeBuffer casa::AxesDisplayData::optionsAsAttributes | ( | ) | [virtual] |
Return the current options of this DisplayData as an AttributeBuffer.
Reimplemented from casa::PassiveCachingDD.
Reimplemented in casa::WorldAxesDD.
virtual String casa::AxesDisplayData::outlineColor | ( | ) | const [inline, virtual] |
Get the color of the plot outline.
Definition at line 154 of file AxesDisplayData.h.
References itsParamOutlineColor, and casa::DParameterChoice::value().
virtual void casa::AxesDisplayData::setDefaultOptions | ( | ) | [virtual] |
Install the default options for this DisplayData.
Reimplemented from casa::PassiveCachingDD.
Reimplemented in casa::WorldAxesDD.
virtual Bool casa::AxesDisplayData::setOptions | ( | Record & | rec, | |
Record & | recOut | |||
) | [virtual] |
Apply options stored in rec
to the DisplayData.
A return value of True
means a refresh is needed. recOut
contains any fields which were implicitly changed as a result of the call to this function.
Reimplemented from casa::PassiveCachingDD.
Reimplemented in casa::WorldAxesDD.
virtual String casa::AxesDisplayData::titleText | ( | ) | const [inline, virtual] |
Get the title text for labelling.
Definition at line 102 of file AxesDisplayData.h.
References itsParamTitleText, and casa::DParameterString::value().
virtual String casa::AxesDisplayData::titleTextColor | ( | ) | const [inline, virtual] |
Get the color to use for the title text, the X axis text, and the Y axis text labels.
Definition at line 127 of file AxesDisplayData.h.
References itsParamTitleColor, and casa::DParameterChoice::value().
virtual String casa::AxesDisplayData::xAxisColor | ( | ) | const [inline, virtual] |
Definition at line 130 of file AxesDisplayData.h.
References itsParamXAxisColor, and casa::DParameterChoice::value().
virtual String casa::AxesDisplayData::xAxisText | ( | const WorldCanvas * | wc = 0 |
) | const [virtual] |
Get the X and Y axis text Strings for labelling.
a WC can be supplied in order to retrieve default titles from the WC CS.
Reimplemented in casa::WorldAxesDD.
virtual String casa::AxesDisplayData::xGridType | ( | ) | const [inline, virtual] |
Get what type of grid should be marked in each direction.
Definition at line 116 of file AxesDisplayData.h.
References itsParamXGridType, and casa::DParameterChoice::value().
virtual String casa::AxesDisplayData::yAxisColor | ( | ) | const [inline, virtual] |
Definition at line 133 of file AxesDisplayData.h.
References itsParamYAxisColor, and casa::DParameterChoice::value().
virtual String casa::AxesDisplayData::yAxisText | ( | const WorldCanvas * | wc = 0 |
) | const [virtual] |
Reimplemented in casa::WorldAxesDD.
virtual String casa::AxesDisplayData::yGridType | ( | ) | const [inline, virtual] |
Definition at line 119 of file AxesDisplayData.h.
References itsParamYGridType, and casa::DParameterChoice::value().
const float casa::AxesDisplayData::AXIS_LABEL_DEFAULT_CHAR_SIZE [static] |
Definition at line 157 of file AxesDisplayData.h.
DParameterRange<Float>* casa::AxesDisplayData::itsParamCharacterSize [private] |
DParameterRange<Float>* casa::AxesDisplayData::itsParamLineWidth [private] |
String itsOptionsXAxisColor, itsOptionsYAxisColor;.
plot line width
Definition at line 189 of file AxesDisplayData.h.
Referenced by lineWidth().
String itsOptionsTitleTextColor;.
label text color
Definition at line 185 of file AxesDisplayData.h.
Referenced by xAxisColor().
Store for X axis label text String.
Definition at line 172 of file AxesDisplayData.h.
Definition at line 185 of file AxesDisplayData.h.
Referenced by yAxisColor().
Store for Y axis label text String.
Definition at line 175 of file AxesDisplayData.h.
Definition at line 178 of file AxesDisplayData.h.
Referenced by yGridType().