com.cc.framework.ui.model.imp
Class GaugeDataModelImp

java.lang.Object
  extended bycom.cc.framework.ui.model.imp.GaugeDataModelImp
All Implemented Interfaces:
DataModel, GaugeDataModel, java.io.Serializable

public class GaugeDataModelImp
extends java.lang.Object
implements GaugeDataModel, java.io.Serializable

Version:
$Revision: 1.7 $
Author:
Harald Schulz
See Also:
Serialized Form

Nested Class Summary
static class GaugeDataModelImp.GaugeItem
          Item of the Gauge control
 
Field Summary
private  java.util.Vector items
          The segments which compose the gauge
private static long serialVersionUID
          Serial Version UID
private  java.lang.String text
          The optional text which is shown next to the gauge
 
Constructor Summary
GaugeDataModelImp()
          Constructor
 
Method Summary
 void addItem(double amount, java.lang.String tooltip, Color color)
          Adds a ne Item to the gauge data model
 void addItem(GaugeDataModelImp.GaugeItem item)
          Adds a ne Item to the gauge data model
 double getAmount(int index)
          Returns the absolute amount of the given segment.
 ClientHandler getClientHandler(int index)
          Returns a set of client Handlers for this segment
 Color getColor(int index)
          Returns the color of the given segment
 java.lang.String getHyperlink(int index)
          Returns a hyperlink for the given segment
 GaugeDataModelImp.GaugeItem getItem(int index)
          Retrieves the segment with the given index
 java.lang.String getTarget(int index)
          Returns the target where to open the hyperlink
 java.lang.String getText()
          Returns the text that should be displayed next to the gauge
 java.lang.String getTooltip(int index)
          Returns the tooltip text for the given segment
 void setText(java.lang.String string)
          Sets t which is displayed next to the gauge
 int size()
          Returns the number of segments of the gauge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

text

private java.lang.String text
The optional text which is shown next to the gauge


items

private java.util.Vector items
The segments which compose the gauge

Constructor Detail

GaugeDataModelImp

public GaugeDataModelImp()
Constructor

Method Detail

addItem

public void addItem(GaugeDataModelImp.GaugeItem item)
Adds a ne Item to the gauge data model

Parameters:
item - the gauge item to add

addItem

public void addItem(double amount,
                    java.lang.String tooltip,
                    Color color)
Adds a ne Item to the gauge data model

Parameters:
amount - The absolute amount
tooltip - Tooltip text
color - Color

getItem

public GaugeDataModelImp.GaugeItem getItem(int index)
Retrieves the segment with the given index

Parameters:
index - segments index
Returns:
Segment Data

getAmount

public double getAmount(int index)
Description copied from interface: GaugeDataModel
Returns the absolute amount of the given segment. The Gauge Control will calculate the segments width from this value.

Specified by:
getAmount in interface GaugeDataModel
Parameters:
index - segments index
Returns:
Amount
See Also:
GaugeDataModel.getAmount(int)

getColor

public Color getColor(int index)
Description copied from interface: GaugeDataModel
Returns the color of the given segment

Specified by:
getColor in interface GaugeDataModel
Parameters:
index - segments index
Returns:
Color
See Also:
GaugeDataModel.getColor(int)

getText

public java.lang.String getText()
Description copied from interface: GaugeDataModel
Returns the text that should be displayed next to the gauge

Specified by:
getText in interface GaugeDataModel
Returns:
text or null
See Also:
GaugeDataModel.getText()

getClientHandler

public ClientHandler getClientHandler(int index)
Description copied from interface: GaugeDataModel
Returns a set of client Handlers for this segment

Specified by:
getClientHandler in interface GaugeDataModel
Parameters:
index - segment index
Returns:
Client Handler or null
See Also:
GaugeDataModel.getClientHandler(int)

getHyperlink

public java.lang.String getHyperlink(int index)
Description copied from interface: GaugeDataModel
Returns a hyperlink for the given segment

Specified by:
getHyperlink in interface GaugeDataModel
Parameters:
index - segment index
Returns:
Hyperlink or null
See Also:
GaugeDataModel.getHyperlink(int)

getTarget

public java.lang.String getTarget(int index)
Description copied from interface: GaugeDataModel
Returns the target where to open the hyperlink

Specified by:
getTarget in interface GaugeDataModel
Parameters:
index - segment index
Returns:
Target or null
See Also:
GaugeDataModel.getTarget(int)

getTooltip

public java.lang.String getTooltip(int index)
Description copied from interface: GaugeDataModel
Returns the tooltip text for the given segment

Specified by:
getTooltip in interface GaugeDataModel
Parameters:
index - segments index
Returns:
Tooltip Text or null
See Also:
GaugeDataModel.getTooltip(int)

size

public int size()
Description copied from interface: GaugeDataModel
Returns the number of segments of the gauge

Specified by:
size in interface GaugeDataModel
Returns:
size
See Also:
GaugeDataModel.size()

setText

public void setText(java.lang.String string)
Sets t which is displayed next to the gauge

Parameters:
string - Text


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.