Package bluej.extensions2.editor
Class StrideEditor
- java.lang.Object
-
- bluej.extensions2.editor.StrideEditor
-
public class StrideEditor extends java.lang.Object
A class representing an editor for a Stride class.- Since:
- Extension API 3.2 (BlueJ 5.0.2)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BClass
getBClass()
Gets the class that this editor is editing.javafx.geometry.Rectangle2D
getScreenBounds()
Gets the screen bounds of the window that this editor is contained in, if and only if this is the selected tab in its editor window and the window is showing and the window is not minimised.java.lang.String
getXPathForItemAtPosition(int screenX, int screenY, boolean includePseudoElements, boolean includeSubstringIndex)
Gets the XPath for the element at the given position.
-
-
-
Method Detail
-
getBClass
public BClass getBClass()
Gets the class that this editor is editing.
-
getScreenBounds
public javafx.geometry.Rectangle2D getScreenBounds()
Gets the screen bounds of the window that this editor is contained in, if and only if this is the selected tab in its editor window and the window is showing and the window is not minimised. Returns null otherwise.- Since:
- Extension API 3.2 (BlueJ 5.0.2)
-
getXPathForItemAtPosition
public java.lang.String getXPathForItemAtPosition(int screenX, int screenY, boolean includePseudoElements, boolean includeSubstringIndex)
Gets the XPath for the element at the given position. This may be the path to a pseudo-element that does not actually exist in the Stride XML but is still on screen (e.g. the "if" keyword). In this case one of the element names in the path will have an underscore at the beginning.- Parameters:
screenX
- The X position on screenscreenY
- The Y position on screenincludePseudoElements
- Whether to include paths to pseudo-elements that aren't present in Stride's XML representation, but have an on-screen representation, for example the keyword "while" in the while frame, or the "<=" operator in an assignment frame.includeSubstringIndex
- Whether to include a substring call that indicates which exact character the position corresponds to, within structured slots.- Returns:
- The XPath, or null if no Stride element is at that position.
-
-