Package org.fxmisc.richtext.model
Interface TwoDimensional
-
- All Known Subinterfaces:
EditableStyledDocument<PS,SEG,S>
,StyledDocument<PS,SEG,S>
,StyleSpans<S>
- All Known Implementing Classes:
CodeArea
,GenericEditableStyledDocument
,GenericStyledArea
,InlineCssTextArea
,InlineCssTextField
,ReadOnlyStyledDocument
,SimpleEditableStyledDocument
,StyleClassedTextArea
,StyleClassedTextField
,StyledTextArea
,StyledTextField
,TwoLevelNavigator
public interface TwoDimensional
TwoDimensional is an interface for any item which can be navigated in two dimensions, such as a List of Lists. In short, it allows one to find a position within this object.There are two basic kinds of two dimensional objects.
-
One has a type of
List<List<Object>>
. Themajor
dimension's value indicates the index of the "inner list" within the "outer list" while theminor
dimension's value indicates the index of the object within an "inner list." -
One has a type of
List<ObjectWithLengthMethod
as inList<String>
. Themajor
dimension's value indicates the index within the list while theminor
dimension's value indicates how far into that length-object a position is (e.g. how many characters into aString
is a position).
Not all two dimensional objects are rectangular, so the valid values of the minor dimension depends on the major dimension.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
TwoDimensional.Bias
Determines whether to add 1 when the end of an inner list is reachedstatic interface
TwoDimensional.Position
A two dimensional position, with a major offset (such as a paragraph index within a document) and a minor dimension (such as a segment index or column position within a paragraph).
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TwoDimensional.Position
offsetToPosition(int offset, TwoDimensional.Bias bias)
Creates a two dimensional position in some entity (e.g.TwoDimensional.Position
position(int major, int minor)
Creates a two dimensional position in some entity (e.g.
-
-
-
Method Detail
-
position
TwoDimensional.Position position(int major, int minor)
Creates a two dimensional position in some entity (e.g. area, list of lists, list of some object with length) where themajor
value is the index within the outer list) and theminor
value is either the index within the inner list or some amount of length in a list of objects that have length.
-
offsetToPosition
TwoDimensional.Position offsetToPosition(int offset, TwoDimensional.Bias bias)
Creates a two dimensional position in some entity (e.g. area, list of lists, list of some object with length) where theoffset
value is an absolute position in that entity.
-
-