com.cc.framework.ui.control
Class GaugeControl

java.lang.Object
  extended bycom.cc.framework.ui.control.Control
      extended bycom.cc.framework.ui.control.GaugeControl
All Implemented Interfaces:
AccessControlled, ActionBehavior, ClientHandler, GaugeStateModel, java.io.Serializable, StateModel

public class GaugeControl
extends Control
implements GaugeStateModel

Gauge Control

Since:
1.4
Version:
$Revision: 1.10 $
Author:
Harald Schulz
See Also:
Serialized Form

Field Summary
private  GaugeDataModel dataModel
          The Data Model
private  GaugeDesignModel designModel
          The Design Model
private static long serialVersionUID
          Serial Version UID
 
Fields inherited from class com.cc.framework.ui.control.Control
log
 
Fields inherited from interface com.cc.framework.ui.model.StateModel
PROP_CONTROL
 
Constructor Summary
GaugeControl()
          Constructor
 
Method Summary
 AlignmentType getAlignment()
          Returns the alignment for the column
 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
 DataModel getDataModel()
          Returns the data model of the Control
 ControlDesignModel getDesignModel()
          Returns the design model of the control
 java.lang.String getEmptyText()
          A text that is output in the body of the gauge element if there are no elements available (size() == 0)
 boolean getFilter()
          Returns the alignment for the column
 java.lang.String getHyperlink(int index)
          Returns a hyperlink for the given segment
 StateModel getStateModel()
          Returns the state model of the control
 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
 double getTotalAmount()
          calculate the total amount (= 100%)
 void reset()
          Resets the actual state of a control to the initial state
 void setDataModel(GaugeDataModel dataModel)
          Sets the data model
 void setDesignModel(GaugeDesignModel designModel)
          Sets the design model
 int size()
          Returns the number of segments of the gauge
 
Methods inherited from class com.cc.framework.ui.control.Control
addButton, allowAjaxRendering, execute, execute, execute, execute, execute, execute, execute, getAction, getAjaxId, getButtons, getControlName, getDesignRules, getFrameworkString, getHandler, getHandlers, getHeight, getHelp, getId, getLocaleName, getName, getPermission, getPrincipal, getProperty, getRunAt, getStyle, getStyleClass, getStyleId, getSummary, getTabIndex, getTooltip, getTransaction, getUniqueStyleId, getWidth, isAjaxEnabled, isDisabled, isFormElement, markDirty, onHelp, setAjaxAttribute, setHandler, setPrincipal, setValue, show, showButton, synchronizeState, synchronizeState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.cc.framework.ui.model.StateModel
synchronizeState
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

dataModel

private GaugeDataModel dataModel
The Data Model


designModel

private GaugeDesignModel designModel
The Design Model

Constructor Detail

GaugeControl

public GaugeControl()
Constructor

Method Detail

getDataModel

public DataModel getDataModel()
Description copied from class: Control
Returns the data model of the Control

Specified by:
getDataModel in class Control
Returns:
The data model
See Also:
Control.getDataModel()

setDataModel

public void setDataModel(GaugeDataModel dataModel)
Sets the data model

Parameters:
dataModel - DataModel

getDesignModel

public ControlDesignModel getDesignModel()
Description copied from class: Control
Returns the design model of the control

Specified by:
getDesignModel in class Control
Returns:
The ControlDesignModel
See Also:
Control.getDesignModel()

setDesignModel

public void setDesignModel(GaugeDesignModel designModel)
Sets the design model

Parameters:
designModel - ChartDesignModel

getStateModel

public StateModel getStateModel()
Description copied from class: Control
Returns the state model of the control

Specified by:
getStateModel in class Control
Returns:
The state model
See Also:
Control.getStateModel()

reset

public void reset()
Description copied from interface: StateModel
Resets the actual state of a control to the initial state

Specified by:
reset in interface StateModel
See Also:
StateModel.reset()

getAmount

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

Parameters:
index - segments index
Returns:
Amount

getTotalAmount

public double getTotalAmount()
calculate the total amount (= 100%)

Returns:
total amount

getText

public java.lang.String getText()
Returns the text that should be displayed next to the gauge

Returns:
text or null

getTooltip

public java.lang.String getTooltip(int index)
Returns the tooltip text for the given segment

Parameters:
index - segments index
Returns:
Tooltip Text or null

getHyperlink

public java.lang.String getHyperlink(int index)
Returns a hyperlink for the given segment

Parameters:
index - segment index
Returns:
Hyperlink or null

getTarget

public java.lang.String getTarget(int index)
Returns the target where to open the hyperlink

Parameters:
index - segment index
Returns:
Target or null

getClientHandler

public ClientHandler getClientHandler(int index)
Returns a set of client Handlers for this segment

Parameters:
index - segment index
Returns:
Client Handler or null

getColor

public Color getColor(int index)
Returns the color of the given segment

Parameters:
index - segments index
Returns:
Color

getEmptyText

public java.lang.String getEmptyText()
A text that is output in the body of the gauge element if there are no elements available (size() == 0)

Returns:
String

size

public int size()
Returns the number of segments of the gauge

Returns:
size

getAlignment

public AlignmentType getAlignment()
Returns the alignment for the column

Returns:
the alignment for the column

getFilter

public boolean getFilter()
Returns the alignment for the column

Returns:
the alignment for the column


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