public class KeyWriter
extends java.lang.Object
implements java.awt.event.KeyListener
Modifier and Type | Field and Description |
---|---|
(package private) TextBlock |
caretBlock |
(package private) int |
caretPos |
(package private) int |
keyCode |
(package private) TextBoard |
textBoard |
Modifier and Type | Method and Description |
---|---|
private void |
addNewPuncBlockAfter(TextBlock bpr,
char c) |
private void |
addNewWordBlockAfter(TextBlock bpr,
char c) |
void |
caretDown() |
void |
caretLeft() |
void |
caretRight() |
void |
caretUp() |
void |
deletBackwards() |
TextBlock |
getCaretBlock() |
int |
getCaretPos() |
boolean |
hasCaret() |
void |
insertCharacter(char c) |
private void |
insertLetter(char c) |
private void |
insertLetterAfterNonWord(TextBlock tb,
char c) |
private void |
insertLetterBeforeNonWord(TextBlock tb,
char c) |
private void |
insertLetterInNonWord(TextBlock tb,
char c,
int cp) |
private void |
insertLetterInWord(TextBlock tb,
char c,
int cp) |
private void |
insertPuncAfterNonPunc(TextBlock tb,
char c) |
private void |
insertPuncBeforeNonPunc(TextBlock tb,
char c) |
private void |
insertPuncInNonPunc(TextBlock tb,
char c,
int cp) |
private void |
insertPuncInPunc(TextBlock tb,
char c,
int cp) |
private void |
insertPunctuation(char c) |
void |
keyPressed(java.awt.event.KeyEvent e) |
void |
keyReleased(java.awt.event.KeyEvent e) |
void |
keyTyped(java.awt.event.KeyEvent e) |
private void |
newline() |
void |
setCaretBlock(TextBlock tb) |
void |
setCaretPos(int ip) |
TextBoard textBoard
int keyCode
TextBlock caretBlock
int caretPos
public KeyWriter(TextBoard tb)
public TextBlock getCaretBlock()
public int getCaretPos()
public void setCaretBlock(TextBlock tb)
public void setCaretPos(int ip)
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener
public void caretLeft()
public void caretRight()
public void caretUp()
public void caretDown()
public void insertCharacter(char c)
private void insertLetter(char c)
private void insertLetterInWord(TextBlock tb, char c, int cp)
private void insertLetterInNonWord(TextBlock tb, char c, int cp)
private void insertLetterBeforeNonWord(TextBlock tb, char c)
private void addNewWordBlockAfter(TextBlock bpr, char c)
private void insertLetterAfterNonWord(TextBlock tb, char c)
private void insertPuncInPunc(TextBlock tb, char c, int cp)
private void insertPunctuation(char c)
private void insertPuncInNonPunc(TextBlock tb, char c, int cp)
private void insertPuncBeforeNonPunc(TextBlock tb, char c)
private void addNewPuncBlockAfter(TextBlock bpr, char c)
private void insertPuncAfterNonPunc(TextBlock tb, char c)
public void deletBackwards()
private void newline()
public boolean hasCaret()
Copyright © 2013. All Rights Reserved.