jacquard 1.12.0 by The Web Engineering Factory and Toolworks

uk.co.weft.graphic
Class DrillThruGraph

java.lang.Object
  extended byuk.co.weft.graphic.MappedImage
      extended byuk.co.weft.graphic.DrillThruGraph
All Implemented Interfaces:
java.lang.Runnable

public class DrillThruGraph
extends MappedImage

A horizontal bar graph (histogram) in which the elements are selectable so that the user can 'drill down' to further representations of the data. This class's many parameters are all declared as public instance variables so that the creator can set them. If setting (any of) these you must set them before calling getMarkup().

Version:
$Revision: 1.1.4.1 $ This revision: $Author: simon $
  $Log: DrillThruGraph.java,v $
  Revision 1.1.4.1  2005/12/23 10:48:33  simon
  Brute force tidy up after CVS server crash: this time it should work.

  Revision 1.1  2004/10/22 20:44:00  simon
  Separated graphic classes out; added new URLWatcher.

  Revision 1.7  2003/10/07 11:48:30  simon
  *** empty log message ***

  Revision 1.6  2003/08/20 09:38:35  simon
  Code cleanup with eclipse; mostly removal of exccessive includes

  Revision 1.5  2000/05/26 14:50:47  simon
  Made cookie time-to-live generally configurable; gave list optional,
  configurable search widget

  Revision 1.4  2000/05/04 10:50:55  simon
  Switch to IBM Java2 compiler; Tidying of javadoc comments; Jacquard 1
  Release Candidate 2

  Revision 1.3  2000/05/01 15:44:37  simon
  Cosmetic changes.

  Revision 1.2  2000/04/28 08:18:40  simon
  DrillThru components now much more configurable, other changes minor.

  Revision 1.1  2000/02/27 19:23:32  simon
  Whoops! files which should have been added some time ago. WidgetSet allows
  forms to have alternate WidgetSets; DrillThruGraph and DrillThruPie are
  new dynamically generated graphic components, which may later be moved to
  a separate package.

 
  
Author:
Simon Brooke

Field Summary
 java.awt.Color background
          The colour of my background
 java.lang.String baseURL
          The string which, when the value from the id data item of my data set is appended, will make a valid URL for the drill-through target.
 java.lang.String colourName
          The name of the data item in the data set which contains the specification of the colour for the bar as a 24 bit RGB value
protected  Contexts data
          The one thing I must have: some data to represent
 java.lang.String dataName
          The name of the data item in the data set which contains the data to be graphed
 java.awt.Color defaultColour
          The colour to paint bars for which we don't have a valid colour
 boolean doLabel
          Whether to provide labels for the bars
 boolean doScale
          Whether to provide a scale with values
 java.awt.Color gridColour
          The colour to draw the grid
 boolean hGrid
          Whether to draw horizontal grid lines
 java.lang.String idName
          The name of the data item in the data set which uniquely identifies a record
 java.awt.Color labelColour
          The colour to write the labels
 java.awt.Font labelFont
          The font to write the labels in
 java.lang.String labelName
          The name of the data item in the data set which identifies a record for humans
 java.lang.Double maxVal
          The maximum value shown on my X scale.
 java.lang.Double minVal
          The minimum value shown on my X scale.
 boolean overlayLabel
          Whether to overlay the labels on top of the bars
 java.net.URL urlContext
          A URL context helps make the whole thing more portable
 boolean vGrid
          Whether to draw vertical grid lines
 
Fields inherited from class uk.co.weft.graphic.MappedImage
areas, attributes, expectancy, height, id, mappedImageIdToken, width
 
Constructor Summary
DrillThruGraph(Contexts data)
          Create a drill-through graph to represent the data contained in these contexts
DrillThruGraph(Contexts data, int width, int height)
          Create a drill-through graph to represent the data contained in these contexts
DrillThruGraph(java.sql.ResultSet rs)
          Create a drill-through graph to represent the data contained in this result-set.
DrillThruGraph(java.sql.ResultSet rs, int width, int height)
          Create a drill-through graph to represent the data contained in these contexts, with this width and this height
 
Method Summary
 java.lang.String getMap(java.lang.String mapid)
          create my graph, and, as a side effect, create my map tag and return it.
 
Methods inherited from class uk.co.weft.graphic.MappedImage
addArea, addAttribute, get, getGraphics, getImage, getMarkup, getRenderedImage, maybePaintImage, run, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

minVal

public java.lang.Double minVal
The minimum value shown on my X scale. If null, calculate one from the data


maxVal

public java.lang.Double maxVal
The maximum value shown on my X scale. If null, calculate one from the data


hGrid

public boolean hGrid
Whether to draw horizontal grid lines


vGrid

public boolean vGrid
Whether to draw vertical grid lines


doLabel

public boolean doLabel
Whether to provide labels for the bars


overlayLabel

public boolean overlayLabel
Whether to overlay the labels on top of the bars


doScale

public boolean doScale
Whether to provide a scale with values


baseURL

public java.lang.String baseURL
The string which, when the value from the id data item of my data set is appended, will make a valid URL for the drill-through target. If null, don't provide drill-thrus


idName

public java.lang.String idName
The name of the data item in the data set which uniquely identifies a record


labelName

public java.lang.String labelName
The name of the data item in the data set which identifies a record for humans


dataName

public java.lang.String dataName
The name of the data item in the data set which contains the data to be graphed


colourName

public java.lang.String colourName
The name of the data item in the data set which contains the specification of the colour for the bar as a 24 bit RGB value


labelFont

public java.awt.Font labelFont
The font to write the labels in


labelColour

public java.awt.Color labelColour
The colour to write the labels


gridColour

public java.awt.Color gridColour
The colour to draw the grid


defaultColour

public java.awt.Color defaultColour
The colour to paint bars for which we don't have a valid colour


background

public java.awt.Color background
The colour of my background


urlContext

public java.net.URL urlContext
A URL context helps make the whole thing more portable


data

protected Contexts data
The one thing I must have: some data to represent

Constructor Detail

DrillThruGraph

public DrillThruGraph(Contexts data)
Create a drill-through graph to represent the data contained in these contexts


DrillThruGraph

public DrillThruGraph(java.sql.ResultSet rs)
               throws DataStoreException
Create a drill-through graph to represent the data contained in this result-set.


DrillThruGraph

public DrillThruGraph(Contexts data,
                      int width,
                      int height)
Create a drill-through graph to represent the data contained in these contexts


DrillThruGraph

public DrillThruGraph(java.sql.ResultSet rs,
                      int width,
                      int height)
               throws DataStoreException
Create a drill-through graph to represent the data contained in these contexts, with this width and this height

Method Detail

getMap

public java.lang.String getMap(java.lang.String mapid)
                        throws java.lang.Exception
create my graph, and, as a side effect, create my map tag and return it. This is a much larger chunk of code than I would normally write as a single method, and bits of it are gruesome. However, the sections of it are fairly well commented.

Overrides:
getMap in class MappedImage
Throws:
java.lang.Exception

jacquard 1.12.0 by The Web Engineering Factory and Toolworks