Class RMEditorTextEditor
java.lang.Object
com.inductiveautomation.rm.base.RMListenerList
com.inductiveautomation.rm.base.RMObject
com.inductiveautomation.rm.text.RMTextEditor
com.inductiveautomation.rm.editor.RMEditorTextEditor
- All Implemented Interfaces:
RMPropertyChanger
,RMTypes
,RMTextTypes
,PropertyChangeListener
,CharSequence
,Cloneable
,EventListener
A text editor subclass suitable for editing RMText shapes in the RMEditor.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
A class for a text selection.Nested classes/interfaces inherited from class com.inductiveautomation.rm.text.RMTextEditor
RMTextEditor.TextSelection
Nested classes/interfaces inherited from interface com.inductiveautomation.rm.text.RMTextTypes
RMTextTypes.TabType
Nested classes/interfaces inherited from interface com.inductiveautomation.rm.base.RMTypes
RMTypes.Align, RMTypes.AlignX, RMTypes.AlignY
-
Field Summary
Fields inherited from class com.inductiveautomation.rm.text.RMTextEditor
isHyphenating, isSpellChecking
Fields inherited from interface com.inductiveautomation.rm.text.RMTextTypes
TEXT_CHAR_SPACING, TEXT_COLOR, TEXT_EMBEDDED_SHAPE, TEXT_FONT, TEXT_FORMAT, TEXT_OUTLINE, TEXT_PARAGRAPH, TEXT_SCRIPTING, TEXT_UNDERLINE
-
Constructor Summary
ConstructorsConstructorDescriptionRMEditorTextEditor
(RMEditor anOwner) Creates an RMEditor text editor for the given RMEditor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
delete
(int aStart, int anEnd, boolean doUpdateSelection) Deletes the current selection.protected void
firePropertyChange
(PropertyChangeEvent anEvent, String aName, Object oldVal, Object newVal, int anIndex) Override so all property changes can trigger text shape repaint.Returns the text layout for the RMText being edited.Returns the RMText shape being edited.Override to get undoer from text shape.protected Object
Override to return selection for text shape.float
Returns the minimum height of the RMText when editor text editor is updating size.boolean
Returns whether text editor is updating size (usually when text is first created with text tool).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
moveTableRowColumn
(MouseEvent anEvent) Move Table Row Column stuff (table row column re-ordering).void
paste()
Pastes the current clipboard data over the current selection.void
propertyChange
(PropertyChangeEvent anEvent) Called when there are changes to text shape.void
redo()
Override to forward to editor.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
setSel
(int aStart, int anEnd) Override to forward to Editor.void
setTextShape
(RMTextShape aText) Sets the RMText shape to be edited.void
setUpdatingMinHeight
(float aValue) Sets the minimum height of the RMText when editor text editor is updating size.void
setUpdatingSize
(boolean aValue) Sets whether text editor is updating size (usually when text is first created with text tool).protected void
Sets the text editor xstring to text shape's xstring.void
undo()
Override to forward to editor.Methods inherited from class com.inductiveautomation.rm.text.RMTextEditor
charAt, copy, createLayout, cut, delete, deleteForward, deleteToLineEnd, getAlignmentX, getBounds, getCharIndex, getCharSpacing, getColor, getFont, getFontScale, getFormat, getHeight, getHeightToFit, getInputParagraph, getInputStyle, getLine, getLineCount, getLineForChar, getLineGap, getLineHeightMax, getLineHeightMin, getLineSpacing, getOutline, getSel, getSel, getSelAnchor, getSelEnd, getSelPath, getSelStart, getSelStartLine, getSpellingPath, getString, getWidth, getWidthToFit, getX, getXString, getY, isHyphenating, isSelEmpty, isSpellChecking, isUnderlined, keyBackward, keyDown, keyForward, keyPressed, keyTyped, keyUp, length, paint, processKeyEvent, relayout, replace, replace, replace, replace, replace, selectAll, selectLineEnd, selectLineStart, setAlignmentX, setBounds, setBounds, setCharSpacing, setColor, setFont, setFontScale, setFormat, setLineGap, setLineHeightMax, setLineHeightMin, setLineSpacing, setOutline, setSel, setSel, setSubscript, setSuperscript, setUnderlined, setXString, subSequence, undoerAddPropertyChange, undoerSaveChanges
Methods inherited from class com.inductiveautomation.rm.base.RMObject
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange, toString
Methods inherited from class com.inductiveautomation.rm.base.RMListenerList
addListener, clone, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.CharSequence
chars, codePoints, isEmpty, toString
-
Constructor Details
-
RMEditorTextEditor
Creates an RMEditor text editor for the given RMEditor.
-
-
Method Details
-
getTextShape
Returns the RMText shape being edited. -
setTextShape
Sets the RMText shape to be edited. -
setXStringFromTextShape
protected void setXStringFromTextShape()Sets the text editor xstring to text shape's xstring. -
isUpdatingSize
public boolean isUpdatingSize()Returns whether text editor is updating size (usually when text is first created with text tool). -
setUpdatingSize
public void setUpdatingSize(boolean aValue) Sets whether text editor is updating size (usually when text is first created with text tool). -
getUpdatingMinHeight
public float getUpdatingMinHeight()Returns the minimum height of the RMText when editor text editor is updating size. -
setUpdatingMinHeight
public void setUpdatingMinHeight(float aValue) Sets the minimum height of the RMText when editor text editor is updating size. -
getLayout
Returns the text layout for the RMText being edited.- Overrides:
getLayout
in classRMTextEditor
-
setSel
public void setSel(int aStart, int anEnd) Override to forward to Editor.- Overrides:
setSel
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
-
delete
public void delete(int aStart, int anEnd, boolean doUpdateSelection) Deletes the current selection.- Overrides:
delete
in classRMTextEditor
-
replace
public void replace(String aString, Map theAttributes, int aStart, int anEnd, boolean doUpdateSelection) Replaces the current selection with the given string.- Overrides:
replace
in classRMTextEditor
-
mousePressed
Handles mouse pressed on the text editor.- Overrides:
mousePressed
in classRMTextEditor
-
mouseDragged
Handles mouse dragged on the text editor.- Overrides:
mouseDragged
in classRMTextEditor
-
mouseReleased
Handles mouse released on the text editor.- Overrides:
mouseReleased
in classRMTextEditor
-
paste
public void paste()Pastes the current clipboard data over the current selection.- Overrides:
paste
in classRMTextEditor
-
firePropertyChange
protected void firePropertyChange(PropertyChangeEvent anEvent, String aName, Object oldVal, Object newVal, int anIndex) Override so all property changes can trigger text shape repaint.- Overrides:
firePropertyChange
in classRMObject
-
propertyChange
Called when there are changes to text shape.- Specified by:
propertyChange
in interfacePropertyChangeListener
- Overrides:
propertyChange
in classRMTextEditor
-
getUndoer
Override to get undoer from text shape.- Overrides:
getUndoer
in classRMTextEditor
-
getUndoSelection
Override to return selection for text shape.- Overrides:
getUndoSelection
in classRMTextEditor
-
undo
public void undo()Override to forward to editor.- Overrides:
undo
in classRMTextEditor
-
redo
public void redo()Override to forward to editor.- Overrides:
redo
in classRMTextEditor
-
moveTableRowColumn
Move Table Row Column stuff (table row column re-ordering).
-