Class TextEditComponent
java.lang.Object
eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape
eu.svjatoslav.sixth.e3d.gui.GuiComponent
eu.svjatoslav.sixth.e3d.gui.textEditorComponent.TextEditComponent
- All Implemented Interfaces:
KeyboardInputHandler
,MouseInteractionController
,ClipboardOwner
-
Field Summary
Modifier and TypeFieldDescriptionint
int
boolean
Selection start and end pointers.Fields inherited from class eu.svjatoslav.sixth.e3d.gui.GuiComponent
viewPanel
Fields inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
mouseInteractionController
-
Constructor Summary
ConstructorDescriptionTextEditComponent
(Transform transform, ViewPanel viewPanel, Point2D sizeInWorldCoordinates, LookAndFeel lookAndFeel) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clear text selection.void
Copies selected text to the clipboard.void
void
void
Ensures thatselectionStart
is smaller thanselectionEnd
.void
goToLine
(int Line) void
insertText
(String txt) boolean
keyPressed
(KeyEvent event, ViewPanel viewPanel) Parse key presses.void
lostOwnership
(Clipboard aClipboard, Transferable aContents) Empty implementation of the ClipboardOwner interface.void
void
void
void
void
repaintRow
(int rowNumber) void
scroll
(int charactersToScroll, int linesToScroll) Scroll full page to given amount of lines or charancters.void
setClipboardContents
(String contents) Place string into system clipboard so that it can be pasted into other applications.void
Methods inherited from class eu.svjatoslav.sixth.e3d.gui.GuiComponent
focusLost, focusReceived, getBorders, getDepth, getHeight, getWidth, hideBorder, keyReleased, mouseClicked, mouseEntered, mouseExited
Methods inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape
addShape, addShape, beforeTransformHook, getGroup, getLocation, getOriginalSubShapes, getRelativityTracker, hideGroup, removeGroup, setColor, setGroupForUngrouped, setMouseInteractionController, setTransform, showGroup, transform
-
Field Details
-
scrolledCharacters
public int scrolledCharacters -
scrolledLines
public int scrolledLines -
selecting
public boolean selecting -
selectionStart
Selection start and end pointers. -
selectionEnd
-
cursorLocation
-
-
Constructor Details
-
TextEditComponent
public TextEditComponent(Transform transform, ViewPanel viewPanel, Point2D sizeInWorldCoordinates, LookAndFeel lookAndFeel)
-
-
Method Details
-
clearSelection
public void clearSelection()Clear text selection. -
copyToClipboard
public void copyToClipboard()Copies selected text to the clipboard. -
cutToClipboard
public void cutToClipboard() -
deleteSelection
public void deleteSelection() -
ensureSelectionOrder
public void ensureSelectionOrder()Ensures thatselectionStart
is smaller thanselectionEnd
. -
getClipboardContents
-
setClipboardContents
Place string into system clipboard so that it can be pasted into other applications. -
goToLine
public void goToLine(int Line) -
insertText
-
keyPressed
Parse key presses.- Specified by:
keyPressed
in interfaceKeyboardInputHandler
- Overrides:
keyPressed
in classGuiComponent
- Returns:
true
if view needs to be re-rendered.
-
lostOwnership
Empty implementation of the ClipboardOwner interface.- Specified by:
lostOwnership
in interfaceClipboardOwner
-
markRowDirty
public void markRowDirty() -
pasteFromClipboard
public void pasteFromClipboard() -
processDel
public void processDel() -
repaintPage
public void repaintPage() -
repaintRow
public void repaintRow(int rowNumber) -
scroll
public void scroll(int charactersToScroll, int linesToScroll) Scroll full page to given amount of lines or charancters. -
setText
-