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, show
getInfo, getPriority, setInfo, setPriority, toString
context, getContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
chooseFile, chooseFiles, chooseFiles, getConsolePane, getDesktop, show
getIdentifier, log
context, getContext, setContext
compareTo, getPriority, setPriority
getInfo, setInfo
getLocation
getVersion
public static final String NAME
public ApplicationFrame getApplicationFrame()
UserInterface
public AWTToolBar getToolBar()
UserInterface
public AWTStatusBar getStatusBar()
UserInterface
public SystemClipboard getSystemClipboard()
UserInterface
public DisplayWindow createDisplayWindow(Display<?> display)
UserInterface
public DialogPrompt dialogPrompt(String message, String title, DialogPrompt.MessageType msg, DialogPrompt.OptionType option)
UserInterface
message
- 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)
UserInterface
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)
UserInterface
public boolean requiresEDT()
UserInterface
public void dispose()
Disposable
protected void createUI()
AbstractUserInterface
ApplicationFrame
but before
showing it (assuming the UI has an ApplicationFrame
).createUI
in class AbstractUserInterface
protected void createMenus()
Copyright © 2015–2022 SciJava. All rights reserved.