public class Calculator extends java.lang.Object implements IMultiTouchKeyboardListener
Constructor and Description |
---|
Calculator(IContainer parent,
IStage stage)
Instantiates a new calculator.
|
Modifier and Type | Method and Description |
---|---|
void |
addCalculatorEventListener(ICalculatorEventListener listener)
Adds the calculator event listener.
|
void |
buildAndAttach()
Builds the and attach.
|
IItem |
getDisplayItem()
Gets the display item.
|
IItem |
getDragAndDropTarget()
Gets the drag and drop target.
|
java.lang.String |
getOwner()
Gets the owner.
|
float |
getRotation()
Gets the rotation.
|
boolean |
isVisible()
Checks if is visible.
|
void |
keyPressed(KeyboardKey k,
boolean shiftDown,
boolean altDown,
boolean ctlDown)
Key pressed.
|
void |
keyReleased(KeyboardKey k,
boolean shiftDown,
boolean altDown,
boolean ctlDown)
Key released.
|
void |
remove()
Removes the.
|
void |
setDisplayStyle(IValidationChecker.ValidationResult result)
Sets the display style.
|
void |
setKeyVisible(java.lang.String keyStringRepresentation,
boolean state)
Sets the key visible.
|
void |
setOwner(java.lang.String owner)
Sets the owner.
|
void |
setRelativeLocation(float x,
float y)
Sets the relative location.
|
void |
setTextForCalculatorDisplay(java.lang.String txt)
Sets the text for calculator display.
|
void |
setVisibility(java.lang.Boolean visible)
Sets the visibility.
|
public Calculator(IContainer parent, IStage stage)
parent
- the parentstage
- the stagepublic void addCalculatorEventListener(ICalculatorEventListener listener)
listener
- the listenerpublic void buildAndAttach() throws ContentTypeNotBoundException
ContentTypeNotBoundException
- the content type not bound exceptionpublic IItem getDisplayItem()
public IItem getDragAndDropTarget()
public java.lang.String getOwner()
public float getRotation()
public boolean isVisible()
public void keyPressed(KeyboardKey k, boolean shiftDown, boolean altDown, boolean ctlDown)
IMultiTouchKeyboardListener
keyPressed
in interface IMultiTouchKeyboardListener
k
- the kshiftDown
- the shift downaltDown
- the alt downctlDown
- the ctl downpublic void keyReleased(KeyboardKey k, boolean shiftDown, boolean altDown, boolean ctlDown)
IMultiTouchKeyboardListener
keyReleased
in interface IMultiTouchKeyboardListener
k
- the kshiftDown
- the shift downaltDown
- the alt downctlDown
- the ctl downpublic void remove()
public void setDisplayStyle(IValidationChecker.ValidationResult result)
result
- the new display stylepublic void setKeyVisible(java.lang.String keyStringRepresentation, boolean state)
keyStringRepresentation
- the key string representationstate
- the statepublic void setOwner(java.lang.String owner)
owner
- the new ownerpublic void setRelativeLocation(float x, float y)
x
- the xy
- the ypublic void setTextForCalculatorDisplay(java.lang.String txt)
txt
- the new text for calculator displaypublic void setVisibility(java.lang.Boolean visible)
visible
- the new visibility