A PointRep class that draws a column to represent the value. More...
#include <ColumnPointRep.h>
Public Member Functions | |
virtual RepBase * | clone () |
The clone function returns an object of its own kind which is a copy of this object at this moment. | |
virtual const Color & | color () const |
Returns the representation's color. | |
ColumnPointRep () | |
The default constructor. | |
ColumnPointRep (const ColumnPointRep &point_rep) | |
The copy constructor. | |
virtual void | displayError (ViewBase &view) |
Display an error message. | |
virtual void | drawProjectedValues (const DataSource *ntuple, TransformBase *transform, ViewBase *view) |
virtual const Color & | getColor () const |
Get the color of the representation. | |
virtual unsigned int | getStyle () const |
Returns the style of the line drawing. | |
const std::string & | getText () const |
Gets the text. | |
virtual const BinToColor * | getValueTransform () const |
Returns the value transform. | |
virtual bool | isSelected () const |
Returns true if representation is in selected state, otherwise returns false . | |
const std::string & | name () const |
Returns the name of the representation. | |
virtual void | setColor (const Color &color) |
Sets the Color. | |
virtual void | setErrorOn (hippodraw::Axes::Type axis, bool yes=true) |
Sets the error display on or off. | |
virtual void | setHighLighted (bool yes) |
Sets the highlighted state of the point representation. | |
virtual void | setSelected (bool yes) |
Sets the selection state of the representation. | |
virtual void | setSize (float value) |
Sets the size of the line drawing and that of the error bar. | |
virtual void | setStyle (unsigned int style) |
Sets the style of the line drawing. | |
void | setText (const std::string &text) |
Sets the text. | |
virtual void | setValueTransform (BinToColor *) |
Sets the value transform. | |
float | size () const |
Returns the size of the representation. | |
virtual bool | uses (hippodraw::Line::Style) const |
Returns true as this class uses hippodraw::Line::Style. | |
virtual bool | uses (Color::Value) const |
Returns true if receiving object uses a Color::Value as a property, otherwise returns false . | |
virtual bool | uses (hippodraw::Symbol::Type) const |
Returns true if receiving object uses a hippodraw::Symbol::Type as a property, otherwise returns false . | |
virtual bool | xError () const |
Returns true if the point representation displays error on the X axis. | |
virtual bool | yError () const |
Returns true if the point representation displays error on the Y axis. | |
~ColumnPointRep () | |
The destructor. |
Protected Member Functions | |
virtual void | drawValues (ViewBase *view) const |
Does the drawing based on the accumulated polyline. |
Protected Attributes | |
Color | m_color |
The color of the representation. | |
bool | m_desel |
A flag to indicate the representation is de-selected. | |
ErrorBarRep * | m_error_rep |
The error bar representation. | |
bool | m_highlite |
Sets the state of highlighting. | |
std::string | m_name |
The name of the representation. | |
float | m_size |
The size of the representation. | |
std::string | m_text |
The text to be displayed before the statistics. | |
std::vector< double > | m_x |
A cache of the points to be drawn along the X axis. | |
std::vector< double > | m_y |
A cache of the points to be drawn along the Y axis. |
Static Protected Attributes | |
static const Color | s_desel_color |
The color of the representation when it is de-selected. |
Private Attributes | |
bool | m_clear_flag |
A flag that the cache has been cleared. | |
hippodraw::Line::Style | m_line_style |
The style currently used. | |
bool | m_y_flag |
The Y error flag. |
A PointRep class that draws a column to represent the value.
The following plot was made using ColumnPointRep.
Definition at line 32 of file ColumnPointRep.h.
ColumnPointRep | ( | ) |
The default constructor.
Definition at line 39 of file ColumnPointRep.cxx.
References PointRepBase::m_error_rep.
Referenced by ColumnPointRep::clone().
ColumnPointRep | ( | const ColumnPointRep & | point_rep | ) |
The copy constructor.
Definition at line 47 of file ColumnPointRep.cxx.
References ColumnPointRep::clone(), ErrorBarRep::clone(), and PointRepBase::m_error_rep.
~ColumnPointRep | ( | ) |
The destructor.
Definition at line 56 of file ColumnPointRep.cxx.
References PointRepBase::m_error_rep.
|
virtual |
The clone function returns an object of its own kind which is a copy of this object at this moment.
Implements PointRepBase.
Reimplemented in FilledColumnPointRep.
Definition at line 61 of file ColumnPointRep.cxx.
References ColumnPointRep::ColumnPointRep().
Referenced by ColumnPointRep::ColumnPointRep().
|
virtualinherited |
Returns the representation's color.
Definition at line 63 of file RepBase.cxx.
References RepBase::m_color, RepBase::m_desel, and RepBase::s_desel_color.
Referenced by ContourPointRep::createContours(), ColorSymbolPointRep::drawProjectedValues(), ColorBoxPointRep::drawProjectedValues(), ErrorBarRep::drawProjectedValues(), SymbolPointRep::drawProjectedValues(), ColumnPointRep::drawValues(), LinePointRep::drawValues(), DataRep::getRepColor(), FilledColumnPointRep::setColor(), and RepBase::setColor().
|
virtualinherited |
Display an error message.
Display an error message instead of drawing a point. This base class implementation displays a message with the name of the RepBase object.
Definition at line 161 of file RepBase.cxx.
References ViewBase::drawText(), RepBase::m_name, and RepBase::m_size.
|
virtual |
Implements RepBase.
Definition at line 118 of file ColumnPointRep.cxx.
References ColumnPointRep::drawValues(), PointRepBase::m_error_rep, ColumnPointRep::m_x, ColumnPointRep::m_y, ColumnPointRep::m_y_flag, Rect::makeInBounds(), RepBase::size(), hippodraw::Axes::X, hippodraw::DataPoint2DTuple::XERR, and hippodraw::Axes::Y.
|
protectedvirtual |
Does the drawing based on the accumulated polyline.
Definition at line 106 of file ColumnPointRep.cxx.
References RepBase::color(), ColumnPointRep::m_line_style, RepBase::m_size, ColumnPointRep::m_x, and ColumnPointRep::m_y.
Referenced by ColumnPointRep::drawProjectedValues().
|
virtualinherited |
Get the color of the representation.
Definition at line 58 of file RepBase.cxx.
References RepBase::m_color.
Referenced by PointRepXML::createElement().
|
virtual |
Returns the style of the line drawing.
Reimplemented from RepBase.
Definition at line 84 of file ColumnPointRep.cxx.
References ColumnPointRep::m_line_style.
|
inherited |
Gets the text.
Definition at line 139 of file RepBase.cxx.
References RepBase::m_text.
Referenced by PointRepXML::setAttributes().
|
virtualinherited |
Returns the value transform.
A value transform changes a binary value to some graphical representations such as color. The implementation in this base class returns a null pointer. Derived classes that implement value transform should return a pointer to the object it uses.
Reimplemented in ContourPointRep, ColorBoxPointRep, and ColorSymbolPointRep.
Definition at line 147 of file RepBase.cxx.
Referenced by PointRepXML::createElement().
|
virtualinherited |
Returns true
if representation is in selected state, otherwise returns false
.
Definition at line 79 of file RepBase.cxx.
References RepBase::m_desel.
Referenced by DataRep::isSelected().
|
inherited |
Returns the name of the representation.
This name might be used by a Factory.
Definition at line 47 of file RepBase.cxx.
References RepBase::m_name.
Referenced by ContourPointRep::createContours(), FuncParmRep::drawProjectedValues(), ContourPointRep::drawProjectedValues(), PointRepXML::setAttributes(), QtDisplay::setContourLevels(), and Inspector::updatePlotTab().
|
virtual |
Sets the Color.
Sets the Color of both the representation and its ErrorBarRep if any.
Reimplemented from RepBase.
Reimplemented in FilledColumnPointRep.
Definition at line 66 of file ColumnPointRep.cxx.
References PointRepBase::m_error_rep, and RepBase::setColor().
|
virtual |
Sets the error display on or off.
Sets the error display on the Y axis if axis is the Y axis, otherwise does nothing.
Reimplemented from RepBase.
Definition at line 91 of file ColumnPointRep.cxx.
References PointRepBase::m_error_rep, ColumnPointRep::m_y_flag, ErrorBarRep::setYError(), and hippodraw::Axes::Y.
|
virtualinherited |
Sets the highlighted state of the point representation.
If yes is true, then the point representation should show the non highlighted regions in some fashion, typically using light gray color instead of its normal color.
Definition at line 86 of file RepBase.cxx.
References RepBase::m_highlite.
|
virtualinherited |
Sets the selection state of the representation.
Also sets the selection state of the ErrorBarRep representation, if any. If yes is false
, the point representation should shows its deselected stated by some fashion, typically using a light gray color instead of its normal color.
Reimplemented from RepBase.
Definition at line 38 of file PointRepBase.cxx.
References PointRepBase::m_error_rep, and RepBase::setSelected().
|
virtual |
Sets the size of the line drawing and that of the error bar.
Reimplemented from RepBase.
Definition at line 185 of file ColumnPointRep.cxx.
References PointRepBase::m_error_rep.
|
virtual |
Sets the style of the line drawing.
Reimplemented from RepBase.
Definition at line 77 of file ColumnPointRep.cxx.
References hippodraw::Axes::convert(), and ColumnPointRep::m_line_style.
|
inherited |
Sets the text.
Definition at line 133 of file RepBase.cxx.
References RepBase::m_text.
Referenced by PointRepXML::createObject(), and DisplayController::createTextDataRep().
|
virtualinherited |
Sets the value transform.
The implementation in this base class does nothing. Derived classes that implement a value transform should override this method and take possession of the received object.
Reimplemented in ContourPointRep, ColorBoxPointRep, and ColorSymbolPointRep.
Definition at line 154 of file RepBase.cxx.
|
inherited |
Returns the size of the representation.
Definition at line 91 of file RepBase.cxx.
References RepBase::m_size.
Referenced by ContourPointRep::createContours(), ContourPointRep::drawContourTicks(), ColorSymbolPointRep::drawProjectedValues(), ColorBoxPointRep::drawProjectedValues(), ErrorBarRep::drawProjectedValues(), ColumnPointRep::drawProjectedValues(), ContourPointRep::drawProjectedValues(), SymbolPointRep::drawProjectedValues(), FilledColumnPointRep::drawValues(), LinePointRep::drawValues(), DisplayController::pointSize(), PointRepXML::setAttributes(), RepBase::setSize(), LineFunctionRep::smoothCurve(), and LinePointRep::transformValues().
|
virtual |
Returns true
as this class uses hippodraw::Line::Style.
Reimplemented from RepBase.
Definition at line 178 of file ColumnPointRep.cxx.
|
virtualinherited |
Returns true
if receiving object uses a Color::Value as a property, otherwise returns false
.
This base class implementation returns true
as most derived classes use a Color::Value as a property. Derived classes that do not, such as those that represent a value in color, should override this member function and return false
.
Reimplemented in ColorBoxPointRep, and ColorSymbolPointRep.
Definition at line 171 of file RepBase.cxx.
|
virtualinherited |
Returns true
if receiving object uses a hippodraw::Symbol::Type as a property, otherwise returns false
.
This base class implementation returns false. Derived classes that use hippodraw::Symbol::Type should override this member function and return true
.
Reimplemented in SymbolPointRep.
Definition at line 185 of file RepBase.cxx.
|
virtualinherited |
Returns true if the point representation displays error on the X axis.
The default implementation returns false
. May be overridden by derived classes.
Reimplemented in SymbolPointRep.
Definition at line 116 of file RepBase.cxx.
Referenced by DataRep::isErrorDisplayed(), and PointRepXML::setAttributes().
|
virtual |
Returns true if the point representation displays error on the Y axis.
The default implementation returns false
. May be overridden by derived classes.
Reimplemented from RepBase.
Definition at line 99 of file ColumnPointRep.cxx.
References ColumnPointRep::m_y_flag.
|
private |
A flag that the cache has been cleared.
Definition at line 61 of file ColumnPointRep.h.
|
protectedinherited |
The color of the representation.
Definition at line 57 of file RepBase.h.
Referenced by RepBase::color(), ContourPointRep::createContours(), CutRangeRep::drawInvertedRange1D(), CutRangeRep::drawInvertedRange2D(), CutRangeRep::drawNormalRange(), UnderflowTextRep::drawProjectedValues(), OverflowTextRep::drawProjectedValues(), TotalTextRep::drawProjectedValues(), BoxTextRep::drawProjectedValues(), FuncChiRep::drawProjectedValues(), FuncParmRep::drawProjectedValues(), AverageTextRep::drawProjectedValues(), RepBase::getColor(), and RepBase::setColor().
|
protectedinherited |
A flag to indicate the representation is de-selected.
Definition at line 66 of file RepBase.h.
Referenced by RepBase::color(), ContourPointRep::createContours(), CutRangeRep::drawInvertedRange1D(), CutRangeRep::drawInvertedRange2D(), CutRangeRep::drawNormalRange(), ColorBoxPointRep::drawProjectedValues(), RepBase::isSelected(), and RepBase::setSelected().
|
protectedinherited |
The error bar representation.
Will be a null pointer if a derived class doesn't have one.
Definition at line 44 of file PointRepBase.h.
Referenced by ColumnPointRep::ColumnPointRep(), ColumnPointRep::drawProjectedValues(), SymbolPointRep::drawProjectedValues(), ColumnPointRep::setColor(), SymbolPointRep::setColor(), ColumnPointRep::setErrorOn(), SymbolPointRep::setErrorOn(), PointRepBase::setSelected(), ColumnPointRep::setSize(), SymbolPointRep::setSize(), SymbolPointRep::SymbolPointRep(), ColumnPointRep::~ColumnPointRep(), and SymbolPointRep::~SymbolPointRep().
|
protectedinherited |
Sets the state of highlighting.
Definition at line 70 of file RepBase.h.
Referenced by RepBase::setHighLighted().
|
private |
The style currently used.
Definition at line 54 of file ColumnPointRep.h.
Referenced by ColumnPointRep::drawValues(), ColumnPointRep::getStyle(), and ColumnPointRep::setStyle().
|
protectedinherited |
The name of the representation.
Definition at line 51 of file RepBase.h.
Referenced by AverageTextRep::AverageTextRep(), ColorSymbolPointRep::ColorSymbolPointRep(), RepBase::displayError(), FilledColumnPointRep::FilledColumnPointRep(), ContourPointRep::init(), and RepBase::name().
|
protectedinherited |
The size of the representation.
Definition at line 63 of file RepBase.h.
Referenced by RepBase::displayError(), TotalTextRep::drawProjectedValues(), UnderflowTextRep::drawProjectedValues(), OverflowTextRep::drawProjectedValues(), BoxTextRep::drawProjectedValues(), FuncChiRep::drawProjectedValues(), FuncParmRep::drawProjectedValues(), AverageTextRep::drawProjectedValues(), ColorSymbolPointRep::drawProjectedValues(), ErrorBarRep::drawProjectedValues(), SymbolPointRep::drawProjectedValues(), ColumnPointRep::drawValues(), LinePointRep::drawValues(), ContourPointRep::drawValues(), ContourPointRep::drawValuesWithStyle(), RepBase::setSize(), and RepBase::size().
|
protectedinherited |
The text to be displayed before the statistics.
Definition at line 54 of file RepBase.h.
Referenced by BoxTextRep::drawProjectedValues(), RepBase::getText(), and RepBase::setText().
|
protected |
A cache of the points to be drawn along the X axis.
For efficiency, all the points are given to the view at once.
Definition at line 39 of file ColumnPointRep.h.
Referenced by ColumnPointRep::drawProjectedValues(), FilledColumnPointRep::drawValues(), and ColumnPointRep::drawValues().
|
protected |
A cache of the points to be drawn along the Y axis.
For efficiency, all the points are given to the view at once.
Definition at line 44 of file ColumnPointRep.h.
Referenced by ColumnPointRep::drawProjectedValues(), FilledColumnPointRep::drawValues(), and ColumnPointRep::drawValues().
|
private |
The Y error flag.
If set true
, error bars will be generated along the Y axis.
Definition at line 58 of file ColumnPointRep.h.
Referenced by ColumnPointRep::drawProjectedValues(), ColumnPointRep::setErrorOn(), and ColumnPointRep::yError().
|
staticprotectedinherited |
The color of the representation when it is de-selected.
Definition at line 60 of file RepBase.h.
Referenced by RepBase::color(), ContourPointRep::createContours(), CutRangeRep::drawInvertedRange1D(), CutRangeRep::drawInvertedRange2D(), CutRangeRep::drawNormalRange(), and ColorBoxPointRep::drawProjectedValues().