com.kuka.roboticsAPI.uiModel.userKeys
Interface IUserKeyBar


public interface IUserKeyBar

Interface for a user key bar.

A user key bar is created within an application or background task and will be displayed on the UI configured for the Station on which the application or background task is running. When the application or background task is terminated, the user key bar will be removed as well.
The programmer can add one or more IUserKeys to the user key bar and set them up with custom functionality and appearance.
The user key bar needs to be published to be displayed on the UI. To do this use the publish() method, after all user keys have been added.


Method Summary
 IUserKey addDoubleUserKey(int slot, IUserKeyListener listener, boolean ignoreEventsWhileProcessing)
          Adds a double user key to the bar staring at the specified slot with the given listener.
 IUserKey addDoubleUserKey(int slot, IUserKeyListener listener, boolean ignoreEventsWhileProcessing, UserKeyElement... elements)
          Adds a double user key to the bar staring at the specified slot with the given listener and one or more user key elements.
 IUserKey addUserKey(int slot, IUserKeyListener listener, boolean ignoreEventsWhileProcessing)
          Adds a user key to the bar at the specified slot with the given listener.
 IUserKey addUserKey(int slot, IUserKeyListener listener, boolean ignoreEventsWhileProcessing, UserKeyElement... element)
          Adds a user key to the bar at the specified slot with the given listener and one or more user key elements.
 String getName()
          Gets the unique name of the user key bar.
 IUserKey getUserKey(int slot)
          Gets the user key on the bar at the specified slot.
 boolean isPublished()
          Indicates whether the user key bar has been published.
 void publish()
          Publishes the user key bar, so that it can be displayed.
 

Method Detail

getName

String getName()
Gets the unique name of the user key bar.

Returns:
the name of the user key bar.

addUserKey

IUserKey addUserKey(int slot,
                    IUserKeyListener listener,
                    boolean ignoreEventsWhileProcessing)
Adds a user key to the bar at the specified slot with the given listener.

Parameters:
slot - the slot on the bar at which the key will be displayed.
listener - the listener for events generated by the user key.
ignoreEventsWhileProcessing - if true, all key events for this key, which are triggered while a key event for this key is already being processed, will be ignored.
Returns:
a new user key.

addUserKey

IUserKey addUserKey(int slot,
                    IUserKeyListener listener,
                    boolean ignoreEventsWhileProcessing,
                    UserKeyElement... element)
Adds a user key to the bar at the specified slot with the given listener and one or more user key elements.

Parameters:
slot - the slot on the bar at which the key will be displayed.
listener - the listener for events generated by the user key.
ignoreEventsWhileProcessing - if true, all key events for this key, which are triggered while a key event for this key is already being processed, will be ignored.
element - the elements that will be displayed on the user key.
Returns:
a new user key.

addDoubleUserKey

IUserKey addDoubleUserKey(int slot,
                          IUserKeyListener listener,
                          boolean ignoreEventsWhileProcessing)
Adds a double user key to the bar staring at the specified slot with the given listener.

Parameters:
slot - the slot on the bar at which the key will be displayed. A double user key takes to slots, the given slot and the one following it.
listener - the listener for events generated by the user key.
ignoreEventsWhileProcessing - if true, all key events for this key, which are triggered while a key event for this key is already being processed, will be ignored.
Returns:
a new user key.
See Also:
addDoubleUserKey(int, IUserKeyListener, boolean, UserKeyElement...)

addDoubleUserKey

IUserKey addDoubleUserKey(int slot,
                          IUserKeyListener listener,
                          boolean ignoreEventsWhileProcessing,
                          UserKeyElement... elements)
Adds a double user key to the bar staring at the specified slot with the given listener and one or more user key elements.

The double user key occupies two slots on its bar. It still has only one 3x3 grid for UI elements which is extended to cover both slots.

Parameters:
slot - the slot on the bar at which the key will be displayed. A double user key takes two slots, the given slot and the one following it.
listener - the listener for events generated by the user key.
ignoreEventsWhileProcessing - if true, all key events for this key, which are triggered while a key event for this key is already being processed, will be ignored.
elements - the elements that will be displayed on the user key.
Returns:
a new user key.

getUserKey

IUserKey getUserKey(int slot)
Gets the user key on the bar at the specified slot.

Parameters:
slot - the slot on the bar.
Returns:
the user key at the given slot. For double keys returns the same user key for both its slots.

publish

void publish()
Publishes the user key bar, so that it can be displayed.

After a user key bar has been created and user keys have been added to it, it needs to be published in order to be displayed and used on the UI.
In order to be published, a bar must contain at least one key, and every keys must have at least one UI element (text or LED).


isPublished

boolean isPublished()
Indicates whether the user key bar has been published.

If a user key bar has already been published, keys cannot be added or removed from it. Though it is still possible to change key appearances.

Returns:
true if the user key bar is published, false otherwise.
See Also:
publish()


Copyright © 2019. All rights reserved.