synergynetframework.appsystem.contentsystem.items
Class Keyboard

java.lang.Object
  extended by synergynetframework.appsystem.contentsystem.items.ContentItem
      extended by synergynetframework.appsystem.contentsystem.items.OrthoContentItem
          extended by synergynetframework.appsystem.contentsystem.items.QuadContentItem
              extended by synergynetframework.appsystem.contentsystem.items.Keyboard
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<OrthoContentItem>, IContentItemImplementation, IKeyboardImplementation, IOrthoContentItemImplementation, IQuadContentItemImplementation, BringToTopListener, ItemListener, OrthoControlPointRotateTranslateScaleListener, OrthoFlickListener, OrthoScaleMotionListener, OrthoSnapListener, OrthoSpinListener

public class Keyboard
extends QuadContentItem
implements IKeyboardImplementation

The Class Keyboard.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class synergynetframework.appsystem.contentsystem.items.OrthoContentItem
removable
 
Fields inherited from class synergynetframework.appsystem.contentsystem.items.ContentItem
name
 
Constructor Summary
Keyboard(ContentSystem contentSystem, java.lang.String name)
          Instantiates a new keyboard.
 
Method Summary
 void addKeyListener(MTKeyListener l)
          Adds the key listener.
 void fireKeyPressed(java.awt.event.KeyEvent evt)
          Fire key pressed.
 void fireKeyReleased(java.awt.event.KeyEvent evt)
          Fire key released.
 java.util.ArrayList<Key> getCurrentKeysPressed()
          Gets the current keys pressed.
 java.net.URL getKeyboardImageResource()
          Gets the keyboard image resource.
 java.util.List<Key> getKeyDefinitions()
          Gets the key definitions.
 float getPixelsPerUnit()
          Gets the pixels per unit.
 boolean isKeyPressed(int vk)
          Checks if is key pressed.
 void setKeyboardImageResource(java.net.URL keyboardImageResource)
          Sets the keyboard image resource.
 void setKeyDefinitions(java.util.List<Key> keyDefinitions)
          Sets the key definitions.
 void setPixelsPerUnit(float pixelsPerUnit)
          Sets the pixels per unit.
 void setRotateTranslateScalable(boolean isEnabled, boolean overRide)
          Sets the rotate translate scalable.
 
Methods inherited from class synergynetframework.appsystem.contentsystem.items.QuadContentItem
addSizeChangeListener, clone, getHeight, getWidth, isAutoFitSize, removeSizeChangeListener, setAutoFit, setAutoFitSize, setHeight, setWidth
 
Methods inherited from class synergynetframework.appsystem.contentsystem.items.OrthoContentItem
addBringToTopListener, addFlickListener, addItemListener, addOrthoControlPointRotateTranslateScaleListener, addScreenCursorListener, addSnapListener, allowMoreThanTwoToRotateAndScale, allowSingleTouchFreeMove, allowSnapToOccupiedLocation, bindImplementationOjbect, centerItem, compareTo, cursorChanged, cursorClicked, cursorDoubleClicked, cursorLongHeld, cursorPressed, cursorReleased, cursorRightClicked, enableMultiTouchElementListeners, fireCursorChanged, fireCursorClicked, fireCursorDoubleClicked, fireCursorLongHeld, fireCursorPressed, fireCursorReleased, fireCursorRightClicked, fireScreenCursorChanged, fireScreenCursorClicked, fireScreenCursorPressed, fireScreenCursorReleased, flick, getBringToTopListeners, getFlickDeceleration, getFlickListeners, getItemListeners, getLocation, getMaxScale, getMinScale, getOrder, getOrthoControlPointRotateTranslateScaleListeners, getOrthoSnapListeners, getParent, getScaleMotionDeceleration, getScaleMotionListeners, getSpinListeners, isBringToTopEnabled, isFlickable, isRotateTranslateScaleEnabled, isSingleTouchRotateTranslate, isSnapEnabled, itemBringToToped, itemFlicked, itemRotated, itemScaled, itemScaleMotioned, itemSnapped, itemSpun, itemTranslated, makeFlickable, makeUnflickable, placeRandom, removeBringToTopListeners, removeBringToTopListeners, removeFlickListeners, removeFlickListeners, removeItemListerner, removeItemListerners, removeOrthoControlPointRotateTranslateScaleListeners, removeOrthoControlPointRotateTranslateScaleListeners, removeScreenCursorListeners, removeSnapListeners, removeSnapListeners, reset, rotateRandom, setAsBottomObject, setAsTopObject, setAsTopObjectAndBroadCastEvent, setBringToTopable, setBringToTopListeners, setFixLocations, setFlickListeners, setItemListeners, setLocation, setLocation, setName, setOrder, setOrthoControlPointRotateTranslateScaleListeners, setOrthoSnapListeners, setRightClickDistance, setRotateTranslateScalable, setRotateTranslateScalable, setScaleLimit, setScaleMotionListeners, setSingleTouchRotateTranslate, setSnapable, setSpinListeners, setTolerance, setZRotateLimit, turnOffEventDispatcher
 
Methods inherited from class synergynetframework.appsystem.contentsystem.items.ContentItem
addMultitouchListener, canManipulate, contains, generateUniqueName, getAngle, getBackGround, getBackgroundColour, getBorder, getBorderColour, getBorderSize, getContentSystem, getId, getImplementationObject, getLocalLocation, getName, getNote, getResource, getScale, hasCollision, init, initImplementationObjet, isBoundaryEnabled, isVisible, setAngle, setBackGround, setBackgroundColour, setBorder, setBorderColour, setBorderSize, setBoundaryEnabled, setContentSystem, setId, setLocalLocation, setLocalLocation, setLocalLocation, setManipulate, setNote, setResource, setScale, setScale, setVisible, setVisible, update, update
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface synergynetframework.appsystem.contentsystem.items.implementation.interfaces.IQuadContentItemImplementation
setAutoFitSize, setHeight, setWidth
 
Methods inherited from interface synergynetframework.appsystem.contentsystem.items.implementation.interfaces.IOrthoContentItemImplementation
addBringToTopListener, addFlickListener, addItemListener, addOrthoControlPointRotateTranslateScaleListener, addScreenCursorListener, addSnapListener, allowMoreThanTwoToRotateAndScale, allowSingleTouchFreeMove, allowSnapToOccupiedLocation, centerItem, flick, getMaxScale, getMinScale, isFlickable, makeFlickable, makeUnflickable, placeRandom, removeBringToTopListeners, removeFlickListeners, removeItemListerner, removeOrthoControlPointRotateTranslateScaleListeners, removeScreenCursorListeners, removeSnapListeners, reset, rotateRandom, setAsBottomObject, setAsTopObject, setAsTopObjectAndBroadCastEvent, setBringToTopable, setFixLocations, setOrder, setRightClickDistance, setRotateTranslateScalable, setRotateTranslateScalable, setScaleLimit, setSingleTouchRotateTranslate, setSnapable, setTolerance, setZRotateLimit, turnOffEventDispatcher
 
Methods inherited from interface synergynetframework.appsystem.contentsystem.items.implementation.interfaces.IContentItemImplementation
addMultitouchListener, contains, getImplementationObject, hasCollision, init, setAngle, setBackGround, setBorder, setBoundaryEnabled, setId, setLocalLocation, setLocation, setManipulate, setName, setScale, setScale, setVisible, setVisible, update, update
 

Constructor Detail

Keyboard

public Keyboard(ContentSystem contentSystem,
                java.lang.String name)
Instantiates a new keyboard.

Parameters:
contentSystem - the content system
name - the name
Method Detail

addKeyListener

public void addKeyListener(MTKeyListener l)
Adds the key listener.

Parameters:
l - the l

fireKeyPressed

public void fireKeyPressed(java.awt.event.KeyEvent evt)
Fire key pressed.

Parameters:
evt - the evt

fireKeyReleased

public void fireKeyReleased(java.awt.event.KeyEvent evt)
Fire key released.

Parameters:
evt - the evt

getCurrentKeysPressed

public java.util.ArrayList<Key> getCurrentKeysPressed()
Description copied from interface: IKeyboardImplementation
Gets the current keys pressed.

Specified by:
getCurrentKeysPressed in interface IKeyboardImplementation
Returns:
the current keys pressed

getKeyboardImageResource

public java.net.URL getKeyboardImageResource()
Gets the keyboard image resource.

Returns:
the keyboard image resource

getKeyDefinitions

public java.util.List<Key> getKeyDefinitions()
Gets the key definitions.

Returns:
the key definitions

getPixelsPerUnit

public float getPixelsPerUnit()
Gets the pixels per unit.

Returns:
the pixels per unit

isKeyPressed

public boolean isKeyPressed(int vk)
Description copied from interface: IKeyboardImplementation
Checks if is key pressed.

Specified by:
isKeyPressed in interface IKeyboardImplementation
Parameters:
vk - the vk
Returns:
true, if is key pressed

setKeyboardImageResource

public void setKeyboardImageResource(java.net.URL keyboardImageResource)
Description copied from interface: IKeyboardImplementation
Sets the keyboard image resource.

Specified by:
setKeyboardImageResource in interface IKeyboardImplementation
Parameters:
keyboardImageResource - the new keyboard image resource

setKeyDefinitions

public void setKeyDefinitions(java.util.List<Key> keyDefinitions)
Description copied from interface: IKeyboardImplementation
Sets the key definitions.

Specified by:
setKeyDefinitions in interface IKeyboardImplementation
Parameters:
keyDefinitions - the new key definitions

setPixelsPerUnit

public void setPixelsPerUnit(float pixelsPerUnit)
Description copied from interface: IKeyboardImplementation
Sets the pixels per unit.

Specified by:
setPixelsPerUnit in interface IKeyboardImplementation
Parameters:
pixelsPerUnit - the new pixels per unit

setRotateTranslateScalable

public void setRotateTranslateScalable(boolean isEnabled,
                                       boolean overRide)
Description copied from interface: IKeyboardImplementation
Sets the rotate translate scalable.

Specified by:
setRotateTranslateScalable in interface IKeyboardImplementation
Parameters:
isEnabled - the is enabled
overRide - the over ride