org.kde.koala
Class KKeyNative

java.lang.Object
  extended by org.kde.koala.KKeyNative
All Implemented Interfaces:
org.kde.qt.QtSupport

public class KKeyNative
extends java.lang.Object
implements org.kde.qt.QtSupport

Representation of a key in the format native of the windowing system (eg. X11).

See Also:
KKey

Constructor Summary
  KKeyNative()
          Creates a new null KKey.
protected KKeyNative(java.lang.Class dummy)
           
  KKeyNative(int code, int mod, int sym)
           
  KKeyNative(KKey key)
          Creates a new native key for the given KKey code.
 
Method Summary
 void clear()
          Clears the key.
 int code()
          The native keycode of the key.
 void dispose()
          Delete the wrapped C++ instance ahead of finalize()
protected  void finalize()
          Deletes the wrapped C++ instance
 boolean init(KKey key)
          Creates a new native key for the given KKey code.
 boolean isDisposed()
          Has the wrapped C++ instance been deleted?
 boolean isNull()
          Returns true if the key is null (after clear() or empty constructor).
 KKey key()
          Returns the KKey representation of this key.
static boolean keyboardHasWinKey()
          Checks whether the keyboard has a Win key.
 int keyCodeQt()
          Returns the qt key code.
 int mod()
          The native modifier flags of the key.
static KKeyNative nil()
          Returns a null key.
 int sym()
          The native symbol (KeySym) of the key.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KKeyNative

protected KKeyNative(java.lang.Class dummy)

KKeyNative

public KKeyNative()
Creates a new null KKey.

See Also:
clear(), isNull(), #null

KKeyNative

public KKeyNative(KKey key)
Creates a new native key for the given KKey code.

Parameters:
key - the KKey that contains the generic key

KKeyNative

public KKeyNative(int code,
                  int mod,
                  int sym)
Method Detail

clear

public void clear()
Clears the key. The key is null after calling this function.

See Also:
isNull()

init

public boolean init(KKey key)
Creates a new native key for the given KKey code.

Parameters:
key - the KKey that contains the generic key
Returns:
true if successful, false otherwise

keyCodeQt

public int keyCodeQt()
Returns the qt key code.

Returns:
the qt key code or 0 if there is no key set.
See Also:
org.kde.qt.Qt#Key

key

public KKey key()
Returns the KKey representation of this key.

Returns:
the KKey representation

code

public int code()
The native keycode of the key.

Returns:
the native keycode

mod

public int mod()
The native modifier flags of the key.

Returns:
the native modifier flags

sym

public int sym()
The native symbol (KeySym) of the key.

Returns:
the native symbol (KeySym)

isNull

public boolean isNull()
Returns true if the key is null (after clear() or empty constructor).

Returns:
true if the key is null
See Also:
clear(), #null

nil

public static KKeyNative nil()
Returns a null key.

Returns:
the null key
See Also:
isNull(), clear()

keyboardHasWinKey

public static boolean keyboardHasWinKey()
Checks whether the keyboard has a Win key.

Returns:
true if the keyboard has a Win key

finalize

protected void finalize()
                 throws java.lang.InternalError
Deletes the wrapped C++ instance

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.InternalError

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()


isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?