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 TwoDimensionalTwoDimensional 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>>. Themajordimension's value indicates the index of the "inner list" within the "outer list" while theminordimension's value indicates the index of the object within an "inner list." -
One has a type of
List<ObjectWithLengthMethodas inList<String>. Themajordimension's value indicates the index within the list while theminordimension's value indicates how far into that length-object a position is (e.g. how many characters into aStringis 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 classTwoDimensional.BiasDetermines whether to add 1 when the end of an inner list is reachedstatic interfaceTwoDimensional.PositionA 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.PositionoffsetToPosition(int offset, TwoDimensional.Bias bias)Creates a two dimensional position in some entity (e.g.TwoDimensional.Positionposition(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 themajorvalue is the index within the outer list) and theminorvalue 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 theoffsetvalue is an absolute position in that entity.
-
-