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 class
RMEditorTextEditor.ETETextSelection
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
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 void
delete(int aStart, int anEnd, boolean doUpdateSelection)
Deletes the current selection.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.RMTextLayout
getLayout()
Returns the text layout for the RMText being edited.RMTextShape
getTextShape()
Returns the RMText shape being edited.RMUndoer
getUndoer()
Override to get undoer from text shape.protected java.lang.Object
getUndoSelection()
Override to return selection for text shape.float
getUpdatingMinHeight()
Returns the minimum height of the RMText when editor text editor is updating size.boolean
isUpdatingSize()
Returns whether text editor is updating size (usually when text is first created with text tool).void
mouseDragged(java.awt.event.MouseEvent anEvent)
Handles mouse dragged on the text editor.void
mousePressed(java.awt.event.MouseEvent anEvent)
Handles mouse pressed on the text editor.void
mouseReleased(java.awt.event.MouseEvent anEvent)
Handles mouse released on the text editor.void
moveTableRowColumn(java.awt.event.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(java.beans.PropertyChangeEvent anEvent)
Called when there are changes to text shape.void
redo()
Override to forward to editor.void
replace(java.lang.String aString, java.util.Map theAttributes, int aStart, int anEnd, boolean doUpdateSelection)
Replaces the current selection with the given string.void
setInputAttribute(java.lang.String aKey, java.lang.Object aValue)
Sets the attributes that are applied to current selection or newly typed chars.void
setInputParagraph(RMParagraph ps)
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
setXStringFromTextShape()
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
-
-
-
-
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:
getLayout
in classRMTextEditor
-
setSel
public void setSel(int aStart, int anEnd)
Override to forward to Editor.- Overrides:
setSel
in 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:
setInputAttribute
in classRMTextEditor
-
setInputParagraph
public void setInputParagraph(RMParagraph ps)
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(java.lang.String aString, java.util.Map theAttributes, int aStart, int anEnd, boolean doUpdateSelection)
Replaces the current selection with the given string.- Overrides:
replace
in classRMTextEditor
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent anEvent)
Handles mouse pressed on the text editor.- Overrides:
mousePressed
in classRMTextEditor
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent anEvent)
Handles mouse dragged on the text editor.- Overrides:
mouseDragged
in classRMTextEditor
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent anEvent)
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(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:
firePropertyChange
in classRMObject
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent anEvent)
Called when there are changes to text shape.- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
- Overrides:
propertyChange
in classRMTextEditor
-
getUndoer
public RMUndoer getUndoer()
Override to get undoer from text shape.- Overrides:
getUndoer
in classRMTextEditor
-
getUndoSelection
protected java.lang.Object 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
public void moveTableRowColumn(java.awt.event.MouseEvent anEvent)
Move Table Row Column stuff (table row column re-ordering).
-
-