gcspy.vis.plugins.history
Class HistoryConfig

java.lang.Object
  extended by gcspy.vis.plugins.history.HistoryConfig

 class HistoryConfig
extends java.lang.Object

Wrapped up settings for the history graphs

Author:
Tony Printezis

Constructor Summary
HistoryConfig(java.awt.Component component, int cols, int rows, int tileSize, int stream, boolean horSep, int horSepEvent, boolean verSep, int verSepPeriod, boolean verSepLegend, int verSepLegendPeriod, java.lang.String verSepLegendStringPost, boolean spaceSep, java.awt.Color spaceSepColor, java.awt.Color unusedColor, java.awt.Color zeroColor, java.awt.Color lowColor, java.awt.Color hiColor, java.awt.Color horSepColor, java.awt.Color verSepColor, java.awt.Color bgColor, boolean title, java.lang.String titlePre, java.awt.Color titleColor, int borderSize, java.awt.Color borderColor, int fontSize)
          A new history configuration
HistoryConfig(java.awt.Component component, int cols, int streamID, TileManagerColors tmColors)
          A new history configuration
 
Method Summary
(package private)  int calcHeight()
          Get the height of the configuration frame
(package private)  int calcWidth()
          Get the width of the configuration frame
(package private) static int checkBorderSize(int borderSize)
          Check the border size
(package private) static int checkCols(int cols)
          Check the number of columns
(package private) static int checkFontSize(int fontSize)
          Check the font size
(package private) static int checkRows(int rows)
          Check the number of rows
(package private) static int checkTileSize(int tileSize)
          Check the tile size
(package private) static int checkVerSepLegendPeriod(int verSepLegendPeriod)
          Check the period for vertical separators for the legend
(package private) static int checkVerSepPeriod(int verSepPeriod)
          Check the period for vertical separators
(package private)  java.awt.Color getBGColor()
          Get the colour for background
(package private)  java.awt.Color getBorderColor()
          Get the border colour
(package private)  int getBorderSize()
          Get the border size
(package private)  int getBottomBorderSize()
          get the bottom border size
(package private)  int getCols()
          Get the number of columns
(package private)  java.awt.Font getFont()
          Get the font to use
(package private)  int getFontSize()
          Get the font size
(package private)  java.awt.Color getHiColor()
          Get the colour for high valued tiles
(package private)  int getHorBorderSize()
          Get the horizontal border size
(package private)  java.awt.Color getHorSepColor()
          Get the colour for horizontal separators
(package private)  int getHorSepEvent()
          Get the ID of the event marked by horizontal separators
(package private)  java.awt.Color getLowColor()
          Get the colour for low valued tiles
(package private)  int getRows()
          Get the number of rows
(package private)  boolean getSpaceSep()
          Are there space separators
(package private)  java.awt.Color getSpaceSepColor()
          Get the colour for space separators
(package private)  int getStream()
          Get the ID od the stream being graphed
(package private)  int getTextGap()
          get the text gap
(package private)  int getTextWidth(java.lang.String text)
          Measure the width of a string
(package private)  int getTileSize()
          Get the tile size
(package private)  boolean getTitle()
          Is a title wanted
(package private)  java.awt.Color getTitleColor()
          Get the colour for the title
(package private)  java.lang.String getTitlePre()
          Get a prefix for the title
(package private)  int getTopBorderSize()
          get the top border size
(package private)  java.awt.Color getUnusedColor()
          Get the colour wanted for unused tiles
(package private)  java.awt.Color getVerSepColor()
          Get the colour for vertical separators
(package private)  boolean getVerSepLegend()
          Is there a legend for vertical separators
(package private)  int getVerSepLegendPeriod()
          Get the period for vertical separators for the legend
(package private)  java.lang.String getVerSepLegendStringPost()
          Return the suffix for the veritcal separation legend
(package private)  int getVerSepPeriod()
          Get the period for vertical separators
(package private)  int getVerSepStart()
          Get the vertical separation before the start
(package private)  java.awt.Color getZeroColor()
          Get the colour for zero tiles
(package private)  boolean horSep()
          Is a horizontal separator needed
(package private) static int parseBorderSize(java.lang.String text)
          Parse a string to get sizse for the border
(package private) static int parseFontSize(java.lang.String text)
          Parse a string to get a font size
(package private) static int parseRows(java.lang.String text)
          Parse a string to give the number of rows
(package private) static int parseTileSize(java.lang.String text)
          Parse a string to give a tile size
(package private) static int parseVerSepLegendPeriod(java.lang.String text)
          Parse a string to get the vertical separation for the legend
(package private) static int parseVerSepPeriod(java.lang.String text)
          Parse a string to give a vertical separator period
(package private)  void revertToDefaults(java.awt.Component component, TileManagerColors tmColors)
          Revert a component to its default colours
(package private)  void setCols(int cols)
          Set the number of columns
(package private)  boolean verSep()
          Is a vertical separator wanted?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HistoryConfig

HistoryConfig(java.awt.Component component,
              int cols,
              int rows,
              int tileSize,
              int stream,
              boolean horSep,
              int horSepEvent,
              boolean verSep,
              int verSepPeriod,
              boolean verSepLegend,
              int verSepLegendPeriod,
              java.lang.String verSepLegendStringPost,
              boolean spaceSep,
              java.awt.Color spaceSepColor,
              java.awt.Color unusedColor,
              java.awt.Color zeroColor,
              java.awt.Color lowColor,
              java.awt.Color hiColor,
              java.awt.Color horSepColor,
              java.awt.Color verSepColor,
              java.awt.Color bgColor,
              boolean title,
              java.lang.String titlePre,
              java.awt.Color titleColor,
              int borderSize,
              java.awt.Color borderColor,
              int fontSize)
A new history configuration

Parameters:
component - The configuration dialog
cols - The number of columns to use
rows - The number of rows to use
tileSize - The tilesize to use
stream - The stream to graph
horSep - Is a horizontal separator needed?
horSepEvent - The ID of the event shown by horiozontal separators
verSep - Are vertical separators wanted?
verSepPeriod - The period for vertical separators
verSepLegend - The legend for vertical separators
verSepLegendPeriod - The period for vertical separators for the legend
verSepLegendStringPost - The suffix for vertical separators in the legend
spaceSep - Are space separators wanted?
spaceSepColor - The space separator colour
unusedColor - The colour for unused tiles
zeroColor - The colour for zero-valued tiles
lowColor - The colour for low-valued tiles
hiColor - The colour for high-valued tiles
horSepColor - The colour for horizontal separators
verSepColor - The colour for vertical separators
bgColor - The background colour
title - The title
titlePre - A prefix for the title
titleColor - The colour of the title
borderSize - The border size
borderColor - The border colour
fontSize - The font size

HistoryConfig

HistoryConfig(java.awt.Component component,
              int cols,
              int streamID,
              TileManagerColors tmColors)
A new history configuration

Parameters:
component - The configuration dialog
cols - The number of columns to use
streamID - The stream to graph
tmColors - the tile colopur configuration
Method Detail

calcWidth

int calcWidth()
Get the width of the configuration frame

Returns:
the width

calcHeight

int calcHeight()
Get the height of the configuration frame

Returns:
the height

checkCols

static int checkCols(int cols)
Check the number of columns

Parameters:
cols - the number of columns given
Returns:
the appropriate number of columns

getCols

int getCols()
Get the number of columns

Returns:
th enumber of colu,mns

setCols

void setCols(int cols)
Set the number of columns

Parameters:
cols - The number of columns

checkRows

static int checkRows(int rows)
Check the number of rows

Parameters:
rows - the given number of rows
Returns:
an appropriate number of rows

parseRows

static int parseRows(java.lang.String text)
Parse a string to give the number of rows

Parameters:
text - The input string
Returns:
the number of rows

getRows

int getRows()
Get the number of rows

Returns:
the number of rows

getTileSize

int getTileSize()
Get the tile size

Returns:
the size of the tiles

checkTileSize

static int checkTileSize(int tileSize)
Check the tile size

Parameters:
tileSize - the given tile size
Returns:
an appropriate tile size

parseTileSize

static int parseTileSize(java.lang.String text)
Parse a string to give a tile size

Parameters:
text - the string to parse
Returns:
the tile size

getStream

int getStream()
Get the ID od the stream being graphed

Returns:
the stream ID

horSep

boolean horSep()
Is a horizontal separator needed

Returns:
true if a horizontal separator is needed

getHorSepEvent

int getHorSepEvent()
Get the ID of the event marked by horizontal separators

Returns:
the event ID

verSep

boolean verSep()
Is a vertical separator wanted?

Returns:
true if a vertical separator is wanted

getVerSepPeriod

int getVerSepPeriod()
Get the period for vertical separators

Returns:
the period

getVerSepStart

int getVerSepStart()
Get the vertical separation before the start

Returns:
the separation

checkVerSepPeriod

static int checkVerSepPeriod(int verSepPeriod)
Check the period for vertical separators

Parameters:
verSepPeriod - The period given
Returns:
an appropriate period

parseVerSepPeriod

static int parseVerSepPeriod(java.lang.String text)
Parse a string to give a vertical separator period

Parameters:
text - The string to parse
Returns:
the period

getVerSepLegend

boolean getVerSepLegend()
Is there a legend for vertical separators

Returns:
true if there is a legend

getVerSepLegendPeriod

int getVerSepLegendPeriod()
Get the period for vertical separators for the legend

Returns:
the period

checkVerSepLegendPeriod

static int checkVerSepLegendPeriod(int verSepLegendPeriod)
Check the period for vertical separators for the legend

Parameters:
verSepLegendPeriod - The period give
Returns:
An appropriate legend

parseVerSepLegendPeriod

static int parseVerSepLegendPeriod(java.lang.String text)
Parse a string to get the vertical separation for the legend

Parameters:
text - the text to parse
Returns:
the period

getVerSepLegendStringPost

java.lang.String getVerSepLegendStringPost()
Return the suffix for the veritcal separation legend

Returns:
the suffix

getSpaceSep

boolean getSpaceSep()
Are there space separators

Returns:
true if space separators are wanted

getSpaceSepColor

java.awt.Color getSpaceSepColor()
Get the colour for space separators

Returns:
the colour

getBGColor

java.awt.Color getBGColor()
Get the colour for background

Returns:
the colour

getUnusedColor

java.awt.Color getUnusedColor()
Get the colour wanted for unused tiles

Returns:
the colour

getZeroColor

java.awt.Color getZeroColor()
Get the colour for zero tiles

Returns:
the colour

getLowColor

java.awt.Color getLowColor()
Get the colour for low valued tiles

Returns:
the colour

getHiColor

java.awt.Color getHiColor()
Get the colour for high valued tiles

Returns:
the colour

getHorSepColor

java.awt.Color getHorSepColor()
Get the colour for horizontal separators

Returns:
the colour

getVerSepColor

java.awt.Color getVerSepColor()
Get the colour for vertical separators

Returns:
the colour

getTitleColor

java.awt.Color getTitleColor()
Get the colour for the title

Returns:
the colour

getTitlePre

java.lang.String getTitlePre()
Get a prefix for the title

Returns:
the prefix

getTitle

boolean getTitle()
Is a title wanted

Returns:
true if a title is wanted

checkFontSize

static int checkFontSize(int fontSize)
Check the font size

Parameters:
fontSize - a given size for fonts
Returns:
an appropriate font size

parseFontSize

static int parseFontSize(java.lang.String text)
Parse a string to get a font size

Parameters:
text - the string to parse
Returns:
an appropriate font size

getFontSize

int getFontSize()
Get the font size

Returns:
the font size

checkBorderSize

static int checkBorderSize(int borderSize)
Check the border size

Parameters:
borderSize - A size given for the border
Returns:
an appropriate size

parseBorderSize

static int parseBorderSize(java.lang.String text)
Parse a string to get sizse for the border

Parameters:
text - the string to parse
Returns:
an appropriate size

getBorderSize

int getBorderSize()
Get the border size

Returns:
the size

getBorderColor

java.awt.Color getBorderColor()
Get the border colour

Returns:
the colour

getHorBorderSize

int getHorBorderSize()
Get the horizontal border size

Returns:
the size

getTopBorderSize

int getTopBorderSize()
get the top border size

Returns:
the size

getBottomBorderSize

int getBottomBorderSize()
get the bottom border size

Returns:
the size

getTextGap

int getTextGap()
get the text gap

Returns:
the gap

getFont

java.awt.Font getFont()
Get the font to use

Returns:
the font

getTextWidth

int getTextWidth(java.lang.String text)
Measure the width of a string

Parameters:
text - the string to measure
Returns:
its width

revertToDefaults

void revertToDefaults(java.awt.Component component,
                      TileManagerColors tmColors)
Revert a component to its default colours

Parameters:
component - The component
tmColors - The colour configuration