|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.quinncurtis.chart2djava.ChartObj
com.quinncurtis.spcchartjava.SPCGeneralizedTableDisplay
public class SPCGeneralizedTableDisplay
This class manages a list of ChartText objects (NumericLabel, StringLabel and TimeLabel objects), that encapsulate each unique table entry in the SPC chart table. This class also manages the spacing between the rows and columns of the table, and the alternating stripe used as a background for the table.
Field Summary | |
---|---|
static int |
NUMERIC_ROW_SPACING
Constant specifies that the next row to the table should user numeric row spacing. |
static int |
TABLE_NO_COLOR_BACKGROUND
Constant specifies that the table does not use a background color. |
static int |
TABLE_SINGLE_COLOR_BACKGROUND
Constant specifies that the table uses a single color for the background (backgroundColor1). |
static int |
TABLE_SINGLE_COLOR_BACKGROUND_GRID
Constant specifies that the table uses horizontal stripes of color for the background (backgroundColor1 and backgroundColor2). |
static int |
TABLE_SINGLE_COLOR_BACKGROUND_GRIDCELL
Constant specifies that the table uses a grid cell of color for the background (backgroundColor1 and backgroundColor2). |
static int |
TABLE_STRIPED_COLOR_BACKGROUND
Constant specifies that the table uses horizontal stripes of color for the background (backgroundColor1 and backgroundColor2). |
static int |
TEXT_ROW_SPACING
Constant specifies that the next row to the table should user text row spacing. |
Constructor Summary | |
---|---|
SPCGeneralizedTableDisplay()
Default constructor for the class. |
|
SPCGeneralizedTableDisplay(ChartView chartvu)
Principle constructor for this class. |
Method Summary | |
---|---|
NumericLabel |
addCalculatedItem(double numericvalue)
Add a calculated numeric item to the table, using the numericColumnSpacing spacing increment. |
NumericLabel |
addCalculatedItem(double numericvalue,
double spacing)
Add a calculated numeric item to the table, using the specified column spacing increment. |
NumericLabel |
addCalculatedItem(double numericvalue,
int decs)
Add a calculated numeric item to the table, using the numericColumnSpacing spacing increment and decimal precision. |
NumericLabel |
addCalculatedItem(NumericLabel numericlabel,
double spacing)
Add a calculated numeric item to the table, using the specified column spacing increment. |
StringLabel |
addColumnStringItem(java.lang.String columnstring)
Add an column string item item to the table, using timeColumnSpacing as the column increment. |
StringLabel |
addColumnStringItem(java.lang.String columnstring,
double spacing)
Add an column string item to the table, using the specified column spacing increment. |
StringLabel |
addColumnStringItem(java.lang.String columnstring,
double spacing,
int xjust)
Add an column string item to the table, using the specified column spacing increment and justification. |
StringLabel |
addColumnStringItem(java.lang.String columnstring,
double spacing,
int xjust,
int format)
Add an column string item to the table, using the specified column spacing increment, justification and format. |
StringLabel |
addColumnStringItem(java.lang.String columnstring,
int format)
Add an column string item to the table using the specified format, using timeColumnSpacing as the column increment. |
StringLabel |
addColumnStringItem(StringLabel columnlabel,
double spacing)
Add an alarm status item to the table, using the specified column spacing increment. |
void |
addHorizontalBar(double startx,
double starty,
double stopx,
double stopy)
Add a horizontal bar as a row background for the table. |
void |
addHorizontalBar(double startx,
double starty,
double stopx,
double stopy,
ChartAttribute attrib1)
Add a horizontal bar as a row background for the table. |
NotesLabel |
addNotesItem(NotesLabel noteslabel,
double spacing)
Add a string item to the table, using the specified column spacing increment. |
NotesLabel |
addNotesItem(java.lang.String shortstring,
java.lang.String longstring,
double spacing,
int xjust)
Add a string item to the table, using the specified column spacing increment and justification. |
NumericLabel |
addNumericItem(double numericvalue)
Add a numeric item to the table, using the numericColumnSpacing spacing increment. |
NumericLabel |
addNumericItem(double numericvalue,
double spacing)
Add a numeric item to the table, using the specified column spacing increment. |
NumericLabel |
addNumericItem(double numericvalue,
double spacing,
int xjust)
Add a numeric item to the table, using the specified column spacing increment and justification. |
NumericLabel |
addNumericItem(double numericvalue,
double spacing,
int xjust,
int decs)
Add a numeric item to the table, using the specified column spacing increment,justification and decimal precision. |
NumericLabel |
addNumericItem(double numericvalue,
int decs)
Add a numeric item to the table, using the numericColumnSpacing spacing increment and decimal precision. |
NumericLabel |
addNumericItem(NumericLabel numericlabel,
double spacing)
Add a numeric item to the table, using the specified column spacing increment. |
NumericLabel |
addProcessCapabilityItem(double numericvalue,
int decs)
Add a process capability numeric item to the table, using the numericColumnSpacing spacing increment and decimal precision. |
NumericLabel |
addProcessCapabilityItem(NumericLabel numericlabel,
double spacing)
Add a process capability numeric item to the table, using the numericColumnSpacing spacing increment and decimal precision. |
StringLabel |
addStringItem(java.lang.String stringvalue)
Add a string item to the table, using textColumnSpacing as the column spacing increment. |
StringLabel |
addStringItem(java.lang.String stringvalue,
double spacing)
Add a string item to the table, using the specified column spacing increment. |
StringLabel |
addStringItem(java.lang.String stringvalue,
double spacing,
int xjust)
Add a string item to the table, using the specified column spacing increment and justification. |
StringLabel |
addStringItem(StringLabel stringlabel,
double spacing)
Add a string item to the table, using the specified column spacing increment. |
TimeLabel |
addTimeItem(java.util.GregorianCalendar timevalue)
Add a time item to the table, using timeColumnSpacing as the column increment. |
TimeLabel |
addTimeItem(java.util.GregorianCalendar timevalue,
double spacing)
Add a time item to the table, using the specified column spacing increment. |
TimeLabel |
addTimeItem(java.util.GregorianCalendar timevalue,
double spacing,
int xjust)
Add a time item to the table, using the specified column spacing increment and justification. |
TimeLabel |
addTimeItem(java.util.GregorianCalendar timevalue,
double spacing,
int xjust,
int format)
Add a time item to the table, using the specified column spacing increment, justification and format. |
TimeLabel |
addTimeItem(java.util.GregorianCalendar timevalue,
int format)
Add a time item to the table using the specified format, using timeColumnSpacing as the column increment. |
TimeLabel |
addTimeItem(TimeLabel timelabel,
double spacing)
Add a time item to the table, using the specified column spacing increment. |
java.lang.Object |
clone()
Returns an object that is a clone of this object. |
void |
copy(SPCGeneralizedTableDisplay source)
Copies the source object. |
double |
getBackgroundBarXOffset()
Get the background bar left offset, in normalized coordinates. |
java.awt.Color |
getBackgroundColor1()
Get the first of two colors used in the alternating background colors used to delineate the table rows. |
java.awt.Color |
getBackgroundColor2()
Get the second of two colors used in the alternating background colors used to delineate the table rows. |
NumericLabel |
getCalculatedItemTemplate()
Get the CalculatedItemTemplate object used as a template for displaying calculated numeric values in the table. |
java.awt.Font |
getCalculatedLabelFont()
Get the font used in the display of calculated numeric values in the table. |
ChartLabel |
getChartLabel(int item)
Get a specific ChartLabel object in the chartLabelArray array list. |
double |
getCurrentColumnPosition()
Get the current column position. |
double |
getCurrentRowPosition()
Get the current column position. |
static java.awt.Font |
getDefaultTableFont()
Get the default font used in the table display. |
NotesLabel |
getNotesItemTemplate()
Get the StringItemTemplate object used as a template for displaying string values in the table. |
java.awt.Font |
getNotesLabelFont()
Get the font used in the display of string values in the table. |
double |
getNumericColumnSpacing()
Get the numeric column spacing. |
double |
getNumericRowSpacing()
Get the numeric row spacing. |
NumericLabel |
getSampleItemTemplate()
Get the SampleItemTemplate object used as a template for displaying numeric values in the table. |
java.awt.Font |
getSampleLabelFont()
Get the font used in the display of sample numeric values in the table. |
double |
getStartColumnPosition()
Get the starting x-position, in normalized coordinates, of the left-most column of the table. |
double |
getStartRowPosition()
Get the starting y-position, in normalized coordinates, of the first row of the table. |
StringLabel |
getStringItemTemplate()
Get the StringItemTemplate object used as a template for displaying string values in the table. |
java.awt.Font |
getStringLabelFont()
Get the font used in the display of string values in the table. |
int |
getTableBackgroundMode()
Get the first of two colors used in the alternating background colors used to delineate the table rows. |
double |
getTextColumnSpacing()
Get the text column spacing. |
double |
getTextRowOffset()
Get the offset between the start of the row and the top of the text, in normalized coordinates. |
double |
getTextRowSpacing()
Get the text row spacing. |
double |
getTimeColumnSpacing()
Get the time column spacing. |
TimeLabel |
getTimeItemTemplate()
Get the TimeLabel object used as a template for displaying time values in the table. |
java.awt.Font |
getTimeLabelFont()
Get the font used in the display of time values in the table. |
double |
getTimeRowSpacing()
Get the time row spacing. |
void |
incrementRow(double spacing)
Add another row to the table, using the specified row spacing increment. |
void |
incrementRow(int spaceid)
Add another row to the table, using the specified row spacing increment. |
void |
initDefaults()
Initialize default values for the class. |
void |
setBackgroundBarXOffset(double value)
Set the background bar left offset, in normalized coordinates. |
void |
setBackgroundColor1(java.awt.Color value)
Set the first of two colors used in the alternating background colors used to delineate the table rows. |
void |
setBackgroundColor2(java.awt.Color value)
Set the second of two colors used in the alternating background colors used to delineate the table rows. |
void |
setCalculatedItemTemplate(NumericLabel value)
Set the CalculatedItemTemplate object used as a template for displaying calculated numeric values in the table. |
void |
setCalculatedLabelFont(java.awt.Font value)
Set the font used in the display of calculated numeric values in the table. |
void |
setCurrentColumnPosition(double value)
Set the current column position. |
void |
setCurrentRowPosition(double value)
Set the current column position. |
static void |
setDefaultTableFont(java.awt.Font value)
Set the default font used in the table display. |
void |
setNotesItemTemplate(NotesLabel value)
Set the StringItemTemplate object used as a template for displaying string values in the table. |
void |
setNotesLabelFont(java.awt.Font value)
Set the font used in the display of string values in the table. |
void |
setNumericColumnSpacing(double value)
Get the numeric column spacing. |
void |
setNumericRowSpacing(double value)
Set the numeric row spacing. |
void |
setSampleItemTemplate(NumericLabel value)
Set the SampleItemTemplate object used as a template for displaying numeric values in the table. |
void |
setSampleLabelFont(java.awt.Font value)
Set the font used in the display of sample numeric values in the table. |
void |
setStartColumnPosition(double value)
Set the starting x-position, in normalized coordinates, of the left-most column of the table. |
void |
setStartRowPosition(double value)
Set the starting y-position, in normalized coordinates, of the first row of the table. |
void |
setStringItemTemplate(StringLabel value)
Get/Set the StringItemTemplate object used as a template for displaying string values in the table. |
void |
setStringLabelFont(java.awt.Font value)
Set the font used in the display of string values in the table. |
void |
setTableBackgroundMode(int value)
Set the first of two colors used in the alternating background colors used to delineate the table rows. |
void |
setTextColumnSpacing(double value)
Set the text column spacing. |
void |
setTextRowOffset(double value)
Set the offset between the start of the row and the top of the text, in normalized coordinates. |
void |
setTextRowSpacing(double value)
Set the text row spacing. |
void |
setTimeColumnSpacing(double value)
Set the time column spacing. |
void |
setTimeItemTemplate(TimeLabel value)
Set the TimeLabel object used as a template for displaying time values in the table. |
void |
setTimeLabelFont(java.awt.Font value)
Set the font used in the display of time values in the table. |
void |
setTimeRowSpacing(double value)
Set the time row spacing. |
Methods inherited from class com.quinncurtis.chart2djava.ChartObj |
---|
copy, errorCheck, getChartObjIDCntr, getChartObjType, getThisChartObjID, TypeSafeVectorCopy |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NUMERIC_ROW_SPACING
public static final int TABLE_NO_COLOR_BACKGROUND
public static final int TABLE_SINGLE_COLOR_BACKGROUND
public static final int TABLE_SINGLE_COLOR_BACKGROUND_GRID
public static final int TABLE_SINGLE_COLOR_BACKGROUND_GRIDCELL
public static final int TABLE_STRIPED_COLOR_BACKGROUND
public static final int TEXT_ROW_SPACING
Constructor Detail |
---|
public SPCGeneralizedTableDisplay()
public SPCGeneralizedTableDisplay(ChartView chartvu)
chartvu
- The ChartView object that serves as the framework for the table.Method Detail |
---|
public NumericLabel addCalculatedItem(double numericvalue)
numericvalue
- Specifies the numeric value that is to be added to the table.public NumericLabel addCalculatedItem(double numericvalue, double spacing)
numericvalue
- Specifies the numeric value that is to be added to the table.spacing
- Specifies the column spacing increment in normalized coordinates.public NumericLabel addCalculatedItem(double numericvalue, int decs)
numericvalue
- Specifies the numeric value that is to be added to the table.decs
- Specifies the decimal precision to use when converting the numeric value to a string.public NumericLabel addCalculatedItem(NumericLabel numericlabel, double spacing)
numericlabel
- Specifies the NumericLabel object that is to be added to the table.spacing
- Specifies the column spacing increment in normalized coordinates.public StringLabel addColumnStringItem(java.lang.String columnstring)
columnstring
- Specifies the string object that is to be added to the table.public StringLabel addColumnStringItem(java.lang.String columnstring, double spacing)
columnstring
- Specifies the string object that is to be added to the table.spacing
- Specifies the column spacing increment in normalized coordinates.public StringLabel addColumnStringItem(java.lang.String columnstring, double spacing, int xjust)
columnstring
- Specifies the string object that is to be added to the table.spacing
- Specifies the column spacing increment in normalized coordinates.xjust
- Specifies the x-justification to use in positioning the time item in the tablepublic StringLabel addColumnStringItem(java.lang.String columnstring, double spacing, int xjust, int format)
columnstring
- Specifies the string object that is to be added to the table.spacing
- Specifies the column spacing increment in normalized coordinates.xjust
- Specifies the x-justification to use in positioning the time item in the tableformat
- Specifies the format.public StringLabel addColumnStringItem(java.lang.String columnstring, int format)
columnstring
- Specifies the string object that is to be added to the table.format
- Specifies the format to use.public StringLabel addColumnStringItem(StringLabel columnlabel, double spacing)
columnlabel
- Specifies the StringLabel object that is to be added to the table.spacing
- Specifies the column spacing increment in normalized coordinates.public void addHorizontalBar(double startx, double starty, double stopx, double stopy)
startx
- The starting x-position, in normalized coordinates, of the bar.starty
- The starting y-position, in normalized coordinates, of the bar.stopx
- The ending x-position, in normalized coordinates, of the bar.stopy
- The ending y-position, in normalized coordinates, of the bar.public void addHorizontalBar(double startx, double starty, double stopx, double stopy, ChartAttribute attrib1)
startx
- The starting x-position, in normalized coordinates, of the bar.starty
- The starting y-position, in normalized coordinates, of the bar.stopx
- The ending x-position, in normalized coordinates, of the bar.stopy
- The ending y-position, in normalized coordinates, of the bar.public NotesLabel addNotesItem(NotesLabel noteslabel, double spacing)
noteslabel
- Specifies the StringLabel object that is to be added to the table.spacing
- Specifies the column spacing increment in normalized coordinates.public NotesLabel addNotesItem(java.lang.String shortstring, java.lang.String longstring, double spacing, int xjust)
shortstring
- Specifies the short string of the NotesLabel object that is to be added to the table.longstring
- Specifies the long string of the NotesLabel object that is to be added to the table.spacing
- Specifies the column spacing increment in normalized coordinates.xjust
- Specifies the x-justification to use in positioning the string item in the tablepublic NumericLabel addNumericItem(double numericvalue)
numericvalue
- Specifies the numeric value that is to be added to the table.public NumericLabel addNumericItem(double numericvalue, double spacing)
numericvalue
- Specifies the numeric value that is to be added to the table.spacing
- Specifies the column spacing increment in normalized coordinates.public NumericLabel addNumericItem(double numericvalue, double spacing, int xjust)
numericvalue
- Specifies the numeric value that is to be added to the table.spacing
- Specifies the column spacing increment in normalized coordinates.xjust
- Specifies the x-justification to use in positioning the numeric item in the tablepublic NumericLabel addNumericItem(double numericvalue, double spacing, int xjust, int decs)
numericvalue
- Specifies the numeric value that is to be added to the table.spacing
- Specifies the column spacing increment in normalized coordinates.xjust
- Specifies the x-justification to use in positioning the numeric item in the tabledecs
- Specifies the decimal precision to use when converting the numeric value to a string.public NumericLabel addNumericItem(double numericvalue, int decs)
numericvalue
- Specifies the numeric value that is to be added to the table.decs
- Specifies the decimal precision to use when converting the numeric value to a string.public NumericLabel addNumericItem(NumericLabel numericlabel, double spacing)
numericlabel
- Specifies the NumericLabel object that is to be added to the table.spacing
- Specifies the column spacing increment in normalized coordinates.public NumericLabel addProcessCapabilityItem(double numericvalue, int decs)
numericvalue
- Specifies the numeric value that is to be added to the table.decs
- Specifies the decimal precision to use when converting the numeric value to a string.public NumericLabel addProcessCapabilityItem(NumericLabel numericlabel, double spacing)
numericlabel
- Specifies the numeric value that is to be added to the table.spacing
- Specifies the column spacing increment in normalized coordinates.public StringLabel addStringItem(java.lang.String stringvalue)
stringvalue
- Specifies the String object that is to be added to the table.public StringLabel addStringItem(java.lang.String stringvalue, double spacing)
stringvalue
- Specifies the String object that is to be added to the table.spacing
- Specifies the column spacing increment in normalized coordinates.public StringLabel addStringItem(java.lang.String stringvalue, double spacing, int xjust)
stringvalue
- Specifies the String object that is to be added to the table.spacing
- Specifies the column spacing increment in normalized coordinates.xjust
- Specifies the x-justification to use in positioning the string item in the tablepublic StringLabel addStringItem(StringLabel stringlabel, double spacing)
stringlabel
- Specifies the StringLabel object that is to be added to the table.spacing
- Specifies the column spacing increment in normalized coordinates.public TimeLabel addTimeItem(java.util.GregorianCalendar timevalue)
timevalue
- Specifies the ChartCalendar object that is to be added to the table.public TimeLabel addTimeItem(java.util.GregorianCalendar timevalue, double spacing)
timevalue
- Specifies the ChartCalendar object that is to be added to the table.spacing
- Specifies the column spacing increment in normalized coordinates.public TimeLabel addTimeItem(java.util.GregorianCalendar timevalue, double spacing, int xjust)
timevalue
- Specifies the ChartCalendar object that is to be added to the table.spacing
- Specifies the column spacing increment in normalized coordinates.xjust
- Specifies the x-justification to use in positioning the time item in the tablepublic TimeLabel addTimeItem(java.util.GregorianCalendar timevalue, double spacing, int xjust, int format)
timevalue
- Specifies the ChartCalendar object that is to be added to the table.spacing
- Specifies the column spacing increment in normalized coordinates.xjust
- Specifies the x-justification to use in positioning the time item in the tableformat
- Specifies the time/date format to use in converting the ChartCalendar object to a displayable string.public TimeLabel addTimeItem(java.util.GregorianCalendar timevalue, int format)
timevalue
- Specifies the ChartCalendar object that is to be added to the table.format
- Specifies the time/date format to use in converting the ChartCalendar object to a displayable string.public TimeLabel addTimeItem(TimeLabel timelabel, double spacing)
timelabel
- Specifies the TimeLabel object that is to be added to the table.spacing
- Specifies the column spacing increment in normalized coordinates.public java.lang.Object clone()
clone
in class java.lang.Object
public void copy(SPCGeneralizedTableDisplay source)
source
- The source object.public double getBackgroundBarXOffset()
public java.awt.Color getBackgroundColor1()
public java.awt.Color getBackgroundColor2()
public NumericLabel getCalculatedItemTemplate()
public java.awt.Font getCalculatedLabelFont()
public ChartLabel getChartLabel(int item)
item
- Specifies the index of the ChartLabel object in the chartLabelArray.
public double getCurrentColumnPosition()
public double getCurrentRowPosition()
public static java.awt.Font getDefaultTableFont()
public NotesLabel getNotesItemTemplate()
public java.awt.Font getNotesLabelFont()
public double getNumericColumnSpacing()
public double getNumericRowSpacing()
public NumericLabel getSampleItemTemplate()
public java.awt.Font getSampleLabelFont()
public double getStartColumnPosition()
public double getStartRowPosition()
public StringLabel getStringItemTemplate()
public java.awt.Font getStringLabelFont()
public int getTableBackgroundMode()
public double getTextColumnSpacing()
public double getTextRowOffset()
public double getTextRowSpacing()
public double getTimeColumnSpacing()
public TimeLabel getTimeItemTemplate()
public java.awt.Font getTimeLabelFont()
public double getTimeRowSpacing()
public void incrementRow(double spacing)
spacing
- Specifies the row spacing increment in normalized coordinates.public void incrementRow(int spaceid)
spaceid
- Specifies the row spacing increment. Use one of the row spacing ncrement constants:
TEXT_ROW_SPACING or NUMERIC_ROW_SPACING. *public void initDefaults()
public void setBackgroundBarXOffset(double value)
public void setBackgroundColor1(java.awt.Color value)
public void setBackgroundColor2(java.awt.Color value)
public void setCalculatedItemTemplate(NumericLabel value)
public void setCalculatedLabelFont(java.awt.Font value)
public void setCurrentColumnPosition(double value)
public void setCurrentRowPosition(double value)
public static void setDefaultTableFont(java.awt.Font value)
public void setNotesItemTemplate(NotesLabel value)
public void setNotesLabelFont(java.awt.Font value)
public void setNumericColumnSpacing(double value)
public void setNumericRowSpacing(double value)
public void setSampleItemTemplate(NumericLabel value)
public void setSampleLabelFont(java.awt.Font value)
public void setStartColumnPosition(double value)
public void setStartRowPosition(double value)
public void setStringItemTemplate(StringLabel value)
public void setStringLabelFont(java.awt.Font value)
public void setTableBackgroundMode(int value)
public void setTextColumnSpacing(double value)
public void setTextRowOffset(double value)
public void setTextRowSpacing(double value)
public void setTimeColumnSpacing(double value)
public void setTimeItemTemplate(TimeLabel value)
public void setTimeLabelFont(java.awt.Font value)
public void setTimeRowSpacing(double value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |