Package org.exbin.bined.swing
Interface CodeAreaCommandHandler
-
- All Known Implementing Classes:
DefaultCodeAreaCommandHandler
@ParametersAreNonnullByDefault public interface CodeAreaCommandHandler
Interface for code area data manipulation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
CodeAreaCommandHandler.CodeAreaCommandHandlerFactory
static class
CodeAreaCommandHandler.ScrollbarOrientation
static class
CodeAreaCommandHandler.SelectingMode
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
backSpacePressed()
Backspace key was pressed.boolean
canPaste()
Returns true if paste action is possible.void
clearSelection()
Clears data selection.void
copy()
Copies selection to clipboard.void
copyAsCode()
Copies selection to clipboard as code string.void
cut()
Cuts selection to clipboard.void
delete()
Deletes selection.void
deletePressed()
Delete key was pressed.void
enterPressed()
Enter key was pressed.boolean
checkEditAllowed()
Checks whether edit is allowed.void
keyPressed(java.awt.event.KeyEvent keyEvent)
Keyboard key was pressed.void
keyTyped(java.awt.event.KeyEvent keyEvent)
Keyboard key was typed.void
moveCaret(int positionX, int positionY, CodeAreaCommandHandler.SelectingMode selecting)
Moves caret with mouse event.void
paste()
Pastes content of clipboard to cursor area.void
pasteFromCode()
Pastes content of clipboard to cursor area analyzing string code.void
selectAll()
Expands selection to all data.void
undoSequenceBreak()
Notifies command handler about end of sequence of append-able commands.void
wheelScroll(int scrollSize, CodeAreaCommandHandler.ScrollbarOrientation orientation)
Performs scrolling.
-
-
-
Method Detail
-
undoSequenceBreak
void undoSequenceBreak()
Notifies command handler about end of sequence of append-able commands.
-
keyPressed
void keyPressed(java.awt.event.KeyEvent keyEvent)
Keyboard key was pressed.- Parameters:
keyEvent
- key event
-
keyTyped
void keyTyped(java.awt.event.KeyEvent keyEvent)
Keyboard key was typed.- Parameters:
keyEvent
- key event
-
enterPressed
void enterPressed()
Enter key was pressed.
-
backSpacePressed
void backSpacePressed()
Backspace key was pressed.
-
deletePressed
void deletePressed()
Delete key was pressed.
-
delete
void delete()
Deletes selection.
-
copy
void copy()
Copies selection to clipboard.
-
copyAsCode
void copyAsCode()
Copies selection to clipboard as code string.
-
cut
void cut()
Cuts selection to clipboard.
-
paste
void paste()
Pastes content of clipboard to cursor area.
-
selectAll
void selectAll()
Expands selection to all data.
-
clearSelection
void clearSelection()
Clears data selection.
-
pasteFromCode
void pasteFromCode()
Pastes content of clipboard to cursor area analyzing string code.
-
canPaste
boolean canPaste()
Returns true if paste action is possible.- Returns:
- true if paste is possible
-
moveCaret
void moveCaret(int positionX, int positionY, CodeAreaCommandHandler.SelectingMode selecting)
Moves caret with mouse event.- Parameters:
positionX
- relative position XpositionY
- relative position Yselecting
- selection selecting
-
wheelScroll
void wheelScroll(int scrollSize, CodeAreaCommandHandler.ScrollbarOrientation orientation)
Performs scrolling.- Parameters:
scrollSize
- number of scroll units (positive or negative)orientation
- scrollbar orientation
-
checkEditAllowed
boolean checkEditAllowed()
Checks whether edit is allowed.- Returns:
- true if allowed
-
-