exe
Class GAIGSlabel

java.lang.Object
  extended by exe.GAIGSbase
      extended by exe.GAIGSlabel
All Implemented Interfaces:
GAIGSdatastr

public class GAIGSlabel
extends GAIGSbase

GAIGSlabel is not a true GAIGS structure, and is just a work around for placing labels in GAIGS visualizations. The XML code generated is for an array with no items, and hence only the structure's name is displayed. Care must be taken in setting the bounds for the label, as the name of a structure is placed within these bound but not aligned with any of them. Some experiementation will probably be required.

Use the constructor to specify the label's text, bounds, and font size, and use the toXML method to actually generate the XML for snapshots.

Version:
5/28/06
Author:
Myles McNally

Field Summary
 
Fields inherited from interface exe.GAIGSdatastr
DEFAULT_COLOR, DEFAULT_FONT_SIZE, DEFAULT_NAME, DEFAULT_X1, DEFAULT_X2, DEFAULT_Y1, DEFAULT_Y2
 
Constructor Summary
GAIGSlabel(java.lang.String name, double x1, double y1, double x2, double y2, double fontSize)
          Explicitly set all instance variables.
 
Method Summary
 java.lang.String getLabel()
          Get the value of the name.
 void setLabel(java.lang.String name)
          Set the value of the name to be displayed.
 java.lang.String toXML()
          Creates and returns GAIGS XML code for the current label state.
 
Methods inherited from class exe.GAIGSbase
getName, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GAIGSlabel

public GAIGSlabel(java.lang.String name,
                  double x1,
                  double y1,
                  double x2,
                  double y2,
                  double fontSize)
Explicitly set all instance variables.

Parameters:
name - Display name of this structure.
x1 - Left display bound.
y1 - Bottom display bound.
x2 - Top display bound.
y2 - Right display bound.
fontSize - Font size for display.
Method Detail

setLabel

public void setLabel(java.lang.String name)
Set the value of the name to be displayed.

Parameters:
name - The display name.

getLabel

public java.lang.String getLabel()
Get the value of the name.

Returns:
The display name.

toXML

public java.lang.String toXML()
Creates and returns GAIGS XML code for the current label state. This is actually GAIGSarray XML, but with no items specified. Hence only the name of the structure is displayed.

Returns:
A String containing GAIGS XML code for the stack