Class TowerBarGraph


  • public class TowerBarGraph
    extends AbstractBarGraph

    A concrete subclass of AbstractBarGraph that describes "Towered" Bar Graphs - i.e. each bar consists of several colored blocks, stacked on top of eachother.

    As the usage of a TowerBarGraph is identical to a DepthBarGraph, please see that class for an example.

    • Constructor Detail

      • TowerBarGraph

        public TowerBarGraph()
    • Method Detail

      • setColor

        public void setColor​(java.lang.String set,
                             java.awt.Paint color)
        Set the color for an entry.
      • set

        public void set​(java.lang.String xset,
                        java.lang.String yset,
                        double val)
        Set the value of the specified entry.
        Parameters:
        xset - the entry on the X-axis to plot the value against
        yset - the position in the tower to plot the value against
        val - the value to plot.
        Throws:
        java.lang.IllegalArgumentException - if paramater val is infinite.
      • plotBar

        protected void plotBar​(int ix,
                               int iy,
                               int iz,
                               double endval)
        Description copied from class: AbstractBarGraph
        Needs to be completed by concrete subclasses of this class.
        Specified by:
        plotBar in class AbstractBarGraph
        Parameters:
        ix - The X position of this value
        iy - The Y position of this value
        iz - The Z position of this value
        endval - The value to plot.