public class AWTUI extends AbstractUserInterface
| Constructor and Description |
|---|
AWTUI() |
| Modifier and Type | Method and Description |
|---|---|
File |
chooseFile(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.
|
protected void |
createMenus() |
protected void |
createUI()
Subclasses override to control UI creation.
|
DialogPrompt |
dialogPrompt(String message,
String title,
DialogPrompt.MessageType msg,
DialogPrompt.OptionType option)
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).
|
ApplicationFrame |
getApplicationFrame()
Gets the main SciJava application frame, or null if not applicable.
|
AWTStatusBar |
getStatusBar()
Gets the main SciJava status bar, or null if not applicable.
|
SystemClipboard |
getSystemClipboard()
Gets the system clipboard associated with this UI, or null if not
applicable.
|
AWTToolBar |
getToolBar()
Gets the main SciJava toolbar, or null if not applicable.
|
boolean |
requiresEDT()
Returns true if this UI requires the EDT.
|
void |
showContextMenu(String menuRoot,
Display<?> display,
int x,
int y)
Displays a popup context menu for the given display at the specified
position.
|
isVisible, restoreLocation, saveLocation, show, show, showgetInfo, getPriority, setInfo, setPriority, toStringcontext, getContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitchooseFile, chooseFiles, chooseFiles, getConsolePane, getDesktop, showgetIdentifier, logcontext, getContext, setContextcompareTo, getPriority, setPrioritygetInfo, setInfogetLocationgetVersionpublic static final String NAME
public ApplicationFrame getApplicationFrame()
UserInterfacepublic AWTToolBar getToolBar()
UserInterfacepublic AWTStatusBar getStatusBar()
UserInterfacepublic SystemClipboard getSystemClipboard()
UserInterfacepublic DisplayWindow createDisplayWindow(Display<?> display)
UserInterfacepublic DialogPrompt dialogPrompt(String message, String title, DialogPrompt.MessageType msg, DialogPrompt.OptionType option)
UserInterfacemessage - The message in the dialog itself.title - The title of the dialog.msg - 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.option - The choices available when dismissing the dialog. These
choices are typically rendered as buttons for the user to click.public File chooseFile(File file, String style)
UserInterfacefile - 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)
UserInterfacepublic boolean requiresEDT()
UserInterfacepublic void dispose()
Disposableprotected void createUI()
AbstractUserInterfaceApplicationFrame but before
showing it (assuming the UI has an ApplicationFrame).createUI in class AbstractUserInterfaceprotected void createMenus()
Copyright © 2015–2022 SciJava. All rights reserved.