FrameLabelObject.h

Go to the documentation of this file.
00001 /*
00002  * The information in this file is
00003  * Copyright(c) 2007 Ball Aerospace & Technologies Corporation
00004  * and is subject to the terms and conditions of the
00005  * GNU Lesser General Public License Version 2.1
00006  * The license text is available from   
00007  * http://www.gnu.org/licenses/lgpl.html
00008  */
00009 
00010 #ifndef FRAMELABELOBJECT_H
00011 #define FRAMELABELOBJECT_H
00012 
00013 #include "ConfigurationSettings.h"
00014 #include "TextObject.h"
00015 #include <vector>
00016 
00017 class Animation;
00018 
00019 /**
00020  * This class provides access to the display properties for a FrameLabelObject.
00021  *
00022  * Possible GraphicObjectTypes: GraphicObjectType::FRAME_LABEL_OBJECT.
00023  *
00024  * FrameLabelObjects have two modes of operation: Automatic and Manual.
00025  *
00026  * Automatic Mode is the default mode for a FrameLabelObject which has been added to a view by the user.
00027  * When the FrameLabelObject is operating in Automatic Mode it maintains a list of Animation objects which is comprised of:
00028  *    - All Animation objects in the AnimationController set into the View (ProductView)
00029  *    - All Animation objects in any RasterLayer in the View (SpatialDataView)
00030  *
00031  * The FrameLabelObject will automatically update its list of Animation objects when:
00032  *    - The object is placed in a different Layer
00033  *    - An Animation in the list is deleted
00034  *    - The underlying Layer is put into a different View
00035  *    - The View changes its AnimationController (ProductView)
00036  *    - An Animation is added to or removed from the AnimationController (ProductView)
00037  *    - The AnimationController is deleted (ProductView)
00038  *    - A Layer is added to or removed from the LayerList (SpatialDataView)
00039  *    - A RasterLayer in the LayerList changes its Animation (SpatialDataView)
00040  *
00041  * Manual Mode is the default mode for a FrameLabelObject which has been created programmatically.
00042  * When the FrameLabelObject is operating in Manual Mode it will only update its list of Animation objects when
00043  * an Animation in the list is deleted.
00044  *
00045  *  This subclass of Subject will notify upon the following conditions:
00046  *  - All notifications documented in TextObject
00047  */
00048 class FrameLabelObject : public TextObject
00049 {
00050 public:
00051    /**
00052     * When multiple Animation objects are present, this setting determines how text is displayed.
00053     *
00054     * If this setting is \b true, then the time (or frame number) of the least recent (oldest) Animation is displayed.
00055     * Otherwise, the time (or frame number) of the most recent (newest) Animation is displayed.
00056     */
00057    SETTING(DisplayMinimumFrame, FrameLabelObject, bool, false)
00058 
00059    /**
00060     *  Sets the Animation objects for the object to monitor.
00061     *  If the object is in Automatic Mode, this method does nothing.
00062     *
00063     *  @param   animations
00064     *           Animation objects to monitor.
00065     *
00066     *  @see setAutoMode(), getAutoMode()
00067     */
00068    virtual void setAnimations(const std::vector<Animation*> &animations) = 0;
00069 
00070    /**
00071     *  Gets the Animation objects being monitored by the object.
00072     *
00073     *  @return  Animation objects being monitored.
00074     */
00075    virtual const std::vector<Animation*> &getAnimations() const = 0;
00076 
00077    /**
00078     *  Inserts an Animation into the vector of Animation objects being monitored.
00079     *  If the object is in Automatic Mode, this method does nothing.
00080     *
00081     *  @param   pAnimation
00082     *           A pointer to an Animation to insert into the vector.
00083     *
00084     *  @see setAutoMode(), getAutoMode()
00085     */
00086    virtual void insertAnimation(Animation* pAnimation) = 0;
00087 
00088    /**
00089     *  Erases an Animation from the vector of Animation objects being monitored.
00090     *  If the object is in Automatic Mode, this method does nothing.
00091     *
00092     *  @param   pAnimation
00093     *           A pointer to an Animation to erase from the vector.
00094     *
00095     *  @see setAutoMode(), getAutoMode()
00096     */
00097    virtual void eraseAnimation(Animation* pAnimation) = 0;
00098 
00099    /**
00100     *  Sets the current mode.
00101     *  If autoMode matches the current mode, this method does nothing.
00102     *
00103     *  @param   autoMode
00104     *           A value of \b true will clear all current Animation objects and operate in Automatic Mode.
00105     *           A value of \b false will clear all current Animation objects and operate in Manual Mode.
00106     *
00107     *  @see getAutoMode()
00108     */
00109    virtual void setAutoMode(bool autoMode) = 0;
00110 
00111    /**
00112     *  Gets the current mode.
00113     *
00114     *  @return  \b True if the object is operating in Automatic Mode, \b false otherwise.
00115     *
00116     *  @see setAutoMode()
00117     */
00118    virtual bool getAutoMode() const = 0;
00119 
00120 protected:
00121    /**
00122     * This should be destroyed by calling GraphicLayer::removeObject.
00123     */
00124    virtual ~FrameLabelObject() {}
00125 };
00126 
00127 #endif

Software Development Kit - Opticks 4.9.0 Build 16218