casa
$Rev:20696$
|
Abstract class for drawing grids, axes, ticks and tick labels on a WorldCanvas. More...
#include <WCAxisLabeller.h>
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 Bool | setTitleText (const String text=String("")) |
set/return the title text. | |
virtual String | titleText () 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 |
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 |
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.
Constructor.
virtual casa::WCAxisLabeller::~WCAxisLabeller | ( | ) | [virtual] |
Destructor.
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 229 of file WCAxisLabeller.h.
References itsOptionsCharFont.
virtual Float casa::WCAxisLabeller::charSize | ( | ) | const [inline, virtual] |
Definition at line 222 of file WCAxisLabeller.h.
References itsOptionsCharSize.
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 147 of file WCAxisLabeller.h.
References itsOptionsXAxisTextUnset.
virtual Bool casa::WCAxisLabeller::isYAxisTextUnset | ( | ) | const [inline, virtual] |
Definition at line 149 of file WCAxisLabeller.h.
References itsOptionsYAxisTextUnset.
virtual String casa::WCAxisLabeller::labelPosition | ( | ) | const [inline, virtual] |
Definition at line 197 of file WCAxisLabeller.h.
References itsOptionsLabelPos.
virtual Float casa::WCAxisLabeller::lineWidth | ( | ) | const [inline, virtual] |
Definition at line 241 of file WCAxisLabeller.h.
References itsOptionsLineWidth.
virtual Bool casa::WCAxisLabeller::plotOutline | ( | ) | const [inline, virtual] |
Definition at line 206 of file WCAxisLabeller.h.
References itsOptionsPlotOutline.
virtual String casa::WCAxisLabeller::plotOutlineColor | ( | ) | const [inline, virtual] |
Definition at line 215 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 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::setTitleText | ( | const String | text = String("") | ) | [virtual] |
set/return the title text.
If True is returned from the set function then a refresh is required.
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 190 of file WCAxisLabeller.h.
References itsOptionsTickLength.
virtual String casa::WCAxisLabeller::titleText | ( | ) | const [inline, virtual] |
Definition at line 126 of file WCAxisLabeller.h.
References itsOptionsTitleText.
virtual String casa::WCAxisLabeller::titleTextColor | ( | ) | const [inline, virtual] |
Definition at line 134 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 158 of file WCAxisLabeller.h.
References itsOptionsXAxisTextColor.
virtual String casa::WCAxisLabeller::xGridColor | ( | ) | const [inline, virtual] |
Definition at line 180 of file WCAxisLabeller.h.
References itsOptionsXGridColor.
virtual String casa::WCAxisLabeller::xGridType | ( | ) | const [inline, virtual] |
Definition at line 169 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 160 of file WCAxisLabeller.h.
References itsOptionsYAxisTextColor.
virtual String casa::WCAxisLabeller::yGridColor | ( | ) | const [inline, virtual] |
Definition at line 182 of file WCAxisLabeller.h.
References itsOptionsYGridColor.
virtual String casa::WCAxisLabeller::yGridType | ( | ) | const [inline, virtual] |
Definition at line 171 of file WCAxisLabeller.h.
References itsOptionsYGridType.
Definition at line 298 of file WCAxisLabeller.h.
Bool casa::WCAxisLabeller::itsDefaultSwitch [private] |
defaults for on/off switch and character size (from .aipsrc, if they exist there).
Definition at line 297 of file WCAxisLabeller.h.
global switch on or off
Definition at line 250 of file WCAxisLabeller.h.
Referenced by axisLabelSwitch().
plot line width Int itsOptionsLineWidth;
Definition at line 293 of file WCAxisLabeller.h.
Referenced by lineWidth().
plot outline color
Definition at line 283 of file WCAxisLabeller.h.
Referenced by plotOutlineColor().
display axes label text
Definition at line 259 of file WCAxisLabeller.h.
are the above unset
Definition at line 262 of file WCAxisLabeller.h.
Referenced by isXAxisTextUnset().
Definition at line 259 of file WCAxisLabeller.h.
Definition at line 265 of file WCAxisLabeller.h.
Referenced by yAxisTextColor().
Definition at line 262 of file WCAxisLabeller.h.
Referenced by isYAxisTextUnset().
Definition at line 271 of file WCAxisLabeller.h.
Referenced by yGridColor().
Definition at line 268 of file WCAxisLabeller.h.
Referenced by yGridType().
const String casa::WCAxisLabeller::LABEL_CHAR_SIZE [static] |
Definition at line 245 of file WCAxisLabeller.h.
const String casa::WCAxisLabeller::PLOT_TITLE [static] |
Definition at line 246 of file WCAxisLabeller.h.