jscicalc.DisplayLabel.DisplayCaret Class Reference

This is a local class that implements a default Caret. More...

Collaboration diagram for jscicalc.DisplayLabel.DisplayCaret:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 DisplayCaret (ScrollData scrollData)
 The constructor gets a ScrollData object so that when the Caret gets repainted the ScrollData data can be calculated.
void paint (java.awt.Graphics graphics)
 Standard paint method with one addition: if updateFlag has been set to true then ScrollData data is calculated immediately after the paint method of the superclass is called.

Public Attributes

boolean updateFlag
 Set this flag to true to force an update of calculated distances used for scrolling DisplayLabel.

Private Attributes

ScrollData scrollData
 Keep a reference to the ScrollData object.

Static Private Attributes

static final long serialVersionUID = 1L


Detailed Description

This is a local class that implements a default Caret.

It’s purpose is purely to get access to modelToView at a point when the textpane and caret cannot move and so calculate distances for scrolling


Constructor & Destructor Documentation

jscicalc.DisplayLabel.DisplayCaret.DisplayCaret ( ScrollData  scrollData  ) 

The constructor gets a ScrollData object so that when the Caret gets repainted the ScrollData data can be calculated.

Parameters:
scrollData The ScrollData object

References jscicalc.DisplayLabel.DisplayCaret.updateFlag.


Member Function Documentation

void jscicalc.DisplayLabel.DisplayCaret.paint ( java.awt.Graphics  graphics  ) 

Standard paint method with one addition: if updateFlag has been set to true then ScrollData data is calculated immediately after the paint method of the superclass is called.

This allows us to get distances without risk of values changing because of events in another thread. In fact, it doesn’t fully account for concurrency problems: I haven’t checked that there are no possible circumstances under which the data in ScrollData might be required before this function call

Parameters:
graphics Standard parameter

References jscicalc.DisplayLabel.DisplayCaret.scrollData, jscicalc.DisplayLabel.ScrollData.update(), and jscicalc.DisplayLabel.DisplayCaret.updateFlag.


Member Data Documentation

Keep a reference to the ScrollData object.

Referenced by jscicalc.DisplayLabel.DisplayCaret.paint().

Set this flag to true to force an update of calculated distances used for scrolling DisplayLabel.

Referenced by jscicalc.DisplayLabel.DisplayCaret.DisplayCaret(), jscicalc.DisplayLabel.DisplayCaret.paint(), and jscicalc.DisplayLabel.setNewExpression().

final long jscicalc.DisplayLabel.DisplayCaret.serialVersionUID = 1L [static, private]


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

Generated on Sun Jun 1 08:57:40 2008 for Java Scientific Calculator by  doxygen 1.5.5