
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 |
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
| 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.
| scrollData | The ScrollData object |
References jscicalc.DisplayLabel.DisplayCaret.updateFlag.
| 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
| graphics | Standard parameter |
References jscicalc.DisplayLabel.DisplayCaret.scrollData, jscicalc.DisplayLabel.ScrollData.update(), and jscicalc.DisplayLabel.DisplayCaret.updateFlag.
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] |
1.5.5