public class HeadlessUI extends AbstractRichPlugin implements UserInterface
Most operations do nothing. Attempting to show an object via one of the
show() methods logs the object via the LogService.
| Constructor and Description |
|---|
HeadlessUI() |
| Modifier and Type | Method and Description |
|---|---|
File |
chooseFile(String title,
File file,
String style)
Prompts the user to choose a file.
|
DisplayWindow |
createDisplayWindow(Display<?> display)
Creates a new display window housing the given display, or null if not
applicable.
|
DialogPrompt |
dialogPrompt(String message,
String title,
DialogPrompt.MessageType messageType,
DialogPrompt.OptionType optionType)
Creates a dialog prompter.
|
void |
dispose()
Performs any needed cleanup of the object's services, in preparation for
the object being retired (e.g., to make garbage collection possible).
|
boolean |
isVisible()
Whether this UI is visible onscreen.
|
boolean |
requiresEDT()
Returns true if this UI requires the EDT.
|
void |
restoreLocation()
Restores the application frame's current location.
|
void |
saveLocation()
Persists the application frame's current location.
|
void |
show()
Shows the UI.
|
void |
show(Display<?> display)
Shows the display onscreen using an appropriate UI widget.
|
void |
show(String name,
Object o)
Shows the object onscreen using an appropriate UI widget.
|
void |
showContextMenu(String menuRoot,
Display<?> display,
int x,
int y)
Displays a popup context menu for the given display at the specified
position.
|
getInfo, getPriority, setInfo, setPriority, toStringcontext, getContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitchooseFile, chooseFiles, chooseFiles, getApplicationFrame, getConsolePane, getDesktop, getStatusBar, getSystemClipboard, getToolBar, showgetIdentifier, logcontext, getContext, setContextcompareTo, getPriority, setPrioritygetInfo, setInfogetLocationgetVersionpublic static final String NAME
public void show()
UserInterfaceNote that the actual UI components are created lazily when this method is called, rather then upon the UI's initial construction.
show in interface UserInterfacepublic boolean isVisible()
UserInterfaceisVisible in interface UserInterfacepublic void show(String name, Object o)
UserInterfaceshow in interface UserInterfacename - The name to use when displaying the object.o - The object to be displayed.public void show(Display<?> display)
UserInterfaceshow in interface UserInterfacepublic DisplayWindow createDisplayWindow(Display<?> display)
UserInterfacecreateDisplayWindow in interface UserInterfacepublic DialogPrompt dialogPrompt(String message, String title, DialogPrompt.MessageType messageType, DialogPrompt.OptionType optionType)
UserInterfacedialogPrompt in interface UserInterfacemessage - The message in the dialog itself.title - The title of the dialog.messageType - The type of message. This typically is rendered as an
icon next to the message. For example,
DialogPrompt.MessageType.WARNING_MESSAGE typically appears
as an exclamation point.optionType - The choices available when dismissing the dialog. These
choices are typically rendered as buttons for the user to click.public File chooseFile(String title, File file, String style)
UserInterfacechooseFile in interface UserInterfacetitle - Title to use in the file chooser dialog.file - The initial value displayed in the file chooser prompt.style - The style of chooser to use:
File chosen by the user, or null if prompt is not
availablepublic void showContextMenu(String menuRoot, Display<?> display, int x, int y)
UserInterfaceshowContextMenu in interface UserInterfacepublic void saveLocation()
UserInterfacesaveLocation in interface UserInterfacepublic void restoreLocation()
UserInterfacerestoreLocation in interface UserInterfacepublic boolean requiresEDT()
UserInterfacerequiresEDT in interface UserInterfacepublic void dispose()
Disposabledispose in interface DisposableCopyright © 2015–2022 SciJava. All rights reserved.