get/setMarkerTemplateIndex()


Description:

This method assigns a marker template index to an object or series in a chart.

Syntax:

public int getMarkerTemplateIndex ( );

public int getMarkerTemplateIndex ( IdentObj id );

public int getMarkerTemplateIndex ( int seriesID );

public void setMarkerTemplateIndex ( IdentObj id, int integerMarkerTemplate );

public void setMarkerTemplateIndex ( IdentObj id, int newValue );

public void setMarkerTemplateIndex ( int newValue );

public void setMarkerTemplateIndex ( int seriesID, int newValue );

Input Parameters:

id: Object ID

seriesID: series number

newValue: = 0...6 (0 = Null, 1 = Square, 2 = Circle, 3 = Diamond, 4 = Plus, 5 = Triangle/Down, 6 = Triangle/Up)

Return Values:

getMarkerTempleteIndex(): 0...6 (0 = Null, 1 = Square, 2 = Circle, 3 = Diamond, 4 = Plus, 5 = Triangle/Down, 6 = Triangle/Up).

setMarkerTemplateIndex(): None

Code Sample:
 

import TDG.draw.IdentObj;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		IdentObj id;
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.setUseSampleData(false);
		perspective1.setGraphType(41);
		perspective1.setData(0,0,1);
		perspective1.setData(0,1,2);
		perspective1.setData(1,0,11);
		perspective1.setData(1,1,12);
		perspective1.setSeriesLabel (0,"Series 0");
		perspective1.setSeriesLabel (1,"Series 1");
		id = perspective1.getSeries(0);
		perspective1.setMarkerTemplateIndex(id,4);
		id = perspective1.getSeries(1);
		perspective1.setMarkerTemplateIndex(id,3);
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

get/setMarkerShape, get/setMarkerSize, get/setMarkerTemplate, and the MarkerDisplay and MarkerSizeDefault properties in Chapter 7.

getMinimumSize()


Description:

This method returns the minimum dimensions (height and width) of a Perspective for Java chart.

Syntax:

public Dimension getMinimumSize ( );

Input Parameters:

None

Return Values:

Dimension = the minimum size (Height=100, Width=100)

Code Sample:
 

/*
	A basic extension of the java.applet.Applet class
 */

import java.awt.*;
import java.applet.*;
import java.awt.Dimension;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		Dimension MinDim;
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		MinDim=perspective1.getMinimumSize();
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}

getNumGroups()


Description:

This method is used to determine the number of groups in a chart.

Syntax:

public int getNumGroups ( );

Input Parameters:

None

Return Values:

int = Number of groups in the chart

Code Sample:
 

/*	A basic extension of the java.applet.Applet class */
import java.awt.*;
import java.applet.*;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		int i;
		setLayout(null);
		setSize(426,266);
		perspective1 = new TDG.Perspective();
		perspective1.setBounds(0,0,426,266);
		i = perspective1.getNumGroups();
		perspective1.setO1LabelWrap(true);
		perspective1.setO1LabelAutofit(false);
		perspective1.setGroupLabel(i-1,"This is the largest group");
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

getNumSeries

getNumSeries()


Description:

This method gets the number of series in a chart.

Syntax:

public int getNumSeries ( );

Input Parameters:

None

Return Values:

int = Number of series in the chart

Code Sample:
 

/* 	A basic extension of the java.applet.Applet class */
import java.awt.*;
import java.applet.*;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		int i;
		setLayout(null);
		setSize(426,266);
		perspective1 = new TDG.Perspective();
		i = perspective1.getNumSeries();
		perspective1.setSeriesLabel(i-1,"This is the largest series");
		perspective1.setBounds(0,0,426,247);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

getNumGroups

get/setPieSliceDelete()


Description:

These methods can be used to set/determine whether or not pie slices have been deleted from a pie chart.

Syntax:

public boolean getPieSliceDelete ( );

public boolean getPieSliceDelete ( IdentObj id );

public boolean getPieSliceDelete ( int seriesID );

public boolean getPieSliceDelete ( int seriesID, int groupID);

public void setPieSliceDelete ( boolean newValue);

public void setPieSliceDelete ( IdentObj id, boolean newValue );

public void setPieSliceDelete ( int seriesID, boolean newValue );

public void setPieSliceDelete ( int seriesID, int groupID,
boolean newValue);

Input Parameters:

id: Object ID

seriesID: series number

groupID: group number

newValue: TRUE = delete slice / FALSE = do not delete slice

Return Values:

getPieSliceDelete(): TRUE = slices have been deleted / FALSE = slices not deleted

setPieSliceDelete(): None

Code Sample:
 

/* 	A basic extension of the java.applet.Applet class */
import java.awt.*;
import java.applet.*;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.setBounds(0,0,300,200);
		perspective1.setGraphType(55);
		boolean b = perspective1.getPieSliceDelete (1);
		if (b==false)perspective1.setPieSliceDelete(1,true);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

get/setPieSliceDetach and the Pie... properties in Chapter 7

 

get/setPieSliceDetach()


Description:

These methods can be used to get/set the distance a slice is detached from a pie chart.

Syntax:

public int getPieSliceDetach ( );

public int getPieSliceDetach ( IdentObj id );

public int getPieSliceDetach ( int seriesID );

public int getPieSliceDetach ( int seriesID, int groupID );

public void setPieSliceDetach ( boolean newValue);

public void setPieSliceDetach ( IdentObj id, boolean newValue );

public void setPieSliceDetach ( int seriesID, boolean newValue );

public void setPieSliceDetach ( int seriesID, int groupID, int newValue);

Input Parameters:

id: Object ID

seriesID: series number

groupID: group number

newValue: 0...100

Return Values:

getPieSliceDetach(): 0...100

setPieSliceDetach(): None

Code Sample:
 

import java.awt.*;
import java.applet.*;
import TDG.draw.IdentObj;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		IdentObj id;
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.setUseSampleData(false);
		perspective1.setGraphType(55);
		perspective1.setData(0,0,1);
		perspective1.setData(0,1,2);
		perspective1.setData(0,2,3);
		perspective1.setData(0,3,4);
		perspective1.setData(1,0,11);
		perspective1.setData(1,1,12);
		perspective1.setData(1,2,13);
		perspective1.setData(1,3,14);
		perspective1.setSeriesLabel (0,"Series 0");
		perspective1.setSeriesLabel (1,"Series 1");
		perspective1.setPieSliceDetach (0,0,100);
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

get/setPieSliceDelete and the Pie... properties in Chapter 7.

get/setRect()


Description:

These methods get/set the bounding rectangle for a user-movable object in virtual coordinates (x, y, width, height). See Chapter 3 for a description of the virtual coordinates and a list of user-movable objects.

Syntax:

public Rectangle getRect ( );

public Rectangle getRect ( IdentObj id );

public Rectangle getRect ( int objectID );

public void setRect ( Rectangle newValue );

public void setRect ( IdentObj id, Rectangle newValue );

public void setRect ( int objectID, Rectangle newValue );

Input Parameters:

id or objectID: the ID number of an object in a chart

Rectangle: the bounding rectangle for a user-movable object in virtual coordinates (x, y, width, height)

Return Values:

getRect(): Rectangle = the bounding rectangle for a user-movable object in virtual coordinates (x, y, width, height)

setRect(): None

Code Sample:
 

/*
	A basic extension of the java.applet.Applet class
 */

import java.awt.*;
import java.applet.*;
import TDG.draw.IdentObj;
import java.awt.Point;
import java.awt.Rectangle;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		Point myPoint=null;
		Rectangle myRect=null;
		IdentObj id;
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		myPoint = perspective1.getFrameDepthOffset();
		myRect = perspective1.getFrameRect(true);
		perspective1.setLegendRect(myRect,true);
		id=perspective1.getFrame();
		perspective1.setRect(id, myRect);
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

get/setFrameRect, get/setLegendRect

get/setScaleMax()


Description:

These methods get/set the maximum scale value assigned to a numeric axis in a chart. You may also use one of the axis-specific properties/methods to get/set the maximum scale on a particular axis (e.g., X1ScaleMax(), Y1ScaleMax(), Y2ScaleMax(), etc.). If getScaleMaxAuto() returns a value of TRUE or setScaleMaxAuto() sets autoscaling to TRUE, the value returned by getScaleMax() or set by setScaleMax() will be ignored. If an object ID is not specified, the method gets/sets the value of this attribute (if any) for the first item in the selection list.

Syntax:

public double getScaleMax ( );

public double getScaleMax ( IdentObj id );

public double getScaleMax ( int objectID );

public void setScaleMax ( double newValue );

public void setScaleMax ( IdentObj id, double newValue );

public void setScaleMax ( int objectID, double newValue );

Input Parameters:

id or objectID: Object ID
newValue: a value identifying the maximum scale value on an axis

Return Values:

getScaleMax(): double = the maximum value that can be used on the axis identified by id or objectID

setScaleMax(): None

Code Sample:
 

import TDG.draw.IdentObj;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		IdentObj id;
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.setUseSampleData(false);
		perspective1.setGraphType(17);
		perspective1.setData(0,0,1);
		perspective1.setData(0,1,2);
		perspective1.setData(0,2,3);
		perspective1.setData(0,3,4);
		id = perspective1.getY1Axis();
		perspective1.setScaleMaxAuto(id,false);
		perspective1.setScaleMax (id,20);
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

get/setScaleMaxAuto, get/setScaleMin, get/setScaleMinAuto, and the following properties in Chapter 7: X1ScaleMax, X1ScaleMaxAuto, Y1ScaleMax, Y1ScaleMaxAuto, Y2ScaleMax, Y2ScaleMaxAuto

get/setScaleMaxAuto()


Description:

These methods get/set automatic calculation of the maximum scale value for a numeric axis. You may also use one of the axis-specific properties to get/set automatic scaling on a particular axis (e.g., X1ScaleMaxAuto(), Y1ScaleMaxAuto(), Y2ScaleMaxAuto(), etc.). If this method returns a value of true, a value returned by getScaleMax() or set by setScaleMax() is ignored. If an object ID is not specified, this method returns the value of this attribute (if any) for the first item in the selection list.

Syntax:

public boolean getScaleMaxAuto ( );

public boolean getScaleMaxAuto ( IdentObj id );

public boolean getScaleMaxAuto ( int objectID );

public void setScaleMaxAuto ( boolean newValue );

public void setScaleMaxAuto ( IdentObj id, boolean newValue );

public void setScaleMaxAuto ( int objectID, boolean newValue );

Input Parameters:

id or objectID: the ID number of an object in a chart

newValue: TRUE = automatically calculate maximum value on axis / FALSE = use value set by setScaleMax()

Return Values:

getScaleMaxAuto(): TRUE = max value is automatically scaled / FALSE = max value is not automatically scaled

setScaleMaxAuto(): None

Code Sample:
 

import TDG.draw.IdentObj;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		IdentObj id;
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.setUseSampleData(false);
		perspective1.setGraphType(17);
		perspective1.setData(0,0,1);
		perspective1.setData(0,1,2);
		perspective1.setData(0,2,3);
		perspective1.setData(0,3,4);
		id = perspective1.getY1Axis();
		perspective1.setScaleMaxAuto(id,false);
		perspective1.setScaleMax (id,20);
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

get/setScaleMax, get/setScaleMin, get/setScaleMinAuto, and the following properties in Chapter 7: X1ScaleMax, X1ScaleMaxAuto, Y1ScaleMax, Y1ScaleMaxAuto, Y2ScaleMax, Y2ScaleMaxAuto

get/setScaleMin()


Description:

These methods get/set the minimum scale value assigned to a numeric axis in a chart. You may also use one of the axis-specific properties/methods to get/set the minimum scale on a particular axis (e.g., X1ScaleMin(), Y1ScaleMin(), Y2ScaleMin(), etc.). If getScaleMinAuto() returns a value of TRUE or setScaleMinAuto() sets autoscaling to TRUE, the value returned by getScaleMin() or set by setScaleMin() will be ignored. If an object ID is not specified, the method gets/sets the value of this attribute (if any) for the first item in the selection list.

Syntax:

public double getScaleMin ( );

public double getScaleMin ( IdentObj id );

public double getScaleMin ( int objectID);

public void setScaleMin ( double newValue );

public void setScaleMin ( IdentObj id, double newValue );

public void setScaleMin ( int objectID, double newValue );

Input Parameters:

id or objectID: the ID number of an object in a chart

newValue: the minimum scaling value that can be used on an axis

Return Values:

getScaleMin(): the minimum scale value on the axis

setScaleMin(): None

Code Sample:
 

import TDG.draw.IdentObj;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		IdentObj id;
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.setUseSampleData(false);
		perspective1.setGraphType(17);
		perspective1.setData(0,0,11);
		perspective1.setData(0,1,12);
		perspective1.setData(0,2,13);
		perspective1.setData(0,3,14);
		id = perspective1.getY1Axis();
		perspective1.setScaleMaxAuto(id,false);
		perspective1.setScaleMax (id,20);
		perspective1.setScaleMinAuto(id,false);
		perspective1.setScaleMin(id,10);
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

get/setScaleMax, get/setScaleMaxAuto, get/setScaleMinAuto, and the following properties in Chapter 7: X1ScaleMin, X1ScaleMinAuto, Y1ScaleMin, Y1ScaleMinAuto, Y2ScaleMin, Y2ScaleMinAuto

get/setScaleMinAuto()


Description:

These methods get/set automatic calculation of the maximum scale value for a numeric axis. You may also use one of the axis-specific properties to get/set automatic scaling on a particular axis (e.g., X1ScaleMinAuto(), Y1ScaleMinAuto(), Y2ScaleMinAuto(), etc.). If these methods set or returns a value of true, a value returned by getScaleMin() or set by setScaleMin() is ignored.

Syntax:

public boolean getScaleMinAuto ( );

public boolean getScaleMinAuto ( IdentObj id );

public boolean getScaleMinAuto ( int objectID );

public void setScaleMinAuto ( boolean newValue );

public void setScaleMinAuto ( IdentObj id, boolean newValue );

public void setScaleMinAuto ( int objectID, boolean newValue );

Input Parameters:

id or objectID: the ID number of an object in a chart

newValue: TRUE = automatically calculate minimum value / FALSE = use value set by setScaleMin()

Return Values:

getScaleMinAuto(): TRUE = min value is automatically calculated / FALSE = min value is not automatically calculated

setScaleMinAuto(): None

Code Sample:
 

import TDG.draw.IdentObj;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		IdentObj id;
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.setUseSampleData(false);
		perspective1.setGraphType(17);
		perspective1.setData(0,0,11);
		perspective1.setData(0,1,12);
		perspective1.setData(0,2,13);
		perspective1.setData(0,3,14);
		id = perspective1.getY1Axis();
		perspective1.setScaleMaxAuto(id,false);
		perspective1.setScaleMax (id,20);
		perspective1.setScaleMinAuto(id,false);
		perspective1.setScaleMin(id,10);
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

get/setScaleMax, get/setScaleMaxAuto, get/setScaleMin, and the following properties in Chapter 7: X1ScaleMin, X1ScaleMinAuto, Y1ScaleMin, Y1ScaleMinAuto, Y2ScaleMin, Y2ScaleMinAuto

get/setScaleMustIncludeZero()


Description:

These methods are used to get/set whether or not a given axis must include a zero value. You may also use one of the axis-specific properties/methods to get/set a mandatory zero on a particular axis (e.g., X1MustIncludeZero(), Y1MustIncludeZero(), Y2MustIncludeZero (), etc.). If an object ID is not specified, the method gets/set the value of this attribute (if any) for the first item in the selection list.

Syntax:

public boolean getScaleMustIncludeZero ( );

public boolean getScaleMustIncludeZero ( IdentObj id );

public boolean getScaleMustIncludeZero ( int objectID );

public void setScaleMustIncludeZero ( boolean newValue );

public void setScaleMustIncludeZero(IdentObj id, boolean newValue );

public void setScaleMustIncludeZero(int objectID, boolean newValue );

Input Parameters:

id or objectID: the ID number of an object in a chart

newValue: TRUE = axis must include zero / FALSE = zero is not required on this axis

Return Values:

getScaleMustIncludeZero(): TRUE = axis must include zero / FALSE = zero is not required on this axis

setScaleMustIncludeZero(): None

Code Sample:
 

import java.awt.*;
import java.applet.*;
import TDG.draw.IdentObj;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		IdentObj id;
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.setUseSampleData(false);
		perspective1.setGraphType(17);
		perspective1.setData(0,0,11);
		perspective1.setData(0,1,12);
		perspective1.setData(0,2,13);
		perspective1.setData(0,3,14);
		id = perspective1.getY1Axis();
		perspective1.setScaleMaxAuto(id,false);
		perspective1.setScaleMax (id,20);
		perspective1.setScaleMinAuto(id,false);
		perspective1.setScaleMin(id,-10);
		perspective1.setScaleMustIncludeZero(id,true);
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

X1MustIncludeZero, Y1MustIncludeZero, Y2MustIncludeZero

getSelectionBorderColor()


Description:

This method gets the border color (if any) for the first item in the selection list.

Syntax:

public Color getSelectionBorderColor ( );

Input Parameters:

None

Return Values:

Color = the border color of the first item in the selection list.

Code Sample:
 

import java.awt.*;
import java.applet.*;
import TDG.draw.IdentObj;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.setUseSampleData(false);
		perspective1.setGraphType(2);
		perspective1.setViewing3DAnglePreset(-1);
		perspective1.setData(0,0,10);
		perspective1.setData(0,1,11);
		perspective1.setData(0,2,12);
		perspective1.setData(0,3,13);
		perspective1.setSelectionEnable(3);
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
		//{{REGISTER_LISTENERS
		SymMouse aSymMouse = new SymMouse();
		perspective1.addMouseListener(aSymMouse);
		//}}
	}
	//{{DECLARE_CONTROLS
	TDG.Perspective perspective1;
	//}}
	class SymMouse extends java.awt.event.MouseAdapter
	{
		public void mouseClicked(java.awt.event.MouseEvent event)
		{
			Object object = event.getSource();
			if (object == perspective1)
				perspective1_mouseClicked(event);
		}
	}
	void perspective1_mouseClicked(java.awt.event.MouseEvent event)
	{
		// to do: code goes here.
		Color myColor;
		IdentObj id;
		myColor=perspective1.getSelectionBorderColor();
		id = perspective1.getCubeRightWall();
		perspective1.setFillColor(id, myColor);
	}
}
Also See:

get/setBorderColor, get/setTransparentBorderColor, selectionHasTransparentBorderColor, setSeriesBorderColor

getSelectionFillColor()


Description:

This method returns the fill color (if any) for the first item in the selection list.

Syntax:

public Color getSelectionFillColor ( );

Input Parameters:

None.

Return Values:

Color = the fill color of the first item in the selection list.

Code Sample:
 

import java.awt.*;
import java.applet.*;
import TDG.draw.IdentObj;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.setUseSampleData(false);
		perspective1.setGraphType(2);
		perspective1.setViewing3DAnglePreset(-1);
		perspective1.setData(0,0,10);
		perspective1.setData(0,1,11);
		perspective1.setData(0,2,12);
		perspective1.setData(0,3,13);
		perspective1.setSelectionEnable(3);
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
		//{{REGISTER_LISTENERS
		SymMouse aSymMouse = new SymMouse();
		perspective1.addMouseListener(aSymMouse);
		//}}
	}
	//{{DECLARE_CONTROLS
	TDG.Perspective perspective1;
	//}}
	class SymMouse extends java.awt.event.MouseAdapter
	{
		public void mouseClicked(java.awt.event.MouseEvent event)
		{
			Object object = event.getSource();
			if (object == perspective1)
				perspective1_mouseClicked(event);
		}
	}
	void perspective1_mouseClicked(java.awt.event.MouseEvent event)
	{
		// to do: code goes here.
		Color myColor;
		IdentObj id;
		myColor=perspective1.getSelectionFillColor();
		id = perspective1.getCubeRightWall();
		perspective1.setFillColor(id, myColor);
	}
}
Also See:

get/setFillColor, get/setTransparentFillColor, selectionHasTransparentFillColor, setSeriesFillColor

getSelGroup()


Description:

This method gets number of the group that is currently selected (if any).

Syntax:

public int getSelGroup ( );

Input Parameters:

None

Return Values:

int = the number of the group that is currently selected

Code Sample:
 

import java.awt.*;
import java.applet.*;
import TDG.draw.IdentObj;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.setSelectionEnable(2);
		perspective1.setSubtitleString("");
		perspective1.setGraphType(2);
		perspective1.setUseSampleData(false);
		perspective1.setO1TitleString("");
		perspective1.setY2TitleDisplay(false);
		perspective1.setFootnoteString("");
		perspective1.setY1TitleDisplay(false);
		perspective1.setY1TitleString("");
		perspective1.setTitleString("");
		perspective1.setY2TitleString("");
		perspective1.setO1TitleDisplay(false);
		perspective1.setViewing3DAnglePreset(-1);
		perspective1.setBounds(0,0,300,181);
		add(perspective1);
		SymMouse aSymMouse = new SymMouse();
		perspective1.addMouseListener(aSymMouse);
	}
	TDG.Perspective perspective1;
	class SymMouse extends java.awt.event.MouseAdapter
	{
		public void mouseClicked(java.awt.event.MouseEvent event)
		{
			Object object = event.getSource();
			if (object == perspective1)
				perspective1_mouseClicked(event);
		}
	}
	void perspective1_mouseClicked(java.awt.event.MouseEvent event)
	{	// to do: code goes here.
		int grp;
		int ser;
		String label = "";
		grp = perspective1.getSelGroup();
		ser = perspective1.getSelSeries();
		label = perspective1.getDataAsString(ser,grp);
		perspective1.setGroupLabel(grp, label);
		perspective1.setSeriesLabel(ser,label);
	}
}
Also See:

getSelSeries

getSelSeries()


Description:

This method gets the number of the series that is currently selected (if any) in a chart.

Syntax:

public int getSelSeries ( );

Input Parameters:

None

Return Values:

int = Number of the series that is currently selected

Code Sample:
 

import java.awt.*;
import java.applet.*;
import TDG.draw.IdentObj;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.setSelectionEnable(2);
		perspective1.setSubtitleString("");
		perspective1.setGraphType(2);
		perspective1.setUseSampleData(false);
		perspective1.setO1TitleString("");
		perspective1.setY2TitleDisplay(false);
		perspective1.setFootnoteString("");
		perspective1.setY1TitleDisplay(false);
		perspective1.setY1TitleString("");
		perspective1.setTitleString("");
		perspective1.setY2TitleString("");
		perspective1.setO1TitleDisplay(false);
		perspective1.setViewing3DAnglePreset(-1);
		perspective1.setBounds(0,0,300,181);
		add(perspective1);
		SymMouse aSymMouse = new SymMouse();
		perspective1.addMouseListener(aSymMouse);
	}
	TDG.Perspective perspective1;
	class SymMouse extends java.awt.event.MouseAdapter
	{
		public void mouseClicked(java.awt.event.MouseEvent event)
		{
			Object object = event.getSource();
			if (object == perspective1)
				perspective1_mouseClicked(event);
		}
	}
	void perspective1_mouseClicked(java.awt.event.MouseEvent event)
	{
		// to do: code goes here.
		int grp;
		int ser;
		String label = "";
		grp = perspective1.getSelGroup();
		ser = perspective1.getSelSeries();
		label = perspective1.getDataAsString(ser,grp);
		perspective1.setGroupLabel(grp, label);
		perspective1.setSeriesLabel(ser,label);
	}
}

get/setSeriesLabel()


Description:

These methods get/set the label string associated with a series in a chart.

Syntax:

public string getSeriesLabel ( );

public string getSeriesLabel ( IdentObj id );

public string getSeriesLabel ( int objectID );

public void setSeriesLabel ( String newValue );

public void setSeriesLabel ( IdentObj id, String newValue );

public void setSeriesLabel ( int seriesID, String newValue );

Input Parameters:

id or objectID: the ID number of an object in a chart

seriesID: series number

newValue: series label string

Return Values:

getSeriesLabel(): string = series label

setSeriesLabel(): None

Code Sample:
 

/* 	A basic extension of the java.applet.Applet class */
import java.awt.*;
import java.applet.*;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		int i;
		setLayout(null);
		setSize(426,266);
		perspective1 = new TDG.Perspective();
		i = perspective1.getNumSeries();
		perspective1.setSeriesLabel(i-1,"This is the largest series");
		perspective1.setBounds(0,0,426,247);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

getSelSeries

get/setSeriesType()


Description:

These methods get/set the series type for a specific object, series number, or the first item in the selection list.

Syntax:

public int getSeriesType ( );

public int getSeriesType ( IdentObj id );

public int getSeriesType ( int seriesID );

public void setSeriesType ( int newValue );

public void setSeriesType ( IdentObj id, int newValue );

public void setSeriesType ( int seriesID, int newValue );

Input Parameters:

id: the ID number of an object in a chart

seriesID: series number

newValue: series type (0 = riser unspecified, 1=riser bar, 2=riser marker, 3=riser area)

Return Values:

getSeriesType(): int = the series type (0 = riser unspecified, 1=riser bar, 2=riser marker, 3=riser area)

setSeriesType(): None

Code Sample:
 

/*
	A basic extension of the java.applet.Applet class
 */

import java.awt.*;
import java.applet.*;

import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.setSeriesType(1,1);
		perspective1.setSeriesType(2,2);
		perspective1.setSeriesType(3,3);
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}

get/setShadowColor()


Description:

These methods get/set the color value of a drop shadow for a specified object in a chart.

Syntax:

public color getShadowColor ( IdentObj id );

public void setShadowColor( IdentObj id, Color newValue )

Input Parameters:

id: Identification number of an object in a chart

newValue: the value of the drop shadow applied to id

Return Values:

getShadowColor(): color = the value of the drop shadow applied to id, null = no drop shadow color applied

setShadowColor(): None

Code Sample:
 

/*
	A basic extension of the java.applet.Applet class
 */

import java.awt.*;
import java.applet.*;
import TDG.draw.IdentObj;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		IdentObj id;
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		id = perspective1.getFrame();
		perspective1.setShadowDisplay(id,true);
		perspective1.setShadowColor(id, new Color(0,0,0));
		perspective1.setShadowXOffset(id,10);
		perspective1.setShadowYOffset(id,12);
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

get/setShadowDisplay, get/setShadowXOffset, get/setShadowYOffset

get/setShadowDisplay()


Description:

This method can be used to determine whether or not a drop shadow is displayed for a particular object in a chart.

Syntax:

public boolean getShadowDisplay ( );

public boolean getShadowDisplay ( IdentObj id );

public boolean getShadowDisplay ( int objectID );

public void setShadowDisplay ( boolean newValue );

public void setShadowDisplay ( IdentObj id, boolean newValue );

public void setShadowDisplay ( int objectID, boolean newValue );

Input Parameters:

id or objectID: the ID number of an object in a chart

newValue: TRUE = display drop shadow/FALSE = do not display drop shadow

Return Values:

getShadowDisplay(): TRUE = drop shadow is displayed / FALSE = drop shadow is not displayed

setShadowDisplay(): None

Code Sample:
 

/*
	A basic extension of the java.applet.Applet class
 */

import java.awt.*;
import java.applet.*;
import TDG.draw.IdentObj;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		IdentObj id;
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		id = perspective1.getFrame();
		perspective1.setShadowDisplay(id,true);
		perspective1.setShadowColor(id, new Color(0,0,0));
		perspective1.setShadowXOffset(id,10);
		perspective1.setShadowYOffset(id,12);
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

get/setShadowColor, get/setShadowXOffset, get/setShadowYOffset

get/setShadowXOffset()


Description:

These methods get/set the offset in the X-direction of a drop shadow for a particular object in a chart.

Syntax:

public int getShadowXOffset ( );

public int getShadowXOffset ( IdentObj id );

public int getShadowXOffset ( int objectID );

public void setShadowXOffset ( int newValue );

public void setShadowXOffset ( IdentObj id, int newValue );

public void setShadowXOffset ( int objectID, int newValue );

Input Parameters:

id or objectID: Identification number of an object in a chart

newValue: X-direction offset of the drop shadow applied to id, null = no drop shadow applied

Return Values:

getShadowXOffset(): int = X-direction offset of the drop shadow applied to id, null = no drop shadow applied

setShadowXOffset(): None

Code Sample:
 

setShadowDisplay(getTitle(),false);
setShadowXOffset(getTitle(),2);
setShadowYOffset(getTitle(),2); 
Also See:

get/setShadowColor, get/setShadowDisplay, get/setShadowYOffset

get/setShadowYOffset()


Description:

These methods can be used to get/set the offset in the Y-direction of a drop shadow for a particular object in a chart.

Syntax:

public int getShadowYOffset ( );

public int getShadowYOffset ( IdentObj id );

public int getShadowYOffset ( int objectID );

public void setShadowYOffset ( int newValue );

public void setShadowYOffset ( IdentObj id, int newValue );

public void setShadowYOffset ( int objectID, int newValue );

Input Parameters:

id or objectID: the ID number of an object in a chart

newValue: Y-direction offset of the drop shadow applied to id, , null = no drop shadow applied

Return Values:

getShadowYOffset(): int = Y-direction offset of the drop shadow applied to id, , null = no drop shadow applied

setShadowYOffset(): None

Code Sample:
 

setShadowDisplay(getTitle(),false);
setShadowXOffset(getTitle(),2);
setShadowYOffset(getTitle(),2); 
Also See:

get/setShadowColor, get/setShadowDisplay, get/setShadowXOffset

get/setTextFormatPattern()


Description:

These methods can be used to get/set a standard Java number format pattern for data text.

Syntax:

public String getTextFormatPattern ( );

public void setTextFormatPattern ( String szPattern );

Input Parameters:

getTextFormatPattern(): None
setTextFormatPattern(): szPattern = A pattern string in the following format:
pattern:= subpattern{;subpattern}
subpattern:= {prefix}integer{.fraction}{suffix}
prefix:= '\\u0000'..'\\uFFFD' - specialCharacters
suffix:= '\\u0000'..'\\uFFFD' - specialCharacters
integer:= '#'* '0'* '0'
fraction:= '0'* '#'*
See Chapter 3 for more detailed information about this format pattern

Return Values:

getTextFormatPattern(): String = A pattern string in the following format:
pattern:= subpattern{;subpattern}
subpattern:= {prefix}integer{.fraction}{suffix}
prefix:= '\\u0000'..'\\uFFFD' - specialCharacters
suffix:= '\\u0000'..'\\uFFFD' - specialCharacters
integer:= '#'* '0'* '0'
fraction:= '0'* '#'*
See Chapter 3 for more detailed information about this format pattern

setTextFormatPattern(): None

Also See:

get/setTextFormatPreset(),DataTextFormat, PieFeelerTextFormat, PieRingTotalFormat, X1LabelFormat, Y1LabelFormat, Y2LabelFormat

get/setTextFormatPreset()


Description:

This method can be used to set and determine the format of a text object. See "Getting an Object ID" at the beginning of this chapter to get the ID of a text object.

Syntax:

public int getTextFormatPreset ( );

public int getTextFormatPreset ( IdentObj id );

public int getTextFormatPreset ( int objectID );

public void setTextFormatPreset ( int newValue );

public void setTextFormatPreset ( IdentObj id, int newValue );

public void setTextFormatPreset ( int objectID, int newValue );

Input Parameters:

id or objectID: the ID number of an object in a chart
newValue: -1...14 (-1 = use format set by setTextFormatPattern();)

 

Value

Format

Example

Value

Format

Example

 

0

General

560

8

$0K

$56K

 

1

General

560

9

0M

56M

 

2

0%

56%

10

$0M

$56M

 

3

0.0%

56.6%

11

0B

56B

 

4

0.00%

56.66%

12

$0B

$56B

 

5

$0.00

$56.66

13

0T

56T

 

6

$0

$56

14

$0T

$56T

 

7

0K

56K

     
Return Values:

getTextFormatPreset(): value of text format (-1...14)

setTextFormatPreset(): None

Code Sample:
 

setTextFormatPreset(getY1Label(),0);

Also See:

get/setTextFormatPattern(), DataTextFormat, PieFeelerTextFormat, PieRingTotalFormat, X1LabelFormat, Y1LabelFormat, Y2LabelFormat

get/setTextJustHoriz()


Description:

These methods can be used to get/set horizontal justification of text in a chart. See "Getting an Object ID" at the beginning of this chapter to get the ID of a text object.

Syntax:

public int getTextJustHoriz ( );

public int getTextJustHoriz ( IdentObj id );

public int getTextJustHoriz ( int objectID );

public void setTextJustHoriz ( int newValue );

public void setTextJustHoriz ( IdentObj id, int newValue );

public void setTextJustHoriz ( int objectID, int newValue );

Input Parameters:

id or objectID: the ID number of an object in a chart

newValue: 0...2 (0=Left, 1=Center, 2=Right)

Return Values:

getTextJustHoriz(): 0...2 (0=Left, 1=Center, 2=Right)

setTextJustHoriz(): None

Code Sample:
 

import java.awt.*;
import java.applet.*;
import TDG.draw.IdentObj;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		IdentObj id;
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.setUseSampleData(false);
		perspective1.setGraphType(17);
		perspective1.setData(0,0,10);
		perspective1.setData(0,1,11);
		perspective1.setData(0,2,12);
		perspective1.setData(0,3,13);
		perspective1.setGroupLabel(0,"Group 0");
		perspective1.setGroupLabel(1,"Group 1");
		perspective1.setGroupLabel(2,"Group 2");
		perspective1.setGroupLabel(3,"Group 3");
		perspective1.setAutofit(false);
		perspective1.setFontSize(24);
		id = perspective1.getO1Label();
		perspective1.setTextJustVert(id,1);
		perspective1.setTextJustHoriz(id,2);
		perspective1.setSeriesBorderColor(3,new Color (0,0,0));
		perspective1.setSeriesFillColor(3, new Color (255,255,255));
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

get/setTextJustVert

get/setTextJustVert()


Description:

These methods can be used to get/set vertical justification of text in a chart. See "Getting an Object ID" at the beginning of this chapter to get the ID of a text object.

Syntax:

public int getTextJustVert ( );

public int getTextJustVert ( IdentObj id );

public int getTextJustVert ( int objectID );

public void setTextJustVert ( int newValue );

public void setTextJustVert ( IdentObj id, int newValue );

public void setTextJustVert ( int objectID, int newValue );

Input Parameters:

id or objectID: the ID number of an object in a chart

newValue: 0...2 (0=Top, 1=Center, 2=Bottom)

Return Values:

getTextJustVert(): 0...2 (0=Top, 1=Center, 2=Bottom)

setTextJustVert(): None

Code Sample:
 

import java.awt.*;
import java.applet.*;
import TDG.draw.IdentObj;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		IdentObj id;
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.setUseSampleData(false);
		perspective1.setGraphType(17);
		perspective1.setData(0,0,10);
		perspective1.setData(0,1,11);
		perspective1.setData(0,2,12);
		perspective1.setData(0,3,13);
		perspective1.setGroupLabel(0,"Group 0");
		perspective1.setGroupLabel(1,"Group 1");
		perspective1.setGroupLabel(2,"Group 2");
		perspective1.setGroupLabel(3,"Group 3");
		perspective1.setAutofit(false);
		perspective1.setFontSize(24);
		id = perspective1.getO1Label();
		perspective1.setTextJustVert(id,1);
		perspective1.setTextJustHoriz(id,2);
		perspective1.setSeriesBorderColor(3,new Color (0,0,0));
		perspective1.setSeriesFillColor(3, new Color (255,255,255));
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

get/setTextJustHoriz

get/setTextRotation()


Description:

These methods can be used to set/determine the angle by which text is rotated. See "Getting an Object ID" at the beginning of this chapter to get the ID of the text object to be rotated.

Syntax:

public int getTextRotation ( );

public int getTextRotation ( IdentObj id );

public int getTextRotation ( int objectID );

public void setTextRotation ( int newValue );

public void setTextRotation ( IdentObj id, int newValue );

public void setTextRotation ( int objectID, int newValue );

Input Parameters:

id or objectID: the ID number of an object in a chart

newValue: 0...2 (0=none, 1=90 degrees, 2=270 degrees)

Return Values:

getTextRotation():0...2 (0=none, 1=90 degrees, 2=270 degrees)

setTextRotation(): None

Code Sample:
 

import TDG.draw.IdentObj;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		IdentObj id;
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.setUseSampleData(false);
		perspective1.setGraphType(17);
		perspective1.setData(0,0,10);
		perspective1.setData(0,1,11);
		perspective1.setData(0,2,12);
		perspective1.setData(0,3,13);
		perspective1.setGroupLabel(0,"Group 0");
		perspective1.setGroupLabel(1,"Group 1");
		perspective1.setGroupLabel(2,"Group 2");
		perspective1.setGroupLabel(3,"Group 3");
		perspective1.setAutofit(false);
		perspective1.setFontSize(24);
		id = perspective1.getO1Label();
		perspective1.setTextJustVert(id,1);
		perspective1.setTextJustHoriz(id,2);
		perspective1.setSeriesBorderColor(3,new Color (0,0,0));
		perspective1.setSeriesFillColor(3, new Color (255,255,255));
		perspective1.setY1TitleString("This is the Y1 Axis Title");
		id = perspective1.getY1Title();
		perspective1.setTextRotation(id,2);
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

O1LabelRotate, X1LabelRotate, Y1LabelRotate, Y2LabelRotate

get/setTextString()


Description:

These methods get/set the string that is displayed in a text object. See "Getting an Object ID" at the beginning of this chapter to get the ID of a text object.

Syntax:

public string getTextString ( );

public string getTextString ( IdentObj id );

public string getTextString ( int objectID );

public void setTextString ( String newValue );

public void setTextString ( IdentObj id, String newValue );

public string setTextString ( int objectID, String newValue );

Input Parameters:

id or objectID: the ID number of an object in a chart

newValue: string of characters displayed in a text object

Return Values:

getTextString(): string = text object displayed

setTextString(): None

Code Sample:
 

/*	A basic extension of the java.applet.Applet class */
import java.awt.*;
import java.applet.*;
import TDG.draw.IdentObj;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		IdentObj id;
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		id = perspective1.getO1Title();
		perspective1.setFontStyle(id,1);
		perspective1.setTextString(id, "New Title");
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

FootnoteString, O1TitleString, O2TitleString, SubtitleString, TitleString, X1TitleString, Y1TitleString, Y2TitleString

get/setTexture()


Description:

This method is used to get and set a texture. The texture is identified by a URL that can specify any bit-map image file that is in .GIF format. The setFillType() property must be set to 3 (texture) to apply the texture to an object. You may also use the DisplayBarAsPictograph property to apply the texture to risers in a bar chart. Use the setTextureDisplayMode() method to identify whether the texture should be stretched or tiled.

Syntax:

public Image getTexture ( String szURL );

public String getTexture ( IdentObj id );

public void setTexture ( String szURL );

public void setTexture( IdentObj id, String szURL )

Input Parameters:

szURL: URL that identifies a .GIF file

Return Values:

getTexture(): Image = the image from the .GIF file

setTexture(): None

Also See:

get/setTextureDisplayMode() and get/setFillType

DisplayBarAsPictorgraph in Chapter 7.

get/setTextureDisplayMode()


Description:

These method get/set the texture display mode for an object in a chart.

Syntax:

public int getTextureDisplayMode ( IdentObj id );

public void setTextureDisplayMode ( int newValue );

public void setTextureDisplayMode ( IdentObj id, int newValue );

Input Parameters:

id: Identification number of an object in a chart

newValue: Texture display mode (0=Stretched/1=Tiled)

Return Values:

getTextureDisplayMode(): int = Texture display mode (0=Stretched/1=Tiled)

setTextureDisplayMode(): None

Also See:

get/setTexture()

get/setTextWrap()


Description:

These methods can be used to get/set text wrapping for a text object in a chart. See "Getting an Object ID" at the beginning of this chapter to get the ID of a text object.

Syntax:

public boolean getTextWrap ( );

public boolean getTextWrap ( IdentObj id );

public boolean getTextWrap ( int objectID );

public void setTextWrap ( boolean newValue );

public void setTextWrap ( IdentObj id, boolean newValue );

public void setTextWrap ( int objectID, boolean newValue );

Input Parameters:

id or objectID: the ID number of an object in a chart

newValue: TRUE = enable text wrapping/FALSE = disable text wrapping

Return Values:

getTextWrap(): TRUE = text wrapping is enabled / FALSE = text wrapping disabled

setTextWrap(): None

Code Sample:
 

/*	A basic extension of the java.applet.Applet class */
import java.awt.*;
import java.applet.*;
import TDG.draw.IdentObj;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		IdentObj id;
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.setUseSampleData(false);
		perspective1.setGraphType(17);
		perspective1.setData(0,0,10);
		perspective1.setData(0,1,11);
		perspective1.setData(0,2,12);
		perspective1.setData(0,3,13);
		perspective1.setO1LabelAutofit(false);
		perspective1.setGroupLabel(0,"This is the Group 0 Label");
		perspective1.setGroupLabel(1,"This is the Group 1 Label");
		perspective1.setGroupLabel(2,"This is the Group 2 Label");
		perspective1.setGroupLabel(3,"This is the Group 3 Label");
		id = perspective1.getO1Label();
		perspective1.setTextWrap(id,true);
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

O1LabelWrap, O2LabelWrap

get/setToolTipCustomString()


Description:

When tool tips are enabled with the ToolTipDisplay property, these methods can be used to get and set the strings that are displayed by tool tips.

Syntax:

public String getToolTipCustomString ( );

public String getToolTipCustomString ( IdentObj id );

public String getToolTipCustomString ( int seriesID );

public String getToolTipCustomString(int seriesID, int groupID)

public void setToolTipCustomString ( String newValue );

public void setToolTipCustomString ( IdentObj id, String newValue );

public void setToolTipCustomString ( int seriesID, String newValue );

public void setToolTipCustomString (int seriesID, int groupID, String newValue);

Input Parameters:

id or objectID: the ID number of an object in a chart

seriesID: series number

groupID: group number

newValue: tool tip custom string

Return Values:

getToolTipCustomString(): string = tool tip custom string

setToolTipCustomString(): None

Code Sample:
 

import TDG.draw.IdentObj;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		IdentObj id;
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.setUseSampleData(false);
		perspective1.setGraphType(17);
		perspective1.setData(0,0,10);
		perspective1.setData(0,1,11);
		perspective1.setData(0,2,12);
		perspective1.setData(0,3,13);
		perspective1.setO1LabelAutofit(false);
		perspective1.setGroupLabel(0,"Group 0");
		perspective1.setGroupLabel(1,"Group 1");
		perspective1.setGroupLabel(2,"Group 2");
		perspective1.setGroupLabel(3,"Group 3");
		perspective1.setToolTipDisplay(true);
		perspective1.setToolTipCustomString(
	Z,0,"This is my custom tool tip string");
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

setToolTipUser(), ToolTipDelay, ToolTipDisplay, ToolTipMode

get/setTransparentBorderColor()


Description:

These methods are used to get/set the transparent border color that is applied to a particular object in a chart.

Syntax:

public boolean getTransparentBorderColor ( IdentObj id );

public void setTransparentBorderColor ( boolean newValue);

public void setTransparentBorderColor ( IdentObj id,
boolean newValue);

Input Parameters:

id: Identification number of an object in a chart

newValue: TRUE = apply transparent border color to object/ FALSE = transparent border color is not applied to object

Return Values:

getTransparentBorderColor(): TRUE = transparent border color is applied/FALSE = transparent border color is not applied

setTransparentBorderColor(): None

Code Sample:
 

setTransparentBorderColor(getBackgrnd(),false);
setTransparentBorderColor(getDataText(),false);
setTransparentBorderColor(getFootnote(),false);
setTransparentBorderColor(getLegendArea(),true);
setTransparentBorderColor(getO1Label(),false);
setTransparentBorderColor(getO1Title(),false);
setTransparentBorderColor(getO2Label(),false);
setTransparentBorderColor(getO2Title(),false);
setTransparentBorderColor(getPieFrame(),true);
setTransparentBorderColor(getStockMALine(),false);
setTransparentBorderColor(getSubtitle(),false);
setTransparentBorderColor(getTitle(),false);
setTransparentBorderColor(getX1Label(),false);
setTransparentBorderColor(getY1Label(),false);
setTransparentBorderColor(getY1MinorGrid(),false);
setTransparentBorderColor(getY1Title(),false);
Also See:

get/setBorderColor, getSelectionBorderColor, selectionHasTransparentBorderColor, setSeriesBorderColor

get/setTransparentFillColor()


Description:

These method can be used to get/set a transparent fill color applied to a particular object in a chart.

Syntax:

public boolean getTransparentFillColor ( IdentObj id );

public void setTransparentFillColor ( boolean newValue );

public void setTransparentFillColor ( IdentObj id, boolean newValue );

Input Parameters:

id: Identification number of an object in a chart

newValue: TRUE = transparent fill color is applied to object / FALSE = transparent fill color is not applied to object

Return Values:

getTransparentFillColor(): TRUE = transparent fill color is applied to object / FALSE = transparent fill color is not applied to object

setTransparentFillColor(): None

Code Sample:
 

setTransparentFillColor(getBackgrnd(),false);
setTransparentFillColor(getCubeFloor(),false);
setTransparentFillColor(getCubeLeftWall(),false);
setTransparentFillColor(getCubeRightWall(),false);
setTransparentFillColor(getDataText(),false);
setTransparentFillColor(getFootnote(),false);
setTransparentFillColor(getFrame(),false);
setTransparentFillColor(getFrameSeparator(),true);
setTransparentFillColor(getLegendArea(),true);
setTransparentFillColor(getLegendText(),false);
setTransparentFillColor(getO1Label(),false);
setTransparentFillColor(getO1Title(),false);
setTransparentFillColor(getO2Label(),false);
setTransparentFillColor(getO2Title(),false);
setTransparentFillColor(getPieFrame(),true);
setTransparentFillColor(getPieLabel(),false);
Also See:

get/setFillColor, getSelectionFillColor, selectionHasTransparentFillColor, setSeriesFillColor

get/setURL()


Description:

These methods get/set the Universal Resource Locator for any specific Object. These methods and the get/setURLTarget() methods can be used to include drill-downs in HTML files. They allow any series/group intersection in the chart to be used as a link reference. When the user selects/clicks on an object in a chart where a setURL() is defined, the HTML file provided as an input parameter to the method will automatically be loaded and displayed at the location specified by the setURLTarget(). For example, in the example HTML file below, setURL() selects a different .HTML file for each series/group (slice) in a pie chart. The example setURLTarget() defines the location/frame in the page where each HTML file will be displayed.

Syntax:

public String getURL ( );

public String getURL ( IdentObj id );

public String getURL ( int seriesID );

public String getURL ( int seriesID, int groupID );

public void setURL ( string newValue );

public void setURL ( IdentObj id, string newValue );

public void setURL ( int seriesID, string newValue );

public void setURL ( int seriesID, int groupID, string newValue );

Input Parameters:

id: Object ID

seriesID: Series ID

groupID: Group ID

newValue: URL

Return Values:

getURL(): String = URL string / setURL(): None

Code Sample:

See get/setURLTarget()

Also See:

get/setURLTarget, setDataFileURL

get/setURLTarget()


Description:

These methods get/set the Frame Target for URL associated with any specific Object. They are used in conjunction with get/setURL to create drill-downs in an HTML file. The setURLTarget() defines the location on the page where the .HTML defined by setURL() will be displayed.

Syntax:

public String getURLTarget ( );

public String getURLTarget ( IdentObj id );

public String getURLTarget ( int seriesID );

public String getURLTarget ( int seriesID, int groupID );

public void setURLTarget ( IdentObj id, String newValue );

public void setURLTarget ( int seriesID, int groupID, String newValue);

public void setURLTarget ( int seriesID, String newValue );

public void setURLTarget ( String newValue );

Input Parameters:

id: the ID number of an object in a chart

seriesID: Series ID

groupID: Group ID

newValue: Location in the HTML page

Return Values:

getURLTarget(): URL Target string / setURLTarget(): None

Code Sample:
 

<html>
<head>
<title>Pie Drill Down Example</title>
</head>
<body>
<p>
<applet code="TDGChartApplet.class" archive="javaCHARTg.jar" width="400" height="280">
<param name="TDGSCRIPT"
value="setTitleString(&quot;Pie Chart with Drilldown&quot;); /* Set the Title String */
setSubtitleString(&quot;Click on the slices to see a description&quot;);
setGraphType(55);  /* Set the graph type to Pie */
setSeriesLabelArray(&quot;Mon&quot;, &quot;Tue&quot;, &quot;Wed&quot;, &quot;Thur&quot;, &quot;Fri&quot;);
setDataSeries(35.00);
setDataSeries(27.00);
setDataSeries(15.00);
setURL(0,0,&quot;series0.html&quot;); /* When user clicks on series 0, show series0.html file */
setURL(1, 0,&quot;series1.html&quot;); /* When user clicks on series 1, show series1.html file */
setURL(2, 0,&quot;series2.html&quot;); /* When user clicks on series 2, show series2.html file */
setURLTarget(0,0, &quot;Bottom&quot;);/* Set location on page where each .html file is displayed */
setURLTarget(1,0, &quot;Bottom&quot;);
setURLTarget(2,0, &quot;Bottom&quot;);
setToolTipDisplay(1);
"></applet></p><p><br><br>
<a href="series2.html" target="Bottom">Show the Series2 page by force</a> </p></body></html>
Also See:

get/setURL, setDataFileURL

isSelection()


Description:

This method can be used to determine whether or not there are any items in the selection list.

Syntax:

public boolean isSelection ( );

Input Parameters:

None

Return Values:

TRUE = there are one or more items in the selection list / FALSE = no items in selection list.

Also See:

isSelectionSeriesRelated()

isSelectionSeriesRelated()


Description:

This method can be used to determine whether or not the first item in the selection list is associated with a series.

Syntax:

public boolean isSelectionSeriesRelated ( );

Input Parameters:

None

Return Values:

TRUE = first item in selection is series related / FALSE = item is not associated with a series.

Also See:

isSelection()

isSQLTypeNumeric()


Description:

This method can be used to determine whether or not an SQL data type is numeric.

Syntax:

public boolean isSQLTypeNumeric ( int sqlType );

Input Parameters:

sqlType: an SQL data type

Return Values:

TRUE = sqlType is one of case TINYINT, SMALLINT, INTEGER, FLOAT, REAL, DOUBLE, NUMERIC, DECIMAL / FALSE sqlType is not a numeric data type

Also See:

isSQLTypeString()

isSQLTypeString()


Description:

This method can be used to determine whether or not an SQL data type is a string.

Syntax:

public boolean isSQLTypeString ( int sqlType );

Input Parameters:

sqlType: an SQL data type

Return Values:

TRUE = sqlType is one of the following data types: CHAR, VARCHAR, or LONGVARCHAR. FALSE = sqlType is not a string

Also See:

isSQLTypeNumeric()

load() / save()


Description:

These methods are used to load and save a chart in ASCII text format.

The load() method loads a saved chart from a Java input stream or a URL. If bMerge is true, the contents of the file will be merged with the methods and properties that define the current chart. If bMerge is false, the contents of the file replaces the definition of the current file. Note that the Java input stream or URL must identify an ASCII text file that contains the properties and methods that are supported by Perspective.

The save() method can be used to save a chart to an output stream. It will save all of the properties and methods required to recreate the chart in ASCII text file format. The contents of the file can be viewed or edited with any text editor.

Syntax:

public void load ( InputStream is, boolean bMerge );
public void load ( String szURL, boolean bMerge );
public void save ( OutputStream os );

Input Parameters:

load(): is: a Java Input Stream

szURL: URL

bMerge: true = merge loaded file with current chart definition / false = replace current chart with the loaded file

save(): os: a Java Output Stream

Return Values:

None

Code Sample:
 

//
      // Allocate an memory output stream to store the Chart...
      //
   ByteArrayOutputStream chartStreamOut = new ByteArrayOutputStream();
   //
   // Encode the chart to a stream...
   //
   save(chartStreamOut);

parsePARAMS()


Description:

This method is the HTML Parsing Interface.

Syntax:

public void parsePARAMS ( String szInString );

Input Parameters:

szInString: Parameter String

Return Values:

None

Code Sample:
 

/* This applet is a "raw" version of Perspective.java with PARAM support Use this when you need a flat chart in a page with simple HTML attributes Example use of the Perspective Applet "TDGScriptDemo"
<HTML><HEAD>
<TITLE>TDGCharApplet</TITLE>
</HEAD><BODY>
<APPLET
	CODE="TDGChartApplet.class"
	WIDTH=400
	HEIGHT=350>
	<PARAM NAME=TDGSCRIPT VALUE='
		setGraphType(17);
		setTitleString("Wilde Java Joe!");
	'>
</APPLET>
</BODY>
</HTML>		*/
import java.awt.*;
import java.applet.*;
import TDG.Perspective;
public class TDGChartApplet extends Applet {
	Perspective m_Chart;
	// APPLET INFO SUPPORT:
	//The getAppletInfo() method returns a string describing the 
	// applet's author, copyright date, or miscellaneous information.
	//--------------------------------------------------------------
	public String getAppletInfo()
	{
		return "Name: TDGJavaChart\r\n" +
		       "Author: Joe Terry\r\n" +
		       "Created with Symantec Visual Cafe Pro 1.0\r\n" +
		       "Copyright(c) 1997 Three D Graphics, Inc.\r\n" +
		       "Version 1.0\r\n" +
		       "Tel: 310.553.3313\r\n" +
		       "Fax: 310.788.8975\r\n" +
		       "";
	}
	public boolean handleEvent(Event event) {
		return super.handleEvent(event);
	}
	public void init() {
		// PARAMETER SUPPORT
		String param;
		super.init();
		//{{INIT_CONTROLS
		setLayout(null);
		//}}
		// Chart size & shape comes from Applet TAG in HTML
		m_Chart = new Perspective(this);
		add(m_Chart);
		m_Chart.setUseSampleData(false);
		param = getParameter("TDGSCRIPT");
		if (param != null)	m_Chart.parsePARAMS(param);
	}
}

perspectiveEvent()


Description:

This method is called to listen for Perspective events.

Syntax:

public void perspectiveEvent ( TDGEvent e );

Input Parameters:

e: On return will be set to the perspective event. See TDGEvent.Java for a list of possible events.

Return Values:
Code Sample:
 

// Send a "TDGEvent" to every listener. Each listener will examine
// the "EventID" to determine if they are interested.
for ( int elem = 0; elem < thisList.size(); elem++) {
       ((TDGListener)thisList.elementAt(elem)).perspectiveEvent(thisEvent); 

restoreAllSlices()


Description:

This method can be used to restore all slices to a pie chart that have been deleted or detached.

Syntax:

public void restoreAllSlices ( );

Input Parameters:

None

Return Values:

None

Code Sample:
 

/* 	A basic extension of the java.applet.Applet class */
import java.awt.*;
import java.applet.*;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.setBounds(0,0,300,200);
		perspective1.setGraphType(55);
		boolean b = perspective1.getPieSliceDelete (1);
		if (b==false)perspective1.setPieSliceDelete(1,true);
		perspective1.restoreAllSlices();
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

get/setPieSliceDelete(), get/setPieSliceDetach()

rotateCubeX / Y / Z()


Description:

These properties are used to rotate a 3D cube a number of degrees in the X-, Y-, and Z-directions.

Syntax:

public void rotateCubeX ( double degreesX );

public void rotateCubeY ( double degreesY );

public void rotateCubeZ ( double degreesZ );

Input Parameters:

degreesX: Number of degrees to rotate in the X-direction

degressY: Number of degrees to rotate in the Y-direction

degreesZ: Number of degrees to rotate in the Z direction

Return Values:

None

Code Sample:
 

import java.awt.*;
import java.applet.*;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.setBounds(0,0,300,200);
		perspective1.setGraphType (2);
		perspective1.setViewing3DAnglePreset(-1);
		perspective1.rotateCubeX(90);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

get/setCubeRotationMatrix

scaleCube()


Description:
Syntax:

public void scaleCube ( double scaleFactor );

Input Parameters:

scaleFactor: scaling factor

Return Values:

None

Code Sample:
 

case 25:	// Zoom Out
	    m_Perspective.scaleCube(1 / ZOOM_STEP);
		break;
case 26:	// Zoom In
	    m_Perspective.scaleCube(ZOOM_STEP);
		break;

selectionHasTransparentBorderColor()


Description:

This method can be used to determine whether or not the first item in the selection list has a transparent border color.

Syntax:

public boolean selectionHasTransparentBorderColor ( );

Input Parameters:

None

Return Values:

TRUE = selection has transparent border color / FALSE = selection does not have transparent border color

Code Sample:
 

public void perspectiveEvent(TDGEvent e) {
        switch( e.getID() ) {
            case TDGEvent.TDG_SELECTION_CHANGED:
	setTransparentFillColor(((Perspective)e.
    getSource()).selectionHasTransparentFillColor());
      	setFillColor(((Perspective)e.getSource()).getSelectionFillColor());
	setTransparentBorderColor(((Perspective)e.
    getSource()).selectionHasTransparentBorderColor());
	setBorderColor(((Perspective)e.getSource()).getSelectionBorderColor());
            break;
            default:
        }
    }
Also See:

get/setBorderColor, getSelectionBorderColor, get/setTransparentBorderColor, setSeriesBorderColor, selectionHasTransparentFillColor

selectionHasTransparentFillColor()


Description:

This method can be used to determine whether or not the first item in the selection list has a transparent fill color.

Syntax:

public boolean selectionHasTransparentFillColor ( );

Input Parameters:

None

Return Values:

TRUE = selection has transparent fill color / FALSE = selection does not have transparent fill color

Code Sample:
 

public void perspectiveEvent(TDGEvent e) {
        switch( e.getID() ) {
            case TDGEvent.TDG_SELECTION_CHANGED:
	setTransparentFillColor(((Perspective)e.
    getSource()).selectionHasTransparentFillColor());
      	setFillColor(((Perspective)e.getSource()).getSelectionFillColor());
	setTransparentBorderColor(((Perspective)e.
    getSource()).selectionHasTransparentBorderColor());
	setBorderColor(((Perspective)e.getSource()).getSelectionBorderColor());
            break;
            default:
        }
    }
Also See:

get/setFillColor, getSelectionFillColor, get/setTransparentFillColor, setSeriesFillColor, selectionHasTransparentBorderColor

SendChartToFTP()


Description:

This method is used to send a chart to an FTP server.

Syntax:

public boolean sendChartToFTP (
String strHost, /* Host Name */
String strUser, /* User Name */
String strPass, /* Password */
String strDir, /* Directory */
String strDestFile /* Target file */

);

Input Parameters:

strHost: Host Name

strUser: User Name

strPass: Password

strDir: Directory name

strDestFile: Destination file name

Return Values:

None

Code Sample:
 

/*
	A basic extension of the java.applet.Applet class
 */

import java.awt.*;
import java.applet.*;

import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
	perspective1.sendChartToFTP("myHost","myUserName","myPassword","myDirectory","myTargetFile");
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}

Also See:

getChartFromFTP(), sendGIFToFTP()

sendGIFToFTP ()


Description:

This method can be used to write the current chart out as a GIF file to the specified FTP server.

Syntax:

public void sendGIFToFTP (
String strHost, /* Host Name */
String strUser, /* User Name */
String strPass, /* Password */
String strDir, /* Directory Name */
String strDestFile /* Destination File Name */

);

Input Parameters:

strHost: Host Name

strUser: User Name

strPass: Password

strDir: Directory name

strDestFile: Destination file name

Return Values: None
Code Sample:
 

/*
	A basic extension of the java.applet.Applet class
 */

import java.awt.*;
import java.applet.*;

import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.sendGIFToFTP("myHost","myUserName","myPassword","myDirectory","myTargetFile");
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

getChartFromFTP(), sendChartToFTP()

setData()


Description:

This method sets the data value for a series/group intersection. This is THE master method for setting data in charts It can be used to assign a single value to a row and column in a chart for the currently selected object or for a specific object in the chart. You may also specify whether or not the chart should be repainted when the new value is assigned.

Syntax:

public void setData ( int row, int col, double fValue );

public void setData ( int row, int col, double fValue, boolean bRepaint );

public void setData ( int row, int col, Object obj );

public void setData ( int row, int col, Object obj, boolean bRepaint );

Input Parameters:

row: Row number

col: Column number

fValue: Data value to set at row/column

bRepaint: TRUE = Repaint the chart when the new data value is assigned / FALSE = Don't repaint the chart.

obj: Object ID

Return Values:

None

Code Sample:
 

perspective1.setData(0,0,.5);	/* Row 0/Col 0 Value = .5 */
perspective1.setData(0,1,1);	/* Row 0/Col 1 Value = 1 */
perspective1.setData(0,2,2);	/* Row 0/Col 2 Value = 2 */
perspective1.setData(0,3,3);
perspective1.setData(0,4,4);
perspective1.setData(0,5,5);
perspective1.setData(1,0,.5);
perspective1.setData(1,1,1);
perspective1.setData(1,2,2);
perspective1.setData(1,3,3);
perspective1.setData(1,4,4);
perspective1.setData(1,5,5);
Also See:

setDataFileURL(), setDataFromCallBack(), setDataFromDataGrid(), setDataFromResultSet(), setDataFromSQL(), setDataRange(), setDataRangeToExtent()

setDataFileURL()


Description:

You can load any text file into a Perspective applet. This is done by using the setDataFileURL method, which takes as input any valid file location or Internet URL. The text file needs to be organized in "spreadsheet" fashion, with rows of number for series, and columns of numbers for groups. You can optionally supply row and/or column headers, which will then be used for labeling the series and groups on the graph. Each value must be separated by a comma, and each text value needs to be in quotes. However, if you ARE supplying row and column headers, the very first word in the file must be "labels", in quotes, separated by a comma.

Syntax:

public void setDataFileURL ( String aDataFileURL );

Input Parameters:

aDataFileURL:

Return Values:

None

Also See:

setData(), setDataFromCallBack(), setDataFromDataGrid(), setDataFromResultSet(), setDataFromSQL(), setDataRange(), setDataRangeToExtent()

setDataFromCallBack()


Description:

The setDataFromCallback() method can be used to load data from a predefined data grid. The input parameter to this method identifies the data grid.

Syntax:

public void setDataFromCallBack ( TDGDataGrid grid );

Input Parameters:

grid: An Interface that represents an abstract data model that is one way of preparing data for graphing by

Return Values:

None

Code Sample:
 

	void button2_Action(java.awt.event.ActionEvent event)
	{
        // register data source with javaCHART
	    m_Chart.setDataFromCallBack(aDataImport);
		for(int row = 0; row < aDataImport.getRows(); row++)
		for(int col=0; col < aDataImport.getColumns(); col++)
		aDataImport.setValue(row, col, new 
Double(RandomData.nextDouble() * 50));
		aDataImport.setDirty(true);
		m_Chart.repaint();
	}
Also See:

setData(), setDataFileURL(), setDataFromDataGrid(), setDataFromResultSet(), setDataFromSQL(), setDataRange(), setDataRangeToExtent()

setDataFromDataGrid()


Description:

TDGDataGrid is series of methods that you must implement into an object. You can have any number of other methods or functions inside this object, but the following methods must be included:

public abstract String columnLabel (int c);
public abstract int getColumns ();
public abstract Object getValue (int r, int c);
public abstract String rowLabel (int r);
public abstract int getRows ();
public abstract void setValue (int r, int c, Object s);
public abstract boolean isDirty ();
public abstract void setDirty (boolean isDirty);

Perspective will then get data from this object based on whatever you do inside each of these methods. It does not matter how you process, parse, or access your data; only that somewhere in your code you make public these methods, with Perspective can then access to retrieve data.

Syntax:

public void setDataFromDataGrid ( TDGDataGrid grid );

Input Parameters:

grid: An Interface that represents an abstract data model that is one way of preparing data for graphing by

Return Values:

None

Code Sample:
 

/* See Chapter 6 */
	void button1_Action(java.awt.event.ActionEvent event)
	{
	    m_Chart.setDataFromDataGrid(aDataImport);
	} 
Also See:

setData(), setDataFileURL(), setDataFromCallBack(), setDataFromResultSet(), setDataFromSQL(), setDataRange(), setDataRangeToExtent()

setDataFromResultSet()


Description:

processSQLResultSet. Graph columns and rows in the given result set. The result set is _not_ closed.

Syntax:

public void setDataFromResultSet ( ResultSet rs );

Input Parameters:

rs: SQL Result Set

Return Values:

None

Code Sample:
 

public void setDataFromSQL(String SQLQuery, Statement aStmt)
    {
        ResultSet rs;
	try {
		// Submit a query, creating a ResultSet object
		rs = aStmt.executeQuery (SQLQuery);
		// Display all columns and rows from the result set
		setDataFromResultSet(rs);
		// Close the result set
		rs.close();
	} 
Also See:

setData(), setDataFileURL(), setDataFromCallBack(), setDataFromDataGrid(), setDataFromSQL(), setDataRange(), setDataRangeToExtent()

setDataFromSQL()


Description:

setDataFromSQL. Graph columns and rows in the given query. Creates a result set and closes the result set.

Syntax:

public void setDataFromSQL ( String SQLQuery, Statement aStmt);

Input Parameters:

SQLQuery:

aStmt:

Return Values:

None

Code Sample:
 

	void button3_Action(java.awt.event.ActionEvent event)
	{
	    String Harry = textField1.getText();
	    
	    if ( Harry.length() > 0 ) {
    	    // assumes current connection to DataSource through JDBC
    	    m_Chart.setDataFromSQL(Harry, stmt);
	    }
	} 
Also See:

setData(), setDataFileURL(), setDataFromCallBack(), setDataFromDataGrid(), setDataFromResultSet(), setDataRange(), setDataRangeToExtent()

setDataRange()


Description:

This method is used to establish the range of data that will be used in a chart.

Syntax:

public void setDataRange ( int rowStop, int colStop );

public void setDataRange ( int rowStart, int colStart, int rowStop, int colStop );

Input Parameters:

rowStop: last row number

colStop: last column number

rowStart: first row number (0 if not specified)

colStart: first column number (0 if not specified)

Return Values:

None

Code Sample:
 

/*	A basic extension of the java.applet.Applet class */
import java.awt.*;
import java.applet.*;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		setLayout(null);
		perspective1 = new TDG.Perspective();
		perspective1.setUseSampleData(false);
		perspective1.setGraphType(17);
		perspective1.setDepthAngle(0);
		perspective1.setDepthRadius(0);
		perspective1.setGroupLabel (0,"Group 0");
		perspective1.setGroupLabel (1,"Group 1");
		perspective1.setGroupLabel (2,"Group 2");
		perspective1.setGroupLabel (3,"Group 3");
		perspective1.setData(0,0,1);
		perspective1.setData(0,1,2);
		perspective1.setData(0,2,3);
		perspective1.setData(0,3,4);
		perspective1.setData(1,0,1);
		perspective1.setData(1,1,2);
		perspective1.setData(1,2,3);
		perspective1.setData(1,3,4);
		perspective1.setData(2,0,1);
		perspective1.setData(2,1,2);
		perspective1.setData(2,2,3);
		perspective1.setData(2,3,4);
		perspective1.setDataRange(3,3);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

setData(), setDataFileURL(), setDataFromCallBack(), setDataFromDataGrid(), setDataFromResultSet(), setDataFromSQL(), setDataRangeToExtent()

setDataRangeToExtent()


Description:

This method sets the range of data to be used in the chart according to the number of values identified by the setData() method. It will override values that may be set by the setDataRange() property.

Syntax:

public void setDataRangeToExtent ( );

Input Parameters:

None

Return Values:

None

Code Sample:
 

/*	A basic extension of the java.applet.Applet class */
import java.awt.*;
import java.applet.*;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		setLayout(null);
		perspective1 = new TDG.Perspective();
		perspective1.setUseSampleData(false);
		perspective1.setGraphType(17);
		perspective1.setDepthAngle(0);
		perspective1.setDepthRadius(0);
		perspective1.setGroupLabel (0,"Group 0");
		perspective1.setGroupLabel (1,"Group 1");
		perspective1.setGroupLabel (2,"Group 2");
		perspective1.setGroupLabel (3,"Group 3");
		perspective1.setData(0,0,1);
		perspective1.setData(0,1,2);
		perspective1.setData(0,2,3);
		perspective1.setData(0,3,4);
		perspective1.setData(1,0,1);
		perspective1.setData(1,1,2);
		perspective1.setData(1,2,3);
		perspective1.setData(1,3,4);
		perspective1.setData(2,0,1);
		perspective1.setData(2,1,2);
		perspective1.setData(2,2,3);
		perspective1.setData(2,3,4);
		perspective1.setDataRange(1,1,3,3);
		perspective1.setDataRangeToExtent();
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

setData(), setDataFileURL(), setDataFromCallBack(), setDataFromDataGrid(), setDataFromResultSet(), setDataFromSQL(), setDataRange()

setFontSize()


Description:

This method can be used to set the font size for all text objects in a chart.

Syntax:

public void setFontSize ( int newValue );

Input Parameters:

newValue: Font size value

Return Values:

None

Code Sample:
 

/*
	A basic extension of the java.applet.Applet class
 */

import java.awt.*;
import java.applet.*;
import TDG.draw.IdentObj;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		IdentObj id;
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.setUseSampleData(false);
		perspective1.setGraphType(17);
		perspective1.setData(0,0,10);
		perspective1.setData(0,1,11);
		perspective1.setData(0,2,12);
		perspective1.setData(0,3,13);
		perspective1.setGroupLabel(0,"Group 0");
		perspective1.setGroupLabel(1,"Group 1");
		perspective1.setGroupLabel(2,"Group 2");
		perspective1.setGroupLabel(3,"Group 3");
		perspective1.setAutofit(false);
		perspective1.setFontSize(24);
		perspective1.setLegendOrient(0);
		id = perspective1.getLegendText();
		perspective1.setFontSizeVC(id,4000);
		perspective1.setLegendTextAutofit(false);
		perspective1.setSeriesLabel(0,"This is the Series 0 Label");
		perspective1.setSeriesBorderColor(3,new Color (0,0,0));
		perspective1.setSeriesFillColor(3, new Color (255,255,255));
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Notes:

This method disables text autofitting (i.e., setAutofit(false);).

Also See:

get/setFontSizeVC to set the font size of specific text objects in a chart.

setLegendOrient()


Description:

This method is used to set the orientation of the legends in a chart.

Syntax:

public void setLegendOrient (int newValue );

Input Parameters:

newValue: 0 = Vertical / 1 = Horizontal

Return Values:

None

Code Sample:
 

/*
	A basic extension of the java.applet.Applet class
 */

import java.awt.*;
import java.applet.*;

import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.setGraphType(17);
		perspective1.setLegendOrient(1);
		perspective1.setSeriesBorderColor(4,new Color (0,0,0));
		perspective1.setSeriesFillColor(4, new Color (255,255,255));
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

setLegendTextAutofit() and the following properties in Chapter 7: LegendAutomatic, LegendDisplay, LegendMarkerPosition, LegendReverse

setLegendTextAutofit()


Description:

This method is used to enable (true) / disable (false) autofitting of the legend text.

Syntax:

public void setLegendTextAutofit ( boolean newValue );

Input Parameters:

newValue: true = autofit legend text / false = use font size setting

Return Values:

None

Code Sample:
 

/*
	A basic extension of the java.applet.Applet class
 */

import java.awt.*;
import java.applet.*;
import TDG.draw.IdentObj;
import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		IdentObj id;
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.setGraphType(17);
		perspective1.setAutofit(false);
		perspective1.setFontSize(14);
		perspective1.setLegendOrient(0);
		id = perspective1.getLegendText();
		perspective1.setFontSizeVC(id,2000);
		perspective1.setLegendTextAutofit(false);
		perspective1.setSeriesLabel(0,"This is the Series 0 Label");
		perspective1.setSeriesBorderColor(4,new Color (0,0,0));
		perspective1.setSeriesFillColor(4, new Color (255,255,255));
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

setLegendOrient () and the following properties in Chapter 7: LegendAutomatic, LegendDisplay, LegendMarkerPosition, LegendReverse

setSeriesBorderColor()


Description:

This method can be used to set the border color of risers for a specified series in a chart.

Syntax:

public void setSeriesBorderColor ( int s, Color newValue );

Input Parameters:

s: Series Number

newValue: RGB Color Value

Return Values:

None

Code Sample:
 

/*
	A basic extension of the java.applet.Applet class
 */

import java.awt.*;
import java.applet.*;

import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.setGraphType(2);
		perspective1.setSeriesBorderColor(4,new Color (255,255,255));
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

get/setBorderColor(), getSelectionBorderColor(), get/setTransparentBorderColor(), selectionHasTransparentBorderColor(), and setSeriesFillColor

setSeriesFillColor()


Description:

This method can be used to set the fill color of risers for a specified series in a chart.

Syntax:

public void setSeriesFillColor ( int s, Color newValue );

Input Parameters:

s: Series Number

newValue: RGB Color Value

Return Values:

None

Code Sample:
 

/*
	A basic extension of the java.applet.Applet class
 */

import java.awt.*;
import java.applet.*;

import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.setGraphType(2);
		perspective1.setSeriesBorderColor(4,new Color (0,0,0));
		perspective1.setSeriesFillColor(4, new Color (255,255,255));
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

get/setFillColor(), getSelectionFillColor(), get/setTransparentFillColor(), selectionHasTransparentFillColor(), and setSeriesBorderColor

setToolTipUser()


Description:

These methods are not currently implemented.

Syntax:

public void setToolTipUser ( int aCustomMacro );

public void setToolTipUser ( int aCustomMacroA, int aCustomMarcoB);

public void setToolTipUser ( int aCustomMacroA, int aCustomMacroB, int aCustomMarcoC );

public void setToolTipUser ( int aCustomMacroA, int aCustomMacroB, int aCustomMarcoC, int aCustomMacroD );

public void setToolTipUser ( int aCustomMacroA, int aCustomMacroB, int aCustomMarcoC, int aCustomMacroD, int aCustomMacroE );

Also See:

get/setToolTipCustomString and the following properties in Chapter 7: ToolTipDelay, ToolTipDisplay, ToolTipMode

translateCube()


Description:

This method can be used to translate the cube in a 3D chart in the X-, Y-, and Z-directions.

Syntax:

public void translateCube (double tx, double ty, double tz );

Input Parameters:

tx: cube translation in X-direction
ty: cube translation in Y-direction
tz: cube translation in Z-direction

Return Values:
Code Sample:
 

/*
	A basic extension of the java.applet.Applet class
 */

import java.awt.*;
import java.applet.*;

import TDG.Perspective;
public class Applet1 extends Applet
{
	public void init()
	{
		setLayout(null);
		setSize(300,200);
		perspective1 = new TDG.Perspective();
		perspective1.setGraphType(2);
		perspective1.setViewing3DAnglePreset(-1);
		perspective1.translateCube(10000,20000,30000);
		perspective1.setSeriesBorderColor(4,new Color (0,0,0));
		perspective1.setSeriesFillColor(4, new Color (255,255,255));
		perspective1.setBounds(0,0,300,200);
		add(perspective1);
	}
	TDG.Perspective perspective1;
}
Also See:

The CubeTranslationX, CubeTranslationY, and CubeTranslationZ properties in Chapter 7.