|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.diamondspin.DSKeyboardPanel
public class DSKeyboardPanel
DSKeyboardPanel is a JPanel with buttons in its layout (as a physical keyboard). It can be included
in DSFrame to replace the lack of keyboard on DiamondTouch.
Copyright 2002-2009 DiamondSpin project. All Rights Reserved. Permission to use, copy, modify and distribute this software and its documentation for educational, research and non-profit purposes, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and the following three paragraphs appear in all copies. To request Permission to incorporate this software into commercial products contact one of the authors of the project.
IN NO EVENT SHALL THE AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE AUTHORS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. THE AUTHORS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE AUTHORS HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
Nested Class Summary | |
---|---|
protected class |
DSKeyboardPanel.KeybdMouseAdapter
|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static int |
AZERTY
|
protected Color |
BackgroundColor
|
protected JButton[] |
buttons
|
protected static Clip |
click
|
protected int |
IDOwner
|
protected int |
keyboardType
|
protected Color |
KeyColor
|
protected JPanel[] |
lines
|
protected DSKeyboardPanel.KeybdMouseAdapter |
mouseAdapt
|
static int |
QWERTY
|
protected Color |
TextColor
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
DSKeyboardPanel()
Constructor |
|
DSKeyboardPanel(int keyboardType)
Constructor |
|
DSKeyboardPanel(int num,
int denom)
|
|
DSKeyboardPanel(int num,
int denom,
int keyboardType)
|
Method Summary | |
---|---|
void |
addKeyListener(KeyListener KeyListener_Arg)
register a key listener who want to listen this virtual keyboard key events |
protected void |
fireKeyPressed(int KeyCode_Arg,
char KeyChar_Arg)
|
void |
fireKeyPressed(String butName)
|
protected void |
fireKeyReleased(int KeyCode_Arg,
char KeyChar_Arg)
|
void |
fireKeyReleased(String butName)
|
protected void |
fireKeyTyped(int KeyCode_Arg,
char KeyChar_Arg)
|
void |
fireKeyTyped(String butName)
|
Color |
getBackgroundColor()
|
int |
getIDOwner()
|
Color |
getKeyColor()
|
String |
getLetters(int butNum)
Dans l'ordre : lower-case, upper-case, KeyCode (on se restreint donc aux keycodes sur un seul byte, pas de keycodes exotiques ou étendus ici (touche 'cut', 'stop',... |
Dimension |
getMinimumSize()
return the Minimum Size for this keyboard. |
Dimension |
getPreferredSize()
return the Preferred Size for this keyboard. |
Color |
getTextColor()
|
void |
initComponents()
init the sub-components. |
static void |
playClick()
|
static void |
prepareClick()
|
void |
removeKeyListener(KeyListener KeyListener_Arg)
unregister a key listener who want to listen this virtual keyboard key events |
void |
setBackgroundColor(Color BackgroundColor)
|
void |
setIDOwner(int Id)
|
void |
setKeyColor(Color KeyColor)
|
void |
setTextColor(Color TextColor)
|
void |
updateKeyboard()
udpade the keyboard keys according to the shift (caps lock) |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected JButton[] buttons
protected JPanel[] lines
protected Color KeyColor
protected Color TextColor
protected Color BackgroundColor
public static final int QWERTY
public static final int AZERTY
protected int keyboardType
protected DSKeyboardPanel.KeybdMouseAdapter mouseAdapt
protected int IDOwner
protected static Clip click
Constructor Detail |
---|
public DSKeyboardPanel()
public DSKeyboardPanel(int keyboardType)
public DSKeyboardPanel(int num, int denom)
public DSKeyboardPanel(int num, int denom, int keyboardType)
Method Detail |
---|
public void addKeyListener(KeyListener KeyListener_Arg)
addKeyListener
in class Component
public void removeKeyListener(KeyListener KeyListener_Arg)
removeKeyListener
in class Component
protected void fireKeyPressed(int KeyCode_Arg, char KeyChar_Arg)
protected void fireKeyTyped(int KeyCode_Arg, char KeyChar_Arg)
protected void fireKeyReleased(int KeyCode_Arg, char KeyChar_Arg)
public String getLetters(int butNum)
public void updateKeyboard()
public void fireKeyPressed(String butName)
public void fireKeyTyped(String butName)
public void fireKeyReleased(String butName)
public Dimension getPreferredSize()
getPreferredSize
in class JComponent
public Dimension getMinimumSize()
getMinimumSize
in class JComponent
public final void initComponents()
public void setIDOwner(int Id)
public int getIDOwner()
public static void prepareClick()
public static void playClick()
public Color getKeyColor()
public void setKeyColor(Color KeyColor)
public Color getTextColor()
public void setTextColor(Color TextColor)
public Color getBackgroundColor()
public void setBackgroundColor(Color BackgroundColor)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |