|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IUserKey
Interface for a user key.
A user key can be created by adding it to a IUserKeyBar . It can be set up with different looks and custom
behaviors.
The display area for a user key is set up in a 3x3 grid. All 9 spaces can be filled with UserKeyLEDElements or UserKeyTextElements.
By setting up a IUserKeyListener, the programmer can listen for different UserKeyEvents
and define custom reactions for them.
| Method Summary | |
|---|---|
void |
addKeyListener(IUserKeyListener listener)
Adds the specified key listener to the user key. |
String |
getCriticalText()
Gets the confirmation text of a critical user key. |
UserKeyElement |
getElement(com.kuka.roboticsAPI.uiModel.userKeys.UserKeyAlignment position)
Gets the user key element at the specified position. |
int |
getSlot()
Gets the index of the user key slot on the user key bar. |
boolean |
isCritical()
Indicates whether a user key is critical or not. |
boolean |
isDoubleKey()
Indicates whether a user key is a double user key. |
boolean |
isEnabled()
Indicates whether a user key is enabled or not. |
UserKeyElement |
removeElement(com.kuka.roboticsAPI.uiModel.userKeys.UserKeyAlignment position)
Removes the user key element at the specified position. |
void |
removeKeyListener(IUserKeyListener listener)
Removes the specified listener from the user key. |
void |
setCriticalText(String warningText)
Sets the confirmation text for and thereby defines this user key as critical. |
void |
setElement(UserKeyElement... element)
Sets a user key element to the user key. |
void |
setEnabled(boolean isEnabled)
Sets a user key to enabled or disabled. |
void |
setLED(com.kuka.roboticsAPI.uiModel.userKeys.UserKeyAlignment position,
com.kuka.roboticsAPI.uiModel.userKeys.UserKeyLED led,
com.kuka.roboticsAPI.uiModel.userKeys.UserKeyLEDSize size)
Sets a LED with the given size on the user key at the specified position. |
void |
setText(com.kuka.roboticsAPI.uiModel.userKeys.UserKeyAlignment position,
String text)
Sets the text on the user key at the specified position. |
| Method Detail |
|---|
void setCriticalText(String warningText)
A critical user key displays the specified text as a warning when it is clicked (KeyDown). The user has to acknowledge this warning by clicking the user key again, before the function of the user key is executed. There is a timeout of 4 seconds before the warning can be acknowledged. Note that a critical user key only allows a custom reaction when the button is clicked (KeyDown). Button release events (KeyUp) are ignored.
warningText - the text that is displayed when the user key is clicked. Setting this parameter to null
or empty string makes the key non critical.String getCriticalText()
boolean isCritical()
A critical user key needs a confirmation by the user to be executed.
true if the user key is critical, false otherwise.setCriticalText(String)int getSlot()
The index is zero-based.
boolean isDoubleKey()
A double user key takes two slots on the user key bar.
true if the user key is a double user key, false otherwise.void addKeyListener(IUserKeyListener listener)
The listener can define behavior in case of a user key click event.
listener - the listener for this user key.void removeKeyListener(IUserKeyListener listener)
listener - the listener that should be removed.void setEnabled(boolean isEnabled)
Disabled user keys are still part of the user key bar, but cannot be clicked. By default, the user keys are set as enabled.
isEnabled - Boolean flag indicating whether the user key is enabled or not.boolean isEnabled()
Disabled user keys are still part of the user key bar, but cannot be clicked. By default, the user keys are set as enabled.
true if the user key is enabled, false otherwise.
void setText(com.kuka.roboticsAPI.uiModel.userKeys.UserKeyAlignment position,
String text)
position - the position for the given text. Can not be null.text - the text that should be displayed on the user key. Can not be null or empty.
void setLED(com.kuka.roboticsAPI.uiModel.userKeys.UserKeyAlignment position,
com.kuka.roboticsAPI.uiModel.userKeys.UserKeyLED led,
com.kuka.roboticsAPI.uiModel.userKeys.UserKeyLEDSize size)
position - the position for the LED. Can not be null.led - the color of the LED. Can not be null.size - the size of the LED. If set to null - size UserKeyLEDSize.Normal will be used.void setElement(UserKeyElement... element)
It contains information on the position and content of the user key element.
element - the element that should be displayed on the user key. Can not be null.UserKeyElement getElement(com.kuka.roboticsAPI.uiModel.userKeys.UserKeyAlignment position)
position - the position from which to get the user key element.
UserKeyElement removeElement(com.kuka.roboticsAPI.uiModel.userKeys.UserKeyAlignment position)
position - the position from which to remove the user key element.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||