Package com.reportmill.editor
Class RMEditorTextEditor
java.lang.Object
com.reportmill.text.RMTextEditor
com.reportmill.editor.RMEditorTextEditor
A text editor subclass suitable for editing RMText shapes in the RMEditor.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.reportmill.text.RMTextEditor
RMTextEditor.Listener
-
Field Summary
FieldsFields inherited from class com.reportmill.text.RMTextEditor
isHyphenating, isSpellChecking
-
Constructor Summary
ConstructorsConstructorDescriptionRMEditorTextEditor
(RMEditor anOwner) Creates an RMEditor text editor for the given RMEditor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
Deletes the current selection.float
Returns the height need to show all characters.Returns the text layout for the RMText being edited.void
mouseDragged
(MouseEvent anEvent) Handles mouse dragged on the text editor.void
mousePressed
(MouseEvent anEvent) Handles mouse pressed on the text editor.void
mouseReleased
(MouseEvent anEvent) Handles mouse released on the text editor.void
Move Table Row Column stuff (table row column re-ordering).void
Move Table Row Column stuff (table row column re-ordering).static void
paintShape
(RMText aText, RMEditor anEditor, Graphics2D g) Paints the text editor.void
processKeyEvent
(KeyEvent anEvent) Handles key events.void
Replaces the current selection with the given sstring.void
Replaces the current selection with the given string.void
setInputAttribute
(String aKey, Object aValue) Sets the attributes that are applied to current selection or newly typed chars.void
Sets the paragraph of the current selection or cursor position.void
Called when text editor needs to repaint.void
setSelection
(int newStart, int newEnd) Sets the character index of the start and end of the text selection.void
Sets the RMText to be edited.void
Called when there are changes to underlying xstring.Methods inherited from class com.reportmill.text.RMTextEditor
addListener, copy, cut, deleteForward, deleteToLineEnd, getAlign, getBounds, getCharSpacing, getColor, getFont, getFontScale, getFormat, getInputAttributes, getInputParagraph, getLineGap, getLineHeightMax, getLineHeightMin, getLineSpacing, getListener, getOutline, getSelectionPath, getSelEnd, getSelStart, getSpellingPath, getString, getXString, isUnderlined, keyBackward, keyDown, keyForward, keyUp, length, lineEnd, lineStart, mouseDragged, mousePressed, mouseReleased, paintLayout, paintLayout, paste, removeListener, selectAll, setAlign, setBounds, setCharSpacing, setColor, setFont, setFontScale, setFormat, setLineGap, setLineHeightMax, setLineHeightMin, setLineSpacing, setOutline, setSelection, setSelEnd, setSelStart, setSubscript, setSuperscript, setTextLayout, setUnderlined, setXString, smartFindFormatRange
-
Field Details
-
_edText
-
_updatingSize
public boolean _updatingSize -
_updatingMinHeight
public float _updatingMinHeight
-
-
Constructor Details
-
RMEditorTextEditor
Creates an RMEditor text editor for the given RMEditor.
-
-
Method Details
-
setText
Sets the RMText to be edited. -
getTextLayout
Returns the text layout for the RMText being edited.- Overrides:
getTextLayout
in classRMTextEditor
-
setSelection
public void setSelection(int newStart, int newEnd) Sets the character index of the start and end of the text selection.- Overrides:
setSelection
in classRMTextEditor
-
setInputAttribute
Sets the attributes that are applied to current selection or newly typed chars.- Overrides:
setInputAttribute
in classRMTextEditor
-
setInputParagraph
Sets the paragraph of the current selection or cursor position.- Overrides:
setInputParagraph
in classRMTextEditor
-
replace
Replaces the current selection with the given string.- Overrides:
replace
in classRMTextEditor
-
replace
Replaces the current selection with the given sstring.- Overrides:
replace
in classRMTextEditor
-
delete
public void delete()Deletes the current selection.- Overrides:
delete
in classRMTextEditor
-
getHeightToFit
public float getHeightToFit()Returns the height need to show all characters.- Overrides:
getHeightToFit
in classRMTextEditor
-
mousePressed
Handles mouse pressed on the text editor. -
mouseDragged
Handles mouse dragged on the text editor. -
mouseReleased
Handles mouse released on the text editor. -
processKeyEvent
Handles key events.- Overrides:
processKeyEvent
in classRMTextEditor
-
paintShape
Paints the text editor. -
setNeedsRepaint
public void setNeedsRepaint()Called when text editor needs to repaint.- Overrides:
setNeedsRepaint
in classRMTextEditor
-
textDidChange
public void textDidChange()Called when there are changes to underlying xstring.- Overrides:
textDidChange
in classRMTextEditor
-
moveTableRowColumnStart
public void moveTableRowColumnStart()Move Table Row Column stuff (table row column re-ordering). -
moveTableRowColumn
Move Table Row Column stuff (table row column re-ordering).
-