Package kiyut.sketsa.canvas.text
Class DefaultTextEditor
- java.lang.Object
-
- kiyut.sketsa.canvas.text.TextEditor
-
- kiyut.sketsa.canvas.text.DefaultTextEditor
-
public class DefaultTextEditor extends TextEditor
Canvas Text Editor. It is used to handle SVG Text related element.- Author:
- Kiyut
-
-
Constructor Summary
Constructors Constructor Description DefaultTextEditor()Creates a new instance of DefaultTextEditor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidkeyPressed(KeyEvent evt)Invoked when a key has been pressed.voidkeyReleased(KeyEvent evt)Invoked when a key has been released.voidkeyTyped(KeyEvent evt)Invoked when a key has been typed.voidmouseDragged(MouseEvent evt)Invoked when a mouse button is pressed on a component and then dragged.voidmousePressed(MouseEvent evt)Invoked when a mouse button has been pressed on a component.voidmouseReleased(MouseEvent evt)Invoked when a mouse button has been released on a component.voidstartEdit()voidstopEdit()-
Methods inherited from class kiyut.sketsa.canvas.text.TextEditor
getCaret, getDocument, isEditable, mouseClicked, mouseEntered, mouseExited, mouseMoved, paint, setSVGTextElement, setVectorCanvas
-
-
-
-
Method Detail
-
stopEdit
public void stopEdit()
- Specified by:
stopEditin classTextEditor
-
startEdit
public void startEdit()
- Specified by:
startEditin classTextEditor
-
keyPressed
public void keyPressed(KeyEvent evt)
Description copied from class:TextEditorInvoked when a key has been pressed. See the class description forKeyEventfor a definition of a key pressed event.- Overrides:
keyPressedin classTextEditor- Parameters:
evt- KeyEvent object
-
keyReleased
public void keyReleased(KeyEvent evt)
Description copied from class:TextEditorInvoked when a key has been released. See the class description forKeyEventfor a definition of a key released event.- Overrides:
keyReleasedin classTextEditor- Parameters:
evt- KeyEvent object
-
keyTyped
public void keyTyped(KeyEvent evt)
Description copied from class:TextEditorInvoked when a key has been typed. See the class description forKeyEventfor a definition of a key typed event.- Overrides:
keyTypedin classTextEditor- Parameters:
evt- KeyEvent object
-
mouseDragged
public void mouseDragged(MouseEvent evt)
Description copied from class:TextEditorInvoked when a mouse button is pressed on a component and then dragged.MOUSE_DRAGGEDevents will continue to be delivered to the component where the drag originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).Due to platform-dependent Dra and Drop implementations,
MOUSE_DRAGGEDevents may not be delivered during a native Drag&Drop operation.- Overrides:
mouseDraggedin classTextEditor- Parameters:
evt- MouseEvent object
-
mousePressed
public void mousePressed(MouseEvent evt)
Description copied from class:TextEditorInvoked when a mouse button has been pressed on a component.- Overrides:
mousePressedin classTextEditor- Parameters:
evt- MouseEvent object
-
mouseReleased
public void mouseReleased(MouseEvent evt)
Description copied from class:TextEditorInvoked when a mouse button has been released on a component.- Overrides:
mouseReleasedin classTextEditor- Parameters:
evt- MouseEvent object
-
-