org.scijava.ui
Class AbstractUserInterface

java.lang.Object
  extended by org.scijava.AbstractContextual
      extended by org.scijava.plugin.AbstractRichPlugin
          extended by org.scijava.ui.AbstractUserInterface
All Implemented Interfaces:
Comparable<Prioritized>, Contextual, Disposable, HasPluginInfo, RichPlugin, SciJavaPlugin, Prioritized, UserInterface

public abstract class AbstractUserInterface
extends AbstractRichPlugin
implements UserInterface

Abstract superclass for UserInterface implementations.

Author:
Curtis Rueden

Constructor Summary
AbstractUserInterface()
           
 
Method Summary
protected  void createUI()
          Subclasses override to control UI creation.
 ApplicationFrame getApplicationFrame()
          Gets the main ImageJ application frame, or null if not applicable.
 Desktop getDesktop()
          Gets the desktop, for use with multi-document interfaces (MDI).
 StatusBar getStatusBar()
          Gets the main ImageJ status bar, or null if not applicable.
 ToolBar getToolBar()
          Gets the main ImageJ toolbar, or null if not applicable.
 boolean isVisible()
          Whether this UI is visible onscreen.
 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(Object o)
          Shows the object onscreen using an appropriate UI widget.
 void show(String name, Object o)
          Shows the object onscreen using an appropriate UI widget.
 
Methods inherited from class org.scijava.plugin.AbstractRichPlugin
compareTo, getInfo, getPriority, setInfo, setPriority, toString
 
Methods inherited from class org.scijava.AbstractContextual
context, getContext, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.scijava.ui.UserInterface
chooseFile, createDisplayWindow, dialogPrompt, getSystemClipboard, requiresEDT, showContextMenu
 
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
 
Methods inherited from interface org.scijava.Prioritized
getPriority, setPriority
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
 
Methods inherited from interface org.scijava.Disposable
dispose
 

Constructor Detail

AbstractUserInterface

public AbstractUserInterface()
Method Detail

show

public void show()
Description copied from interface: UserInterface
Shows the UI.

Note that the actual UI components are created lazily when this method is called, rather then upon the UI's initial construction.

Specified by:
show in interface UserInterface

isVisible

public boolean isVisible()
Description copied from interface: UserInterface
Whether this UI is visible onscreen.

Specified by:
isVisible in interface UserInterface

show

public void show(Object o)
Description copied from interface: UserInterface
Shows the object onscreen using an appropriate UI widget.

Specified by:
show in interface UserInterface

show

public void show(String name,
                 Object o)
Description copied from interface: UserInterface
Shows the object onscreen using an appropriate UI widget.

Specified by:
show in interface UserInterface
Parameters:
name - The name to use when displaying the object.
o - The object to be displayed.

show

public void show(Display<?> display)
Description copied from interface: UserInterface
Shows the display onscreen using an appropriate UI widget.

Specified by:
show in interface UserInterface

getDesktop

public Desktop getDesktop()
Description copied from interface: UserInterface
Gets the desktop, for use with multi-document interfaces (MDI).

Specified by:
getDesktop in interface UserInterface

getApplicationFrame

public ApplicationFrame getApplicationFrame()
Description copied from interface: UserInterface
Gets the main ImageJ application frame, or null if not applicable.

Specified by:
getApplicationFrame in interface UserInterface

getToolBar

public ToolBar getToolBar()
Description copied from interface: UserInterface
Gets the main ImageJ toolbar, or null if not applicable.

Specified by:
getToolBar in interface UserInterface

getStatusBar

public StatusBar getStatusBar()
Description copied from interface: UserInterface
Gets the main ImageJ status bar, or null if not applicable.

Specified by:
getStatusBar in interface UserInterface

saveLocation

public void saveLocation()
Description copied from interface: UserInterface
Persists the application frame's current location.

Specified by:
saveLocation in interface UserInterface

restoreLocation

public void restoreLocation()
Description copied from interface: UserInterface
Restores the application frame's current location.

Specified by:
restoreLocation in interface UserInterface

createUI

protected void createUI()
Subclasses override to control UI creation. They must also call super.createUI() after creating the ApplicationFrame but before showing it (assuming the UI has an ApplicationFrame).



Copyright © 2009–2014 SciJava. All rights reserved.