Exemple #1
0
 public Legend(AbstractDrawable parent)
 {
     _parent = parent;
     if (((_parent != null)))
     {
         _parent.addDrawableListener(this);
     }
 }
Exemple #2
0
 public ColorbarLegend(AbstractDrawable parent, ITickProvider provider, ITickRenderer renderer, Color foreground, Color background) : base(parent)
 {
     _provider         = provider;
     _renderer         = renderer;
     _foreground       = foreground;
     _background       = background;
     _minimumDimension = new System.Drawing.Size(ColorbarImageGenerator.MIN_BAR_WIDTH, ColorbarImageGenerator.MIN_BAR_HEIGHT);
 }
Exemple #3
0
 public void Add(AbstractDrawable drawable, bool updateViews)
 {
     lock (_components) {
         _components.Add(drawable);
     }
     if (updateViews)
     {
         foreach (View.View view in _scene.Views)
         {
             view.updateBounds();
         }
     }
 }
Exemple #4
0
        public void Remove(AbstractDrawable drawable, bool updateViews)
        {
            bool output = false;

            lock (_components) {
                output = _components.Remove(drawable);
            }
            BoundingBox3d bbox = this.Bounds;

            foreach (View.View view in _scene.Views)
            {
                view.lookToBox(bbox);
                if (updateViews)
                {
                    view.Shoot();
                }
            }
        }
Exemple #5
0
        /// <summary>
        /// Recursively expand all monotype Drawables from the given Composite
        /// </summary>
        public static List <AbstractDrawable> GetDecomposition(AbstractComposite input)
        {
            List <AbstractDrawable> selection = new List <AbstractDrawable>();

            foreach (AbstractDrawable c in input.GetDrawables)
            {
                if ((c != null) && c.Displayed)
                {
                    AbstractComposite cAC = c as AbstractComposite;
                    AbstractDrawable  cAD = c as AbstractDrawable;
                    if (cAC != null)
                    {
                        selection.AddRange(GetDecomposition(cAC));
                    }
                    else if (cAD != null)
                    {
                        selection.Add(cAD);
                    }
                }
            }
            return(selection);
        }
Exemple #6
0
        public static List <AbstractDrawable> GetDecomposition(List <AbstractDrawable> drawables)
        {
            List <AbstractDrawable> monotypes = new List <AbstractDrawable>();

            foreach (AbstractDrawable c in drawables)
            {
                if ((c != null) && c.Displayed)
                {
                    AbstractComposite cAC = c as AbstractComposite;
                    AbstractDrawable  cAD = c as AbstractDrawable;
                    if (cAC != null)
                    {
                        monotypes.AddRange(GetDecomposition(cAC));
                    }
                    else if (cAD != null)
                    {
                        monotypes.Add(cAD);
                    }
                }
            }
            return(monotypes);
        }
Exemple #7
0
 public ColorbarLegend(AbstractDrawable parent, ITickProvider provider, ITickRenderer renderer) : this(parent, provider, renderer, Color.BLACK, Color.WHITE)
 {
 }
Exemple #8
0
 public ColorbarLegend(AbstractDrawable parent, IAxeLayout layout, Color foreground, Color background) : this(parent, layout.ZTickProvider, layout.ZTickRenderer, foreground, background)
 {
 }
Exemple #9
0
 public ColorbarLegend(AbstractDrawable parent, IAxeLayout layout) : this(parent, layout, layout.MainColor, null)
 {
 }
Exemple #10
0
 public void addDrawable(AbstractDrawable drawable, bool updateViews)
 {
     _scene.Graph.Add(drawable, updateViews);
 }
Exemple #11
0
 /// <summary>
 /// Remove a drawable from the scene
 /// </summary>
 public void Remove(AbstractDrawable drawable)
 {
     _graph.Remove(drawable);
 }
Exemple #12
0
 /// <summary>
 /// Add a drawable to the scene and refresh on demand.
 /// </summary>
 public void Add(AbstractDrawable drawable, bool updateViews)
 {
     _graph.Add(drawable, updateViews);
 }
Exemple #13
0
 public void removeDrawable(AbstractDrawable drawable, bool updateViews)
 {
     _scene.Graph.Remove(drawable, updateViews);
 }
Exemple #14
0
 public void removeDrawable(AbstractDrawable drawable)
 {
     _scene.Graph.Remove(drawable);
 }
Exemple #15
0
 /// <summary>
 /// Remove a drawable from the scene and refresh on demand.
 /// </summary>
 public void Remove(AbstractDrawable drawable, bool updateViews)
 {
     _graph.Remove(drawable, updateViews);
 }
Exemple #16
0
 public void Remove(AbstractDrawable drawable)
 {
     Remove(drawable, true);
 }
Exemple #17
0
 /// <summary>
 /// Add a drawable to the scene
 /// </summary>
 public void Add(AbstractDrawable drawable)
 {
     _graph.Add(drawable);
 }
Exemple #18
0
 public void Add(AbstractDrawable drawable)
 {
     Add(drawable, true);
 }
Exemple #19
0
 public void addDrawable(AbstractDrawable drawable)
 {
     _scene.Graph.Add(drawable);
 }