Package de.f0rce.ace.util
Class AceSelection
java.lang.Object
de.f0rce.ace.util.AceSelection
public class AceSelection
extends java.lang.Object
- Author:
- David "F0rce" Dodlek
-
Constructor Summary
Constructors Constructor Description AceSelection()
Default Constructor to have valid values on initializing.AceSelection(elemental.json.JsonObject selectionObject)
Constructor for initializing the values directly from the frontend (only used inAceBlurChanged
,AceSelectionChanged
,AceForceSyncDomEvent
). -
Method Summary
Modifier and Type Method Description boolean
compareTo(AceSelection a)
Check if one instance of theAceSelection
is equal to another.int
getEndColumn()
Returns the column where the selection ends.int
getEndIndex()
Returns the index where the selections ends.int
getEndRow()
Returns the row where the selection ends.java.lang.String
getSelectedText()
Returns the text which is selected.int
getStartColumn()
Returns the column where the selection starts.int
getStartIndex()
Returns the index where the selection starts.int
getStartRow()
Returns the row where the selection starts.
-
Constructor Details
-
AceSelection
public AceSelection()Default Constructor to have valid values on initializing. -
AceSelection
public AceSelection(elemental.json.JsonObject selectionObject)Constructor for initializing the values directly from the frontend (only used inAceBlurChanged
,AceSelectionChanged
,AceForceSyncDomEvent
).- Parameters:
selectionObject
-JsonObject
-
-
Method Details
-
getStartRow
public int getStartRow()Returns the row where the selection starts.- Returns:
- int
-
getStartColumn
public int getStartColumn()Returns the column where the selection starts.- Returns:
- int
-
getStartIndex
public int getStartIndex()Returns the index where the selection starts.- Returns:
- int
-
getEndRow
public int getEndRow()Returns the row where the selection ends.- Returns:
- int
-
getEndColumn
public int getEndColumn()Returns the column where the selection ends.- Returns:
- int
-
getEndIndex
public int getEndIndex()Returns the index where the selections ends.- Returns:
- int
-
getSelectedText
public java.lang.String getSelectedText()Returns the text which is selected.- Returns:
String
-
compareTo
Check if one instance of theAceSelection
is equal to another.- Parameters:
a
-AceSelection
- Returns:
- boolean
-