ini.trakem2
Class ControlWindow

java.lang.Object
  extended by ini.trakem2.ControlWindow

public class ControlWindow
extends java.lang.Object

Static class that shows one project per tab in a JFrame. Creates itself when a project requests to be have its trees displayed. Destroys itself when there are no more projects to show.


Method Summary
static void add(Project project, TemplateTree template_tree, ProjectTree thing_tree, LayerTree layer_tree)
          Beware that this method is asynchronous, as it delegates the launching to the SwingUtilities.invokeLater method to avoid havoc with Swing components.
static javax.swing.JFrame createJFrame(java.lang.String title)
          Returns a new JFrame with the proper icon from ImageJ.iconPath set, if any.
static void endWaitingCursor()
           
static Project getActive()
           
static java.util.Set<Project> getProjects()
          Returns null if there are no projects
static int getTabIndex(Project project)
          Returns -1 if not found.
static boolean isGUIEnabled()
           
static ij.gui.GenericDialog makeGenericDialog(java.lang.String title)
          For the generic dialogs to be parented properly.
static ij.gui.YesNoCancelDialog makeYesNoCancelDialog(java.lang.String title, java.lang.String msg)
          For the YesNoCancelDialog dialogs to be parented properly.
static YesNoDialog makeYesNoDialog(java.lang.String title, java.lang.String msg)
          For the YesNoDialog dialogs to be parented properly.
static void remove(Project project)
           
static void setGUIEnabled(boolean b)
          Prevents ControlWindow from displaying projects.
static void setLookAndFeel()
           
static void startWaitingCursor()
          Appends to the buffer data relative to the viewport of the given tree.
static void toFront()
           
static void updateTitle(Project project)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setLookAndFeel

public static void setLookAndFeel()

setGUIEnabled

public static void setGUIEnabled(boolean b)
Prevents ControlWindow from displaying projects.


isGUIEnabled

public static final boolean isGUIEnabled()

getProjects

public static java.util.Set<Project> getProjects()
Returns null if there are no projects


add

public static void add(Project project,
                       TemplateTree template_tree,
                       ProjectTree thing_tree,
                       LayerTree layer_tree)
Beware that this method is asynchronous, as it delegates the launching to the SwingUtilities.invokeLater method to avoid havoc with Swing components.


getActive

public static Project getActive()

remove

public static void remove(Project project)

updateTitle

public static void updateTitle(Project project)

makeGenericDialog

public static ij.gui.GenericDialog makeGenericDialog(java.lang.String title)
For the generic dialogs to be parented properly.


makeYesNoCancelDialog

public static ij.gui.YesNoCancelDialog makeYesNoCancelDialog(java.lang.String title,
                                                             java.lang.String msg)
For the YesNoCancelDialog dialogs to be parented properly.


makeYesNoDialog

public static YesNoDialog makeYesNoDialog(java.lang.String title,
                                          java.lang.String msg)
For the YesNoDialog dialogs to be parented properly.


toFront

public static void toFront()

startWaitingCursor

public static void startWaitingCursor()
Appends to the buffer data relative to the viewport of the given tree.


endWaitingCursor

public static void endWaitingCursor()

getTabIndex

public static int getTabIndex(Project project)
Returns -1 if not found.


createJFrame

public static javax.swing.JFrame createJFrame(java.lang.String title)
Returns a new JFrame with the proper icon from ImageJ.iconPath set, if any.