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 TypeClassDescriptionclassA class for a text selection.Nested classes/interfaces inherited from class com.inductiveautomation.rm.text.RMTextEditor
RMTextEditor.TextSelectionNested classes/interfaces inherited from interface com.inductiveautomation.rm.text.RMTextTypes
RMTextTypes.TabTypeNested 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, isSpellCheckingFields 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 TypeMethodDescriptionvoiddelete(int aStart, int anEnd, boolean doUpdateSelection) Deletes the current selection.protected voidfirePropertyChange(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 ObjectOverride to return selection for text shape.floatReturns the minimum height of the RMText when editor text editor is updating size.booleanReturns whether text editor is updating size (usually when text is first created with text tool).voidmouseDragged(MouseEvent anEvent) Handles mouse dragged on the text editor.voidmousePressed(MouseEvent anEvent) Handles mouse pressed on the text editor.voidmouseReleased(MouseEvent anEvent) Handles mouse released on the text editor.voidmoveTableRowColumn(MouseEvent anEvent) Move Table Row Column stuff (table row column re-ordering).voidpaste()Pastes the current clipboard data over the current selection.voidpropertyChange(PropertyChangeEvent anEvent) Called when there are changes to text shape.voidredo()Override to forward to editor.voidReplaces the current selection with the given string.voidsetInputAttribute(String aKey, Object aValue) Sets the attributes that are applied to current selection or newly typed chars.voidSets the paragraph of the current selection or cursor position.voidsetSel(int aStart, int anEnd) Override to forward to Editor.voidsetTextShape(RMTextShape aText) Sets the RMText shape to be edited.voidsetUpdatingMinHeight(float aValue) Sets the minimum height of the RMText when editor text editor is updating size.voidsetUpdatingSize(boolean aValue) Sets whether text editor is updating size (usually when text is first created with text tool).protected voidSets the text editor xstring to text shape's xstring.voidundo()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, undoerSaveChangesMethods inherited from class com.inductiveautomation.rm.base.RMObject
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange, toStringMethods inherited from class com.inductiveautomation.rm.base.RMListenerList
addListener, clone, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListenerMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
getLayoutin classRMTextEditor
-
setSel
public void setSel(int aStart, int anEnd) Override to forward to Editor.- Overrides:
setSelin classRMTextEditor
-
setInputAttribute
Sets the attributes that are applied to current selection or newly typed chars.- Overrides:
setInputAttributein classRMTextEditor
-
setInputParagraph
Sets the paragraph of the current selection or cursor position.- Overrides:
setInputParagraphin classRMTextEditor
-
delete
public void delete(int aStart, int anEnd, boolean doUpdateSelection) Deletes the current selection.- Overrides:
deletein classRMTextEditor
-
replace
public void replace(String aString, Map theAttributes, int aStart, int anEnd, boolean doUpdateSelection) Replaces the current selection with the given string.- Overrides:
replacein classRMTextEditor
-
mousePressed
Handles mouse pressed on the text editor.- Overrides:
mousePressedin classRMTextEditor
-
mouseDragged
Handles mouse dragged on the text editor.- Overrides:
mouseDraggedin classRMTextEditor
-
mouseReleased
Handles mouse released on the text editor.- Overrides:
mouseReleasedin classRMTextEditor
-
paste
public void paste()Pastes the current clipboard data over the current selection.- Overrides:
pastein 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:
firePropertyChangein classRMObject
-
propertyChange
Called when there are changes to text shape.- Specified by:
propertyChangein interfacePropertyChangeListener- Overrides:
propertyChangein classRMTextEditor
-
getUndoer
Override to get undoer from text shape.- Overrides:
getUndoerin classRMTextEditor
-
getUndoSelection
Override to return selection for text shape.- Overrides:
getUndoSelectionin classRMTextEditor
-
undo
public void undo()Override to forward to editor.- Overrides:
undoin classRMTextEditor
-
redo
public void redo()Override to forward to editor.- Overrides:
redoin classRMTextEditor
-
moveTableRowColumn
Move Table Row Column stuff (table row column re-ordering).
-