40 #ifndef _TREEDRAWINGDISPLAYCONTROLER_H_ 41 #define _TREEDRAWINGDISPLAYCONTROLER_H_ 76 for (std::map<std::string, TreeDrawingListener*>::const_iterator it = tddc.
listeners_.begin();
86 for (std::map<std::string, TreeDrawingListener*>::const_iterator it = tddc.
listeners_.begin();
112 throw Exception(
"TreeDrawingDisplayControler::enableListener. No listener is registered for property " + propertyName +
".");
119 throw Exception(
"TreeDrawingDisplayControler::enableListener. No listener is registered for property " + propertyName +
".");
120 return listeners_.find(propertyName)->second->isEnabled();
126 throw Exception(
"TreeDrawingDisplayControler::registerTreeDrawing. TreeDrawing is already associated to this controler.");
127 for (std::map<std::string, TreeDrawingListener*>::iterator it =
listeners_.begin();
129 td->addTreeDrawingListener(it->second);
166 throw NullPointerException(
"BasicTreeDrawingDisplayControler::constructor. Trying to use NULL settings.");
181 #endif //_TREEDRAWINGDISPLAYCONTROLER_H_ Basal interface for tree drawing classes.
static const std::string PROPERTY_BOOTSTRAP_VALUES
bool isListenerEnabled(const std::string &propertyName) const
static const std::string PROPERTY_LEAF_NAMES
A TreeDrawingListener implementation that write the bootstrap values of inner nodes.
Easy tune of tree drawings display, a basic implementation:
BasicTreeDrawingDisplayControler(const BasicTreeDrawingDisplayControler &)
std::vector< TreeDrawing * > registeredTreeDrawings_
TreeDrawingDisplayControler()
const TreeDrawingSettings * settings_
BasicTreeDrawingDisplayControler & operator=(const BasicTreeDrawingDisplayControler &)
BasicTreeDrawingDisplayControler(const TreeDrawingSettings *settings)
static const std::string PROPERTY_BRANCH_LENGTHS
virtual ~TreeDrawingDisplayControler()
Easy tune of tree drawings display.
A set of options to tune the display of a TreeDrawing object.
A TreeDrawingListener implementation that write the branch lengths of inner nodes.
Interface allowing to capture drawing events.
void enableListener(const std::string &propertyName, bool tf)
void addListener(const std::string &propertyName, TreeDrawingListener *listener)
Add a listener to the controler. The controler then owns the object, and will copy or delete it when ...
void registerTreeDrawing(TreeDrawing *td)
A TreeDrawingListener implementation that write leaf names.
std::map< std::string, TreeDrawingListener * > listeners_
static const std::string PROPERTY_NODE_IDS
TreeDrawingDisplayControler(const TreeDrawingDisplayControler &tddc)
A TreeDrawingListener implementation that writes nodes id.
bool hasListenerFor(const std::string &propertyName) const
TreeDrawingDisplayControler & operator=(const TreeDrawingDisplayControler &tddc)