
Public Member Functions | |
| Navigator () | |
| Create a new navigator and set dots to contain only the position one. | |
| void | moveDot (javax.swing.text.NavigationFilter.FilterBypass fb, int dot, javax.swing.text.Position.Bias bias) |
| Override default method. | |
| void | setDot (javax.swing.text.NavigationFilter.FilterBypass fb, int dot, javax.swing.text.Position.Bias bias) |
| Override default method. | |
| int | getNextVisualPositionFrom (javax.swing.text.JTextComponent text, int pos, javax.swing.text.Position.Bias bias, int direction, javax.swing.text.Position.Bias[] biasRet) throws javax.swing.text.BadLocationException |
| Override default method. | |
| java.util.Vector< Integer > | dots () |
| Allow access to dots so that it can be set by something else. | |
Protected Attributes | |
| java.util.Vector< Integer > | dots |
| Use this to translate between position 0, 1, . | |
| final int | MAX = 34 |
| Used i by setDot;. | |
This makes it easier to have an editable expression.
LeftButton
RightButton
| jscicalc.Navigator.Navigator | ( | ) |
Create a new navigator and set dots to contain only the position one.
References jscicalc.Navigator.dots().
| void jscicalc.Navigator.moveDot | ( | javax.swing.text.NavigationFilter.FilterBypass | fb, | |
| int | dot, | |||
| javax.swing.text.Position.Bias | bias | |||
| ) |
Override default method.
This stops us selecting text.
| fb | Used if we want to move the Caret without the move being intercepted by this filter | |
| dot | The Caret position | |
| bias | See Sun’s documentation. We pass this on but don’t use it. |
References jscicalc.Navigator.setDot().
| void jscicalc.Navigator.setDot | ( | javax.swing.text.NavigationFilter.FilterBypass | fb, | |
| int | dot, | |||
| javax.swing.text.Position.Bias | bias | |||
| ) |
Override default method.
Make sure we’re always ‘between’ PObject objects.
| fb | Used if we want to move the Caret without the move being intercepted by this filter | |
| dot | The Caret position | |
| bias | See Sun’s documentation. We pass this on but don’t use it. |
References jscicalc.Navigator.dots(), and jscicalc.Navigator.MAX.
Referenced by jscicalc.Navigator.moveDot().
| int jscicalc.Navigator.getNextVisualPositionFrom | ( | javax.swing.text.JTextComponent | text, | |
| int | pos, | |||
| javax.swing.text.Position.Bias | bias, | |||
| int | direction, | |||
| javax.swing.text.Position.Bias[] | biasRet | |||
| ) | throws javax.swing.text.BadLocationException |
Override default method.
Make sure we’re always ‘between’ objects.
| text | See Sun’s documentation. We don’t use this except to pass it on | |
| pos | The desired Caret position | |
| bias | See Sun’s documentation. We don’t use this except to pass it on | |
| direction | See Sun’s documentation. We don’t use this except to pass it on | |
| biasRet | See Sun’s documentation. We don’t use this except to pass it on |
References jscicalc.Navigator.dots().
| java.util.Vector<Integer> jscicalc.Navigator.dots | ( | ) |
Allow access to dots so that it can be set by something else.
Referenced by jscicalc.Navigator.getNextVisualPositionFrom(), jscicalc.Navigator.Navigator(), and jscicalc.Navigator.setDot().
java.util.Vector<Integer> jscicalc.Navigator.dots [protected] |
Use this to translate between position 0, 1, .
.. , end and the acceptable places for the Caret. For example 3+sin 45 as text (even in html) would have vector (1,2,3,7,8,9) indicating that the Caret can be placed at start, end or between any characters, except that "sin " must be treated as it were a single character.
Referenced by jscicalc.EntryLabel.delete(), jscicalc.ScrollableLabel.getDotPosition(), jscicalc.EntryLabel.insert(), jscicalc.ScrollableLabel.left(), jscicalc.ScrollableLabel.right(), jscicalc.DisplayLabel.ScrollData.ScrollData(), jscicalc.EntryLabel.setExpression(), and jscicalc.DisplayLabel.setExpression().
final int jscicalc.Navigator.MAX = 34 [protected] |
1.5.5