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,java.beans.PropertyChangeListener,java.lang.CharSequence,java.lang.Cloneable,java.util.EventListener
public class RMEditorTextEditor extends RMTextEditor implements java.beans.PropertyChangeListener
A text editor subclass suitable for editing RMText shapes in the RMEditor.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classRMEditorTextEditor.ETETextSelectionA 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
Constructors Constructor Description RMEditorTextEditor(RMEditor anOwner)Creates an RMEditor text editor for the given RMEditor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete(int aStart, int anEnd, boolean doUpdateSelection)Deletes the current selection.protected voidfirePropertyChange(java.beans.PropertyChangeEvent anEvent, java.lang.String aName, java.lang.Object oldVal, java.lang.Object newVal, int anIndex)Override so all property changes can trigger text shape repaint.RMTextLayoutgetLayout()Returns the text layout for the RMText being edited.RMTextShapegetTextShape()Returns the RMText shape being edited.RMUndoergetUndoer()Override to get undoer from text shape.protected java.lang.ObjectgetUndoSelection()Override to return selection for text shape.floatgetUpdatingMinHeight()Returns the minimum height of the RMText when editor text editor is updating size.booleanisUpdatingSize()Returns whether text editor is updating size (usually when text is first created with text tool).voidmouseDragged(java.awt.event.MouseEvent anEvent)Handles mouse dragged on the text editor.voidmousePressed(java.awt.event.MouseEvent anEvent)Handles mouse pressed on the text editor.voidmouseReleased(java.awt.event.MouseEvent anEvent)Handles mouse released on the text editor.voidmoveTableRowColumn(java.awt.event.MouseEvent anEvent)Move Table Row Column stuff (table row column re-ordering).voidpaste()Pastes the current clipboard data over the current selection.voidpropertyChange(java.beans.PropertyChangeEvent anEvent)Called when there are changes to text shape.voidredo()Override to forward to editor.voidreplace(java.lang.String aString, java.util.Map theAttributes, int aStart, int anEnd, boolean doUpdateSelection)Replaces the current selection with the given string.voidsetInputAttribute(java.lang.String aKey, java.lang.Object aValue)Sets the attributes that are applied to current selection or newly typed chars.voidsetInputParagraph(RMParagraph ps)Sets 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 voidsetXStringFromTextShape()Sets 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, 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
-
-
-
-
Constructor Detail
-
RMEditorTextEditor
public RMEditorTextEditor(RMEditor anOwner)
Creates an RMEditor text editor for the given RMEditor.
-
-
Method Detail
-
getTextShape
public RMTextShape getTextShape()
Returns the RMText shape being edited.
-
setTextShape
public void setTextShape(RMTextShape aText)
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
public RMTextLayout 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
public void setInputAttribute(java.lang.String aKey, java.lang.Object aValue)Sets the attributes that are applied to current selection or newly typed chars.- Overrides:
setInputAttributein classRMTextEditor
-
setInputParagraph
public void setInputParagraph(RMParagraph ps)
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(java.lang.String aString, java.util.Map theAttributes, int aStart, int anEnd, boolean doUpdateSelection)Replaces the current selection with the given string.- Overrides:
replacein classRMTextEditor
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent anEvent)
Handles mouse pressed on the text editor.- Overrides:
mousePressedin classRMTextEditor
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent anEvent)
Handles mouse dragged on the text editor.- Overrides:
mouseDraggedin classRMTextEditor
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent anEvent)
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(java.beans.PropertyChangeEvent anEvent, java.lang.String aName, java.lang.Object oldVal, java.lang.Object newVal, int anIndex)Override so all property changes can trigger text shape repaint.- Overrides:
firePropertyChangein classRMObject
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent anEvent)
Called when there are changes to text shape.- Specified by:
propertyChangein interfacejava.beans.PropertyChangeListener- Overrides:
propertyChangein classRMTextEditor
-
getUndoer
public RMUndoer getUndoer()
Override to get undoer from text shape.- Overrides:
getUndoerin classRMTextEditor
-
getUndoSelection
protected java.lang.Object 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
public void moveTableRowColumn(java.awt.event.MouseEvent anEvent)
Move Table Row Column stuff (table row column re-ordering).
-
-