Package de.f0rce.ace.util
Class AceCursorPosition
java.lang.Object
de.f0rce.ace.util.AceCursorPosition
public class AceCursorPosition
extends java.lang.Object
- Author:
- David "F0rce" Dodlek
-
Constructor Summary
Constructors Constructor Description AceCursorPosition()
Default Constructor to have valid values on initializing.AceCursorPosition(elemental.json.JsonObject cursorObject)
Constructor for initializing the values directly from the frontend (only used inAceBlurChanged
,AceSelectionChanged
,AceForceSyncDomEvent
). -
Method Summary
Modifier and Type Method Description boolean
compareTo(AceCursorPosition a)
Check if one instance of theAceCursorPosition
is equal to another.int
getColumn()
Returns the column where the selection starts.int
getIndex()
Returns the index where the selection starts (calculation done in the frontend).int
getRow()
Returns the row where the selection starts.
-
Constructor Details
-
AceCursorPosition
public AceCursorPosition()Default Constructor to have valid values on initializing. -
AceCursorPosition
public AceCursorPosition(elemental.json.JsonObject cursorObject)Constructor for initializing the values directly from the frontend (only used inAceBlurChanged
,AceSelectionChanged
,AceForceSyncDomEvent
).- Parameters:
cursorObject
-JsonObject
-
-
Method Details
-
getRow
public int getRow()Returns the row where the selection starts.- Returns:
- int
-
getColumn
public int getColumn()Returns the column where the selection starts.- Returns:
- int
-
getIndex
public int getIndex()Returns the index where the selection starts (calculation done in the frontend).- Returns:
- int
-
compareTo
Check if one instance of theAceCursorPosition
is equal to another.- Parameters:
a
-AceCursorPosition
- Returns:
- boolean
-