public abstract class AbstractSwingUI extends AbstractUserInterface implements SwingUI
| Constructor and Description |
|---|
AbstractSwingUI() |
| Modifier and Type | Method and Description |
|---|---|
File |
chooseFile(File file,
String style)
Prompts the user to choose a file.
|
File[] |
chooseFiles(File parent,
File[] files,
FileFilter filter,
String style)
Prompts the user to choose a list of files.
|
protected JMenuBar |
createConsoleMenu() |
protected JMenuBar |
createMenus()
Creates a
JMenuBar from the master ShadowMenu structure. |
protected void |
createUI()
Subclasses override to control UI creation.
|
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).
|
SwingApplicationFrame |
getApplicationFrame()
Gets the main SciJava application frame, or null if not applicable.
|
SwingConsolePane |
getConsolePane()
Gets the main SciJava console pane, or null if not applicable.
|
SwingStatusBar |
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.
|
SwingToolBar |
getToolBar()
Gets the main SciJava toolbar, or null if not applicable.
|
boolean |
requiresEDT()
Returns true if this UI requires the EDT.
|
protected abstract void |
setupAppFrame()
Configures the application frame for subclass-specific settings (e.g., SDI
or MDI).
|
protected abstract void |
setupConsole()
Configures the console for subclass-specific settings (e.g., SDI or MDI).
|
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, createDisplayWindow, dialogPrompt, getDesktop, showgetIdentifier, logcontext, getContext, setContextcompareTo, getPriority, setPrioritygetInfo, setInfogetLocationgetVersionpublic SwingApplicationFrame getApplicationFrame()
UserInterfacegetApplicationFrame in interface UserInterfacepublic SwingToolBar getToolBar()
UserInterfacegetToolBar in interface UserInterfacepublic SwingStatusBar getStatusBar()
UserInterfacegetStatusBar in interface UserInterfacepublic SwingConsolePane getConsolePane()
UserInterfacegetConsolePane in interface UserInterfacepublic SystemClipboard getSystemClipboard()
UserInterfacegetSystemClipboard in interface UserInterfacepublic File chooseFile(File file, String style)
UserInterfacechooseFile in interface 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 File[] chooseFiles(File parent, File[] files, FileFilter filter, String style)
UserInterfacechooseFiles in interface UserInterfaceparent - Parent folder for file selectionfiles - The initial value displayed in the file chooser prompt.filter - A filter allowing to restrict file choice.style - File selection style (files, directories, or both) and optional filtersFiles chosen by the user, or null if the
user cancels the prompt.public void showContextMenu(String menuRoot, Display<?> display, int x, int y)
UserInterfaceshowContextMenu in interface UserInterfacepublic boolean requiresEDT()
UserInterfacerequiresEDT in interface UserInterfacepublic void dispose()
Disposabledispose in interface Disposableprotected void createUI()
AbstractUserInterfaceApplicationFrame but before
showing it (assuming the UI has an ApplicationFrame).createUI in class AbstractUserInterfaceprotected JMenuBar createMenus()
JMenuBar from the master ShadowMenu structure.protected JMenuBar createConsoleMenu()
protected abstract void setupAppFrame()
protected abstract void setupConsole()
Copyright © 2015–2022 SciJava. All rights reserved.