casa
5.7.0-16
|
Abstract class for drawing grids, axes, ticks and tick labels on a WorldCanvas. More...
#include <WCAxisLabeller.h>
Public Member Functions | |
WCAxisLabeller () | |
Constructor. More... | |
virtual | ~WCAxisLabeller () |
Destructor. More... | |
virtual casacore::Bool | draw (const WCRefreshEvent &ev)=0 |
Draw axis labels for the provided WorldCanvas refresh event. More... | |
virtual void | invalidate () |
Invalidate any cached drawings. More... | |
virtual void | setDefaultOptions () |
install the default options for this DisplayData More... | |
virtual casacore::Bool | setOptions (const casacore::Record &rec, casacore::Record &updatedOptions) |
apply options stored in rec to the DisplayData; return value true means a refresh is needed. More... | |
virtual casacore::Record | getOptions () const |
retrieve the current and default options and parameter types. More... | |
virtual casacore::Bool | setAxisLabelSwitch (const casacore::Bool labelswitch=false) |
set/return whether labelling is on or off. More... | |
virtual casacore::Bool | axisLabelSwitch () const |
virtual void | setSubstituteTitleText (const casacore::String substituteImageName) |
set/return the title text. More... | |
virtual casacore::String | titleText () const |
virtual casacore::String | displayedTitleText () const |
virtual casacore::Bool | setTitleTextColor (const casacore::String color=casacore::String("foreground")) |
set/return the color of the title text. More... | |
virtual casacore::String | titleTextColor () const |
virtual casacore::Bool | setXAxisText (const casacore::String text=casacore::String("")) |
set/return the X and Y label text. More... | |
virtual casacore::Bool | setYAxisText (const casacore::String text=casacore::String("")) |
virtual casacore::Bool | unsetXAxisText () |
virtual casacore::Bool | unsetYAxisText () |
virtual casacore::String | xAxisText () const |
virtual casacore::String | yAxisText () const |
virtual casacore::Bool | isXAxisTextUnset () const |
virtual casacore::Bool | isYAxisTextUnset () const |
virtual casacore::Bool | setXAxisTextColor (const casacore::String color=casacore::String("foreground")) |
set/return the color of the label text. More... | |
virtual casacore::Bool | setYAxisTextColor (const casacore::String color=casacore::String("foreground")) |
virtual casacore::String | xAxisTextColor () const |
virtual casacore::String | yAxisTextColor () const |
virtual casacore::Bool | setXGridType (const casacore::String type=casacore::String("None")) |
set/return what type of grid is marked in each direction. More... | |
virtual casacore::Bool | setYGridType (const casacore::String type=casacore::String("None")) |
virtual casacore::String | xGridType () const |
virtual casacore::String | yGridType () const |
virtual casacore::Bool | setXGridColor (const casacore::String color=casacore::String("foreground")) |
set/return the color of the grid lines per direction. More... | |
virtual casacore::Bool | setYGridColor (const casacore::String color=casacore::String("foreground")) |
virtual casacore::String | xGridColor () const |
virtual casacore::String | yGridColor () const |
virtual casacore::Bool | setTickLength (const casacore::Float length=4.0) |
set/return the tick length in millimetres. More... | |
virtual casacore::Float | tickLength () const |
virtual casacore::Bool | setLabelPosition (const casacore::String position=casacore::String("Auto")) |
set/return the position of World label strings More... | |
virtual casacore::String | labelPosition () const |
virtual casacore::Bool | setPlotOutline (const casacore::Bool outline=true) |
set/return whether there is a plot outline or not. More... | |
virtual casacore::Bool | plotOutline () const |
virtual casacore::Bool | setPlotOutlineColor (const casacore::String color=casacore::String("foreground")) |
set/return the color used for the plot outline. More... | |
virtual casacore::String | plotOutlineColor () const |
virtual casacore::Bool | setCharSize (const casacore::Float size=1.2) |
set/return the char size for the plot graphics More... | |
virtual casacore::Float | charSize () const |
virtual casacore::Bool | setCharFont (const casacore::String font="normal") |
set/return the char font for the plot graphics More... | |
virtual casacore::String | charFont () const |
virtual casacore::Bool | setLineWidth (const casacore::Float width=0.0) |
set/return the line width for the plot graphics. More... | |
virtual casacore::Float | lineWidth () const |
Public Member Functions inherited from casa::DisplayOptions | |
DisplayOptions () | |
Constructor. More... | |
virtual | ~DisplayOptions () |
Destructor. More... | |
template<class T > | |
casacore::Bool | readOptionRecord (casacore::Vector< T > &target, casacore::Bool &error, const casacore::Record &rec, const casacore::String &fieldname) const |
Find the field fieldname in casacore::Record rec , containing the requested type (casacore::Bool, casacore::String, casacore::Float, casacore::Int) in itself or its "value" sub-field, and return the value in target . More... | |
template<class T > | |
casacore::Bool | readOptionRecord (T &target, casacore::Bool &error, const casacore::Record &rec, const casacore::String &fieldname) const |
virtual casacore::Bool | readOptionRecord (casacore::String &target, casacore::Bool &unsetTarget, casacore::Bool &error, const casacore::Record &rec, const casacore::String &fieldname) const |
Find the field fieldname in casacore::Record rec , containing the requested type (casacore::String) in itself or its "value" sub-field, and return the value in target . More... | |
casacore::Record | unset () const |
Return a casacore::Record which is an "unset" casacore::Record, ie. More... | |
casacore::Bool | isUnset (const casacore::Record &rec) const |
Return true or false indicating if the provided casacore::Record is equal to an "unset" Record. More... | |
Static Public Attributes | |
static const casacore::String | LABEL_CHAR_SIZE |
static const casacore::String | PLOT_TITLE |
Protected Attributes | |
casacore::Bool | titleChanged |
Additional Inherited Members | |
Protected Member Functions inherited from casa::DisplayOptions | |
DisplayOptions (const DisplayOptions &other) | |
(Required) copy constructor. More... | |
void | operator= (const DisplayOptions &other) |
(Required) copy assignment. More... | |
Abstract class for drawing grids, axes, ticks and tick labels on a WorldCanvas.
Internal
WCAxisLabeller stands for WorldCanvas Axis Labeller
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.
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.
Definition at line 84 of file WCAxisLabeller.h.
casa::WCAxisLabeller::WCAxisLabeller | ( | ) |
Constructor.
|
virtual |
Destructor.
|
inlinevirtual |
Definition at line 118 of file WCAxisLabeller.h.
References itsOptionsAxisLabelSwitch.
|
inlinevirtual |
Definition at line 253 of file WCAxisLabeller.h.
References itsOptionsCharFont.
|
inlinevirtual |
Definition at line 245 of file WCAxisLabeller.h.
References itsOptionsCharSize.
|
inlinevirtual |
Definition at line 131 of file WCAxisLabeller.h.
References itsOptionsTitleText, casacore::String::length(), and substituteTitleText.
|
pure virtual |
Draw axis labels for the provided WorldCanvas refresh event.
Implemented in casa::WCCSNLAxisLabeller.
|
virtual |
retrieve the current and default options and parameter types.
Reimplemented in casa::WCCSAxisLabeller, and casa::WCCSNLAxisLabeller.
|
inlinevirtual |
Invalidate any cached drawings.
Reimplemented in casa::WCCSNLAxisLabeller.
Definition at line 98 of file WCAxisLabeller.h.
|
inlinevirtual |
Definition at line 158 of file WCAxisLabeller.h.
References itsOptionsXAxisTextUnset.
|
inlinevirtual |
Definition at line 161 of file WCAxisLabeller.h.
References itsOptionsYAxisTextUnset.
|
inlinevirtual |
Definition at line 217 of file WCAxisLabeller.h.
References itsOptionsLabelPos.
|
inlinevirtual |
Definition at line 266 of file WCAxisLabeller.h.
References itsOptionsLineWidth.
|
inlinevirtual |
Definition at line 227 of file WCAxisLabeller.h.
References itsOptionsPlotOutline.
|
inlinevirtual |
Definition at line 237 of file WCAxisLabeller.h.
References itsOptionsPlotOutlineColor.
|
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 |
set/return the char font for the plot graphics
|
virtual |
set/return the char size for the plot graphics
|
virtual |
install the default options for this DisplayData
Reimplemented in casa::WCCSAxisLabeller, and casa::WCCSNLAxisLabeller.
|
virtual |
set/return the position of World label strings
|
virtual |
set/return the line width for the plot graphics.
|
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 |
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 |
set/return the color used for the plot outline.
If true is returned from the set function, then a refresh should be enacted.
|
virtual |
set/return the title text.
If true is returned from the set function then a refresh is required.
virtual casacore::Bool setTitleText(const casacore::String text = casacore::String(""));
|
virtual |
set/return the tick length in millimetres.
If true is returned from the set function, then a refresh is probably needed.
|
virtual |
set/return the color of the title text.
If true is returned from the set function, then a refresh should be called.
|
virtual |
set/return the X and Y label text.
If true is returned from the set functions, then a refresh is needed.
|
virtual |
set/return the color of the label text.
If true is returned from the set function, then a refresh is needed.
|
virtual |
set/return the color of the grid lines per direction.
If true is returned from the set functions, a refresh is needed.
|
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 |
|
virtual |
|
virtual |
|
virtual |
|
inlinevirtual |
Definition at line 209 of file WCAxisLabeller.h.
References itsOptionsTickLength.
|
inlinevirtual |
Definition at line 128 of file WCAxisLabeller.h.
References itsOptionsTitleText.
|
inlinevirtual |
Definition at line 144 of file WCAxisLabeller.h.
References itsOptionsTitleTextColor.
|
virtual |
|
virtual |
|
virtual |
Reimplemented in casa::WCCSAxisLabeller.
|
inlinevirtual |
Definition at line 171 of file WCAxisLabeller.h.
References itsOptionsXAxisTextColor.
|
inlinevirtual |
Definition at line 197 of file WCAxisLabeller.h.
References itsOptionsXGridColor.
|
inlinevirtual |
Definition at line 184 of file WCAxisLabeller.h.
References itsOptionsXGridType.
|
virtual |
Reimplemented in casa::WCCSAxisLabeller.
|
inlinevirtual |
Definition at line 174 of file WCAxisLabeller.h.
References itsOptionsYAxisTextColor.
|
inlinevirtual |
Definition at line 200 of file WCAxisLabeller.h.
References itsOptionsYGridColor.
|
inlinevirtual |
Definition at line 187 of file WCAxisLabeller.h.
References itsOptionsYGridType.
|
private |
Definition at line 328 of file WCAxisLabeller.h.
|
private |
defaults for on/off switch and character size (from.aipsrc, if they exist there).
Definition at line 327 of file WCAxisLabeller.h.
|
private |
global switch on or off
Definition at line 280 of file WCAxisLabeller.h.
Referenced by axisLabelSwitch().
|
private |
|
private |
|
private |
|
private |
plot line width
casacore::Int itsOptionsLineWidth;
Definition at line 323 of file WCAxisLabeller.h.
Referenced by lineWidth().
|
private |
|
private |
plot outline color
Definition at line 313 of file WCAxisLabeller.h.
Referenced by plotOutlineColor().
|
private |
|
private |
display title text
Definition at line 283 of file WCAxisLabeller.h.
Referenced by displayedTitleText(), and titleText().
|
private |
|
private |
display axes label text
Definition at line 289 of file WCAxisLabeller.h.
|
private |
|
private |
are the above unset
Definition at line 292 of file WCAxisLabeller.h.
Referenced by isXAxisTextUnset().
|
private |
|
private |
|
private |
Definition at line 289 of file WCAxisLabeller.h.
|
private |
Definition at line 295 of file WCAxisLabeller.h.
Referenced by yAxisTextColor().
|
private |
Definition at line 292 of file WCAxisLabeller.h.
Referenced by isYAxisTextUnset().
|
private |
Definition at line 301 of file WCAxisLabeller.h.
Referenced by yGridColor().
|
private |
Definition at line 298 of file WCAxisLabeller.h.
Referenced by yGridType().
|
static |
Definition at line 271 of file WCAxisLabeller.h.
|
static |
Definition at line 272 of file WCAxisLabeller.h.
|
private |
Definition at line 329 of file WCAxisLabeller.h.
Referenced by displayedTitleText().
|
protected |
Definition at line 275 of file WCAxisLabeller.h.