com.kuka.roboticsAPI.uiModel
Class ConsoleApplicationUI

java.lang.Object
  extended by com.kuka.roboticsAPI.uiModel.AbstractApplicationUI
      extended by com.kuka.roboticsAPI.uiModel.ConsoleApplicationUI
All Implemented Interfaces:
IApplicationUI, ITaskUI, Runnable

public class ConsoleApplicationUI
extends AbstractApplicationUI
implements Runnable

This class displays a modal dialog in text form in the eclipse console. The user must input their answer by entering the number of their chosen response into the console.

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

Constructor Summary
ConsoleApplicationUI()
           
 
Method Summary
 void cancelCurrentDialog(String reason)
          Cancels the currently displayed dialog.
 IUserKeyBar createUserKeyBar(String name)
          Creates a IUserKeyBar for user interaction during the execution of a robot application or background task.
 int displayModalDialog(com.kuka.roboticsAPI.uiModel.ApplicationDialogType type, String dialogText, String... buttons)
          Displays a modal dialog for user interaction during the run of a robot application.
 IUserKeyBar getUserKeyBar(String name)
          Gets the user key bar with the specified name.
 void run()
          
 
Methods inherited from class com.kuka.roboticsAPI.uiModel.AbstractApplicationUI
checkDialogParams, dispose
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsoleApplicationUI

public ConsoleApplicationUI()
Method Detail

displayModalDialog

public int displayModalDialog(com.kuka.roboticsAPI.uiModel.ApplicationDialogType type,
                              String dialogText,
                              String... buttons)
Displays a modal dialog for user interaction during the run of a robot application.

The dialog remains active until the user chooses an answer or the application is closed.
Only one dialog can be opened simultaneously from the same application.
The dialog is displayed on the UI configured for the Station on which the application runs. If no UI is configured dialog will be shown in text form on the standard console.

Specified by:
displayModalDialog in interface IApplicationUI
Parameters:
type - the type of dialog that should be shown. The dialog icons vary according to the chosen type.
dialogText - the text that is shown to the user.
buttons - the possible responses to the dialog are represented as buttons. The user must choose and click one button to close the dialog. There is a limit of twelve buttons per dialog.
Returns:
the index of the chosen button. I.e. possible return values range from 0 to (number of buttons - 1).
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

run

public void run()

Specified by:
run in interface Runnable
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

cancelCurrentDialog

public void cancelCurrentDialog(String reason)
Cancels the currently displayed dialog.
An UIEngineException will be thrown with the given reason.

Specified by:
cancelCurrentDialog in class AbstractApplicationUI
Parameters:
reason - the reason for canceling the dialog.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

createUserKeyBar

public IUserKeyBar createUserKeyBar(String name)
Description copied from interface: ITaskUI
Creates a IUserKeyBar for user interaction during the execution of a robot application or background task.

A user key bar can hold one or more IUserKeys. A user key can be set up by the programmer with custom functionality and appearance.
The user key bar is displayed on the UI configured for the Station on which the application or background task is running.
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.

Specified by:
createUserKeyBar in interface ITaskUI
Parameters:
name - the name of the user key bar. Must be unique. Can not be null or empty string.
Returns:
a new user key bar

getUserKeyBar

public IUserKeyBar getUserKeyBar(String name)
Description copied from interface: ITaskUI
Gets the user key bar with the specified name.

Specified by:
getUserKeyBar in interface ITaskUI
Parameters:
name - the name of the user key bar.
Returns:
the user key bar


Copyright © 2019. All rights reserved.