|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--guk.im.KeyboardMap
A virtual keyboard map. It uses its own thread do udate the display.
Inner Class Summary | |
class |
KeyboardMap.KeyGUI
|
Field Summary | |
(package private) boolean |
alt
|
(package private) boolean |
capslock
|
(package private) JPanel |
contentPane
The content pane that holds all the KeyGUIs. |
(package private) boolean |
ctrl
|
(package private) Map |
GUIforString
maps from String(the English lowercase representation of the key) to KeyGUI |
(package private) LocaleHandler |
handler
the active locale handler |
(package private) List |
highlightedKeys
The keys curently highlighted |
(package private) GateIM |
im
The input method. |
(package private) List |
jobs
The job list. |
(package private) Map |
labelForKey
Maps from Key to JLabel for the keys that have keyCap defined . |
(package private) Thread |
myThread
The thread that does the updating. |
(package private) LocaleHandler |
newHandler
The new active locale handler. |
(package private) State |
newState
The current state of the new current locale handler. |
(package private) static Component |
placeHolder
Empty component used for the key that are not bound to a Unicode character. |
(package private) boolean |
shift
|
(package private) State |
state
The current state of the current locale handler. |
(package private) Window |
window
The window used for displaying the keyboard map |
Constructor Summary | |
KeyboardMap(GateIM im,
LocaleHandler handler,
State state)
Builds the keyboard map. |
Method Summary | |
void |
addJob(Object job)
Adds a job to the job list of the thread. |
protected void |
fixShape()
|
protected KeyboardMap.KeyGUI |
guiForKey(Key key)
Gets the gui that corresponds to a Key object. |
void |
run()
The run method for the thread responsible for updating the display. |
void |
setAlt(boolean alt)
Is the Alt key pressed? |
void |
setCtrl(boolean ctrl)
Is the Ctrl key pressed? |
void |
setShift(boolean shift)
Is the Shift key pressed? |
protected void |
update()
Does th actual update. |
void |
update(LocaleHandler newHandler,
State newState)
Updates the keyboard map for a new Locale or a new state of the current locale handler. |
protected void |
updateLabels()
Updates the virtual keyboard to reflect the current state. |
Methods inherited from class java.lang.Object |
|
Field Detail |
LocaleHandler handler
LocaleHandler newHandler
State state
State newState
newHandler
Window window
JPanel contentPane
KeyboardMap.KeyGUI
List highlightedKeys
boolean shift
boolean ctrl
boolean alt
boolean capslock
Map GUIforString
Map labelForKey
GateIM im
Thread myThread
List jobs
static Component placeHolder
Constructor Detail |
public KeyboardMap(GateIM im, LocaleHandler handler, State state)
im
- the input methodhandler
- the active Locale handlerstate
- the state of the handler.Method Detail |
public void run()
run
in interface Runnable
public void addJob(Object job)
String
or an InputEvent
The string can be one of
job
- public void update(LocaleHandler newHandler, State newState)
newHandler
- newState
- protected void update()
protected void updateLabels()
protected void fixShape()
protected KeyboardMap.KeyGUI guiForKey(Key key)
key
- public void setShift(boolean shift)
shift
- public void setAlt(boolean alt)
alt
- public void setCtrl(boolean ctrl)
ctrl
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |