waba.ui
Class Keyboard
java.lang.Object
|
+--waba.ui.Control
|
+--waba.ui.Container
|
+--waba.ui.Window
|
+--waba.ui.Keyboard
- public class Keyboard
- extends Window
a popup keyboard to be used with the Edit and MultiEdit class.
Yehuda Miron added Hebrew support to this class. To use it, you need to have hebrew support for your palm in the normal way (Piloc from palmgear,
or buy it from kalanit distributer).
Superwaba uses the normal hebrew in the palm, you don't need any special fonts for
using hebrew in the superwaba. if you write an application in superwaba and need the hebrew keyboard there
is a global variable you need to set at the start of your application (once only !)
Keyboard.setLanguage(Keyboard.LANG_HEBREW);
and the popup keyboard will start with hebrew and english characters.
the normal ascii codes for hebrew are used in superwaba (not hacking is needed).
Setting hebrew string in superwaba is done in the normal way:
String s1 = "ωμεν";
Note that you can also extend this multi-language feature to other languages. To do
it, just create one more constant for the language and change the setAuxKeys to change
letters you want.
Fields inherited from class waba.ui.Window |
beepIfOut,
borderStyle,
canDrag,
eraseBackgroundNow,
flicker,
HIDE_STATE,
highResPrepared,
imgCovered,
lastSwappedContainer,
mainSwapContainer,
menubar,
needsPaint,
NO_BORDER,
RECT_BORDER,
ROUND_BORDER,
TAB_BORDER,
TAB_ONLY_BORDER,
title,
titleFont,
topMost,
VK_BOTTOM,
VK_HIDE,
VK_TOP,
zStack |
Fields inherited from class waba.ui.Container |
BORDER_LOWERED,
BORDER_NONE,
BORDER_RAISED,
BORDER_SIMPLE,
children,
lastH,
lastW,
lastX,
lastY,
parentWindow,
tail |
Fields inherited from class waba.ui.Control |
AFTER,
appId,
asContainer,
asWindow,
backColor,
backDis,
BEFORE,
BOTTOM,
CENTER,
enabled,
FILL,
FIT,
fm,
fmH,
focusLess,
font,
foreColor,
foreDis,
height,
LEFT,
parent,
PREFERRED,
RANGE,
RIGHT,
SAME,
TOP,
visible,
width,
x,
x2,
y,
y2 |
Method Summary |
protected void |
loadBehind(boolean release)
Calls super.loadBehind(true) to make sure the image is released |
void |
onEvent(Event event)
Called to process key, pen, control and other posted events. |
protected void |
onPopup()
Placeholder called imediatly before the popup began. the default implementation does nothing. |
protected void |
onUnpop()
Placeholder called imediatly before the unpop began. the default implementation does nothing. |
protected void |
onWindowPaintFinished()
Called after the window has finished a paint. |
protected void |
postUnpop()
Placeholder called after the unpop is done and after the repaint of the other window. the default implementation does nothing. |
static void |
setLanguage(int lang)
Sets the current language of the Keyboard. |
Methods inherited from class waba.ui.Window |
_doPaint,
_doPaint,
_postEvent,
damageRect,
destroyZStack,
dontSaveBehind,
getClientRect,
getFocus,
getOffScreen,
getPreferredHeight,
getPreferredWidth,
getTopMost,
isTopMost,
isVisible,
makeUnmovable,
onClickedOutside,
paintTitle,
popupBlockingModal,
popupMenuBar,
popupModal,
postPopup,
pumpEvents,
saveBehind,
setBorderStyle,
setDoubleBuffer,
setFocus,
setMenuBar,
setStatePosition,
setTitle,
setTitleFont,
swap,
unpop,
validate |
Methods inherited from class waba.ui.Container |
add,
add,
add,
broadcastEvent,
findChild,
getChildren,
onColorsChanged,
onPaint,
onStart,
paintChildren,
remove,
setEnabled |
Methods inherited from class waba.ui.Control |
addTimer,
contains,
createGraphics,
getAbsoluteRect,
getBackColor,
getFont,
getFontMetrics,
getForeColor,
getNext,
getParent,
getParentWindow,
getPos,
getRect,
getSize,
isDisplayed,
isEnabled,
onBoundsChanged,
onFontChanged,
postEvent,
removeTimer,
repaint,
repaintNow,
requestFocus,
setBackColor,
setBackForeColors,
setFocusLess,
setFont,
setForeColor,
setRect,
setRect,
setRect,
setVisible |
px
public static int[] px
py
public static int[] py
ig
public static byte[] ig
KEYBOARD_ON_UNPOP
public static final int KEYBOARD_ON_UNPOP
- Event issued by this keybard on the onUnpop method. The edit must call pushPosState.
KEYBOARD_POST_UNPOP
public static final int KEYBOARD_POST_UNPOP
- Event issued by this keybard on the postUnpop method. The edit must call popPosState.
NUMERIC_PAD
public static final int NUMERIC_PAD
- Used to access the names member.
SYMBOLS_PAD
public static final int SYMBOLS_PAD
- Used to access the names member.
ACCENT_PAD
public static final int ACCENT_PAD
- Used to access the names member.
TEXT_PAD
public static final int TEXT_PAD
- Used to access the names member.
CAPS_PAD
public static final int CAPS_PAD
- Used to access the names member.
SPECIAL_PAD
public static final int SPECIAL_PAD
- Used to access the names member.
LANG_NORMAL
public static final int LANG_NORMAL
- Used in the setLanguage method.
LANG_HEBREW
public static final int LANG_HEBREW
- Used in the setLanguage method.
LANG_GERMAN
public static final int LANG_GERMAN
- Used in the setLanguage method.
LANG_TURKISH
public static final int LANG_TURKISH
- Used in the setLanguage method.
LANG_RUSSIAN_OR_ANOTHER
public static final int LANG_RUSSIAN_OR_ANOTHER
- Used in the setLanguage method.
names
public static String[][] names
Keyboard
public Keyboard()
setLanguage
public static void setLanguage(int lang)
- Sets the current language of the Keyboard. Note that this must be
set before any Keyboard creation
onWindowPaintFinished
protected void onWindowPaintFinished()
- Description copied from class: Control
- Called after the window has finished a paint.
- Overrides:
- onWindowPaintFinished in class Control
onPopup
protected void onPopup()
- Description copied from class: Window
- Placeholder called imediatly before the popup began. the default implementation does nothing.
- Overrides:
- onPopup in class Window
onUnpop
protected void onUnpop()
- Description copied from class: Window
- Placeholder called imediatly before the unpop began. the default implementation does nothing.
- Overrides:
- onUnpop in class Window
postUnpop
protected void postUnpop()
- Description copied from class: Window
- Placeholder called after the unpop is done and after the repaint of the other window. the default implementation does nothing.
- Overrides:
- postUnpop in class Window
onEvent
public void onEvent(Event event)
- Description copied from class: Control
- Called to process key, pen, control and other posted events.
- Overrides:
- onEvent in class Control
- Tags copied from class: Control
- Parameters:
event
- the event to process- See Also:
Event
,
KeyEvent
,
PenEvent
loadBehind
protected void loadBehind(boolean release)
- Calls super.loadBehind(true) to make sure the image is released
- Overrides:
- loadBehind in class Window
- Tags copied from class: Window
- Parameters:
release
- if true, the memory used is released