Crossfire JXClient, Trunk
Public Member Functions | Public Attributes | Static Public Attributes | Package Attributes | List of all members
Cell Class Reference
Collaboration diagram for Cell:
Collaboration graph

Public Member Functions

 Cell (SpreadSheet app, Color bgColor, Color fgColor, Color highlightColor, int width, int height)
 
void deselect ()
 
String getPrintString ()
 
String getValueString ()
 
void paint (Graphics g, int x, int y)
 
String parseFormula (String formula, Node node)
 
String parseValue (String formula, Node node)
 
void select ()
 
void setRawValue (float f)
 
void setTransientValue (float f)
 
void setUnparsedValue (String s)
 
void setValue (float f)
 
void setValue (int type, String s)
 

Public Attributes

int type = Cell.VALUE
 

Static Public Attributes

static final int FORMULA = 3
 
static final int LABEL = 1
 
static final int URL = 2
 
static final int VALUE = 0
 

Package Attributes

SpreadSheet app
 
Color bgColor
 
Color fgColor
 
int height
 
Color highlightColor
 
boolean needRedisplay
 
Node parseRoot
 
boolean paused = false
 
String printString = "v"
 
boolean selected = false
 
boolean transientValue = false
 
CellUpdater updaterThread
 
float value
 
String valueString = ""
 
int width
 

Detailed Description

Definition at line 455 of file SpreadSheet.java.

Constructor & Destructor Documentation

◆ Cell()

Cell.Cell ( SpreadSheet  app,
Color  bgColor,
Color  fgColor,
Color  highlightColor,
int  width,
int  height 
)

Definition at line 478 of file SpreadSheet.java.

References app, bgColor, fgColor, height, highlightColor, needRedisplay, and width.

Member Function Documentation

◆ deselect()

void Cell.deselect ( )

Definition at line 718 of file SpreadSheet.java.

References app, needRedisplay, paused, and selected.

Referenced by SpreadSheet.mousePressed().

Here is the caller graph for this function:

◆ getPrintString()

String Cell.getPrintString ( )

Definition at line 709 of file SpreadSheet.java.

References printString.

Referenced by SpreadSheet.mousePressed().

Here is the caller graph for this function:

◆ getValueString()

String Cell.getValueString ( )

Definition at line 705 of file SpreadSheet.java.

References valueString.

Referenced by CellUpdater.run().

Here is the caller graph for this function:

◆ paint()

void Cell.paint ( Graphics  g,
int  x,
int  y 
)

Definition at line 725 of file SpreadSheet.java.

References bgColor, fgColor, FORMULA, height, highlightColor, LABEL, needRedisplay, selected, transientValue, type, URL, VALUE, value, valueString, and width.

Referenced by SpreadSheet.paint(), and SpreadSheet.update().

Here is the caller graph for this function:

◆ parseFormula()

String Cell.parseFormula ( String  formula,
Node  node 
)

Parse a spreadsheet formula. The syntax is defined as:

formula -> value formula -> value op value value -> '(' formula ')' value -> cell value -> <number> op -> '+' | '*' | '/' | '-' cell -> <letter><number>

Definition at line 542 of file SpreadSheet.java.

References Node.left, Node.OP, Node.op, parseValue(), Node.right, and Node.type.

Referenced by parseValue(), and setValue().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseValue()

String Cell.parseValue ( String  formula,
Node  node 
)

Definition at line 598 of file SpreadSheet.java.

References Node.CELL, Node.column, parseFormula(), Node.row, Node.type, Node.VALUE, and Node.value.

Referenced by parseFormula().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ select()

void Cell.select ( )

Definition at line 713 of file SpreadSheet.java.

References paused, and selected.

Referenced by SpreadSheet.mousePressed().

Here is the caller graph for this function:

◆ setRawValue()

void Cell.setRawValue ( float  f)

Definition at line 493 of file SpreadSheet.java.

References value, and valueString.

Referenced by SpreadSheet.recalculate(), and setValue().

Here is the caller graph for this function:

◆ setTransientValue()

void Cell.setTransientValue ( float  f)

Definition at line 507 of file SpreadSheet.java.

References app, needRedisplay, SpreadSheet.recalculate(), transientValue, and value.

Referenced by CellUpdater.run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setUnparsedValue()

void Cell.setUnparsedValue ( String  s)

Definition at line 514 of file SpreadSheet.java.

References FORMULA, LABEL, setValue(), URL, and VALUE.

Referenced by SpreadSheet.init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setValue() [1/2]

void Cell.setValue ( float  f)

Definition at line 498 of file SpreadSheet.java.

References app, needRedisplay, paused, printString, SpreadSheet.recalculate(), setRawValue(), type, VALUE, and valueString.

Referenced by SpreadSheet.setCurrentValue(), setUnparsedValue(), and setValue().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setValue() [2/2]

void Cell.setValue ( int  type,
String  s 
)

Definition at line 675 of file SpreadSheet.java.

References app, FORMULA, LABEL, needRedisplay, parseFormula(), parseRoot, paused, printString, SpreadSheet.recalculate(), CellUpdater.run, setValue(), type, updaterThread, URL, VALUE, and valueString.

Here is the call graph for this function:

Member Data Documentation

◆ app

SpreadSheet Cell.app
package

Definition at line 474 of file SpreadSheet.java.

Referenced by Cell(), deselect(), CellUpdater.run(), setTransientValue(), and setValue().

◆ bgColor

Color Cell.bgColor
package

Definition at line 469 of file SpreadSheet.java.

Referenced by Cell(), and paint().

◆ fgColor

Color Cell.fgColor
package

Definition at line 470 of file SpreadSheet.java.

Referenced by Cell(), and paint().

◆ FORMULA

final int Cell.FORMULA = 3
static

◆ height

int Cell.height
package

Definition at line 473 of file SpreadSheet.java.

Referenced by Cell(), and paint().

◆ highlightColor

Color Cell.highlightColor
package

Definition at line 471 of file SpreadSheet.java.

Referenced by Cell(), and paint().

◆ LABEL

final int Cell.LABEL = 1
static

Definition at line 458 of file SpreadSheet.java.

Referenced by paint(), SpreadSheetInput.selected(), setUnparsedValue(), and setValue().

◆ needRedisplay

boolean Cell.needRedisplay
package

◆ parseRoot

Node Cell.parseRoot
package

Definition at line 461 of file SpreadSheet.java.

Referenced by setValue().

◆ paused

boolean Cell.paused = false
package

Definition at line 476 of file SpreadSheet.java.

Referenced by deselect(), CellUpdater.run(), select(), and setValue().

◆ printString

String Cell.printString = "v"
package

Definition at line 467 of file SpreadSheet.java.

Referenced by getPrintString(), and setValue().

◆ selected

boolean Cell.selected = false
package

Definition at line 463 of file SpreadSheet.java.

Referenced by deselect(), paint(), and select().

◆ transientValue

boolean Cell.transientValue = false
package

Definition at line 464 of file SpreadSheet.java.

Referenced by paint(), and setTransientValue().

◆ type

int Cell.type = Cell.VALUE

Definition at line 465 of file SpreadSheet.java.

Referenced by paint(), and setValue().

◆ updaterThread

CellUpdater Cell.updaterThread
package

Definition at line 475 of file SpreadSheet.java.

Referenced by SpreadSheet.destroy(), and setValue().

◆ URL

final int Cell.URL = 2
static

◆ VALUE

final int Cell.VALUE = 0
static

Definition at line 457 of file SpreadSheet.java.

Referenced by paint(), setUnparsedValue(), and setValue().

◆ value

float Cell.value
package

◆ valueString

String Cell.valueString = ""
package

Definition at line 466 of file SpreadSheet.java.

Referenced by getValueString(), paint(), setRawValue(), and setValue().

◆ width

int Cell.width
package

Definition at line 472 of file SpreadSheet.java.

Referenced by Cell(), and paint().


The documentation for this class was generated from the following file: