com.sapportals.htmlb

Class VectorChartModel

java.lang.Object
  extended bycom.sapportals.htmlb.VectorChartModel
All Implemented Interfaces:
IChartModel, Serializable

public class VectorChartModel
extends Object
implements IChartModel, Serializable

Vector based model for a Chart control

Copyright 2004 SAP AG

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.sapportals.htmlb.IChartModel
CLASS_NAME, PACKAGE_NAME
 
Constructor Summary
VectorChartModel()
          Create a new DefaultListModel.
 
Method Summary
 void addItem(String groupid, String x, String y, String color, String extension)
          adds an item to the list of choices.
 void addItem(String groupid, String x, String y, String color, String url, String altText)
          adds a new item to the data table.
 int firstRow()
          reset model to the first data row
 String getColor()
          returns the COLOR value of the current row
 String getExtension()
          returns the EXTENSION value of the current row
 String getFieldName(int which)
          gets the given field's name
 String getFieldValue(int which)
          gets the given field's value
 String getGroupId()
          returns the GROUPID's value of the current row
 int getNumColumns()
          Get the number of columns in this ChartModel
 int getNumRows()
          Get the number of rows
 int getRow()
          Get the current row
 int getRow(int which)
          Get a specific row
 String getX()
          returns the X value of the current row
 String getY()
          returns the Y value of the current row
 boolean nextRow()
          sets row pointer to next row
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VectorChartModel

public VectorChartModel()
Create a new DefaultListModel. This model is automatically created by ListBox and DropdownListBox if you add an item to the list without setting a specific model first.

Method Detail

addItem

public void addItem(String groupid,
                    String x,
                    String y,
                    String color,
                    String extension)
adds an item to the list of choices.

Parameters:
groupid - the item's group name
x - the item's category name
y - the item's value
color - the item's user defined color
extension - the item's extension data for HREF and ALTernate text

addItem

public void addItem(String groupid,
                    String x,
                    String y,
                    String color,
                    String url,
                    String altText)
adds a new item to the data table. offers additional fields 'url' and 'altText'.

Parameters:
groupid - name of the series
x - name of the category
y - value of the object
color - custom defined color value
url - adds a http url link to the graph's object
altText - adds an alternative text to the graph's object, which will be displayed as a tooltip.

getRow

public int getRow()
Description copied from interface: IChartModel
Get the current row

Specified by:
getRow in interface IChartModel
Returns:
the current row number

getRow

public int getRow(int which)
Description copied from interface: IChartModel
Get a specific row

Specified by:
getRow in interface IChartModel
Parameters:
which - the row number to query
Returns:
the row number choosen

firstRow

public int firstRow()
Description copied from interface: IChartModel
reset model to the first data row

Specified by:
firstRow in interface IChartModel
Returns:
number of first row

nextRow

public boolean nextRow()
Description copied from interface: IChartModel
sets row pointer to next row

Specified by:
nextRow in interface IChartModel
Returns:
number of next row

getFieldName

public String getFieldName(int which)
Description copied from interface: IChartModel
gets the given field's name

Specified by:
getFieldName in interface IChartModel
Returns:
the field's name

getFieldValue

public String getFieldValue(int which)
Description copied from interface: IChartModel
gets the given field's value

Specified by:
getFieldValue in interface IChartModel
Returns:
the value of the field

getGroupId

public String getGroupId()
Description copied from interface: IChartModel
returns the GROUPID's value of the current row

Specified by:
getGroupId in interface IChartModel
Returns:
String of the Group's ID

getX

public String getX()
Description copied from interface: IChartModel
returns the X value of the current row

Specified by:
getX in interface IChartModel
Returns:
String of the X value

getY

public String getY()
Description copied from interface: IChartModel
returns the Y value of the current row

Specified by:
getY in interface IChartModel
Returns:
String of the Y value

getExtension

public String getExtension()
Description copied from interface: IChartModel
returns the EXTENSION value of the current row

Specified by:
getExtension in interface IChartModel
Returns:
String of the EXTENSION value

getColor

public String getColor()
Description copied from interface: IChartModel
returns the COLOR value of the current row

Specified by:
getColor in interface IChartModel
Returns:
String of the COLOR value

getNumColumns

public int getNumColumns()
Description copied from interface: IChartModel
Get the number of columns in this ChartModel

Specified by:
getNumColumns in interface IChartModel
Returns:
number of columns

getNumRows

public int getNumRows()
Get the number of rows

Specified by:
getNumRows in interface IChartModel
Returns:
number of rows


Copyright 2006 SAP AG Complete Copyright Notice