A PointRep class that draws a colored box to represent the value. More...
#include <ColorBoxPointRep.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. | |
ColorBoxPointRep () | |
The default constructor. | |
ColorBoxPointRep (const ColorBoxPointRep &point_rep) | |
The copy constructor. | |
virtual void | displayError (ViewBase &view) |
Display an error message. | |
virtual void | drawProjectedValues (const DataSource *ntuple, TransformBase *transform, ViewBase *view) |
Draws the projected values. | |
virtual const Color & | getColor () const |
Get the color of the representation. | |
virtual unsigned int | getStyle () const |
Returns the style of the point representation. | |
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 | setBoxEdge (bool show) |
virtual void | setColor (const Color &) |
Sets the color of the representation. | |
virtual void | setErrorOn (hippodraw::Axes::Type axis, bool yes=true) |
Sets the error representation on specified axis, if any, to yes. | |
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 representation. | |
virtual void | setStyle (unsigned int style) |
Sets the symbol of the representation. | |
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 (Color::Value) const |
Returns false as this class represents a Z value in color. | |
virtual bool | uses (hippodraw::Line::Style) const |
Returns true if receiving object uses a hippodraw::Line::Style 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. | |
~ColorBoxPointRep () | |
The destructor. |
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. |
Static Protected Attributes | |
static const Color | s_desel_color |
The color of the representation when it is de-selected. |
Static Private Member Functions | |
static void | rotate (double &lat, double &lon, double alpha, double beta, double gamma, bool negative=true) |
The following function do a rotation for periodic transform. |
Private Attributes | |
BinToColor * | m_bin_to_color |
The following function transforms the projected value to a color scale. | |
bool | m_box_edge |
Flag to indicated that box edge needs to be shown. | |
bool | m_need_background |
Flag to indicated that background needs to be draw. |
A PointRep class that draws a colored box to represent the value.
The following image was made with ColorBoxPointRep.
Definition at line 37 of file ColorBoxPointRep.h.
ColorBoxPointRep | ( | ) |
The default constructor.
Definition at line 36 of file ColorBoxPointRep.cxx.
References BinToColorFactory::instance(), ColorBoxPointRep::m_bin_to_color, and ColorBoxPointRep::m_box_edge.
Referenced by ColorBoxPointRep::clone().
ColorBoxPointRep | ( | const ColorBoxPointRep & | point_rep | ) |
The copy constructor.
Definition at line 44 of file ColorBoxPointRep.cxx.
References ColorBoxPointRep::clone(), ColorBoxPointRep::m_bin_to_color, and ColorBoxPointRep::m_box_edge.
~ColorBoxPointRep | ( | ) |
The destructor.
Definition at line 53 of file ColorBoxPointRep.cxx.
References ColorBoxPointRep::m_bin_to_color.
|
virtual |
The clone function returns an object of its own kind which is a copy of this object at this moment.
Implements PointRepBase.
Definition at line 58 of file ColorBoxPointRep.cxx.
References ColorBoxPointRep::ColorBoxPointRep().
Referenced by ColorBoxPointRep::ColorBoxPointRep().
|
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 |
Draws the projected values.
Draws the projected values contained in the DataSource ntuple. Each row of the ntuple is data point tuple of some dimension. Derived classes expect the DataSoruce to be of the correct dimension. The drawn points undergo a transform represented by transform and are drawn to the view view. If highlighting is on, uses the ranges to control highlighting.
Implements RepBase.
Definition at line 82 of file ColorBoxPointRep.cxx.
References Color::black, RepBase::color(), ViewBase::drawPolyLine(), Color::getBlue(), Color::getGreen(), Color::getRed(), Rect::getZ(), Range::high(), Rect::isInDepth(), Range::low(), ColorBoxPointRep::m_bin_to_color, ColorBoxPointRep::m_box_edge, RepBase::m_desel, Rect::makeInBounds(), PlotterBase::repColor(), ColorBoxPointRep::rotate(), RepBase::s_desel_color, BinToColor::setRange(), RepBase::size(), hippodraw::Line::Solid, hippodraw::Axes::X, hippodraw::DataPoint2DTuple::XERR, hippodraw::Axes::Y, hippodraw::DataPoint2DTuple::YERR, and hippodraw::Axes::Z.
|
virtualinherited |
Get the color of the representation.
Definition at line 58 of file RepBase.cxx.
References RepBase::m_color.
Referenced by PointRepXML::createElement().
|
virtualinherited |
Returns the style of the point representation.
Derived class should override this member function if they support styles. This base class implementation returns 0.
Reimplemented in SymbolPointRep, LinePointRep, and ColumnPointRep.
Definition at line 110 of file RepBase.cxx.
Referenced by PointRepXML::setAttributes().
|
inherited |
Gets the text.
Definition at line 139 of file RepBase.cxx.
References RepBase::m_text.
Referenced by PointRepXML::setAttributes().
|
virtual |
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 from RepBase.
Definition at line 65 of file ColorBoxPointRep.cxx.
References ColorBoxPointRep::m_bin_to_color.
|
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().
|
staticprivate |
The following function do a rotation for periodic transform.
Definition at line 280 of file ColorBoxPointRep.cxx.
Referenced by ColorBoxPointRep::drawProjectedValues().
|
virtual |
Definition at line 328 of file ColorBoxPointRep.cxx.
References ColorBoxPointRep::m_box_edge.
Referenced by CompositePlotter::toggleBoxEdge().
|
virtualinherited |
Sets the color of the representation.
Reimplemented in SymbolPointRep, ColumnPointRep, and FilledColumnPointRep.
Definition at line 53 of file RepBase.cxx.
References RepBase::color(), and RepBase::m_color.
Referenced by PointRepXML::createObject(), CutRangeRep::CutRangeRep(), FunctionRep1::FunctionRep1(), LineDataRep::LineDataRep(), ColumnPointRep::setColor(), SymbolPointRep::setColor(), and DataRep::setRepColor().
|
virtualinherited |
Sets the error representation on specified axis, if any, to yes.
Reimplemented in SymbolPointRep, and ColumnPointRep.
Definition at line 129 of file RepBase.cxx.
Referenced by PointRepXML::createObject().
|
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().
|
virtualinherited |
Sets the size of the representation.
Derived classes may use this method to set the size of the point representation and any of its components.
Reimplemented in SymbolPointRep, and ColumnPointRep.
Definition at line 96 of file RepBase.cxx.
References RepBase::m_size, and RepBase::size().
Referenced by PointRepXML::createObject(), and DataRep::setRepSize().
|
virtualinherited |
Sets the symbol of the representation.
Derived classes may use this method to set the style of the representation, if they have various styles. This base class implementation does nothing.
Reimplemented in SymbolPointRep, LinePointRep, and ColumnPointRep.
Definition at line 103 of file RepBase.cxx.
Referenced by DataRep::setRepStyle().
|
inherited |
Sets the text.
Definition at line 133 of file RepBase.cxx.
References RepBase::m_text.
Referenced by PointRepXML::createObject(), and DisplayController::createTextDataRep().
|
virtual |
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 from RepBase.
Definition at line 72 of file ColorBoxPointRep.cxx.
References ColorBoxPointRep::m_bin_to_color.
|
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 false
as this class represents a Z value in color.
Reimplemented from RepBase.
Definition at line 272 of file ColorBoxPointRep.cxx.
|
virtualinherited |
Returns true
if receiving object uses a hippodraw::Line::Style as a property, otherwise returns false
.
This base class implementation returns false. Derived classes that use hippodraw::Line::Style should override this member function and return true
.
Reimplemented in LinePointRep, and ColumnPointRep.
Definition at line 178 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().
|
virtualinherited |
Returns true if the point representation displays error on the Y axis.
The default implementation returns false
. May be overridden by derived classes.
Reimplemented in SymbolPointRep, and ColumnPointRep.
Definition at line 122 of file RepBase.cxx.
Referenced by DataRep::isErrorDisplayed(), and PointRepXML::setAttributes().
|
private |
The following function transforms the projected value to a color scale.
Definition at line 43 of file ColorBoxPointRep.h.
Referenced by ColorBoxPointRep::ColorBoxPointRep(), ColorBoxPointRep::drawProjectedValues(), ColorBoxPointRep::getValueTransform(), ColorBoxPointRep::setValueTransform(), and ColorBoxPointRep::~ColorBoxPointRep().
|
private |
Flag to indicated that box edge needs to be shown.
Definition at line 55 of file ColorBoxPointRep.h.
Referenced by ColorBoxPointRep::ColorBoxPointRep(), ColorBoxPointRep::drawProjectedValues(), and ColorBoxPointRep::setBoxEdge().
|
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(), TotalTextRep::drawProjectedValues(), UnderflowTextRep::drawProjectedValues(), OverflowTextRep::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().
|
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().
|
private |
Flag to indicated that background needs to be draw.
Definition at line 52 of file ColorBoxPointRep.h.
|
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().
|
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().