Interface Application


public interface Application
Provides access to and control of various aspects of the user interface, allowing code to directly update and control the GUI. This interface can be accessed from the Studio by calling Studio.getApplication() or Studio.app().
  • Method Summary

    Modifier and Type
    Method
    Description
    Provides access to the application skin API for determining colors for various GUI components.
    double
    getChannelExposureTime(String channelGroup, String channel, double defaultExp)
    Retrieve the exposure time that has been set for the specified channel.
    Provide access to the main window of the program.
    void
    Move the main Micro-Manager window to the top of the user interface.
    void
    Updates the GUI so that its state reflects the current state of the hardware (as understood by the Micro-Manager Core).
    void
    Updates the GUI so that its state reflects the current state of the hardware (as understood by the Micro-Manager Core).
    void
    saveConfigPresets(String path, boolean allowOverwrite)
    Save the current state of the config file to the specified path.
    void
    setChannelExposureTime(String channelGroup, String channel, double exposure)
    Updates the exposure time associated with the given preset.
    void
    setExposure(double exposureMs)
    Set the exposure time for the current channel (if any).
    void
    Set the default camera's ROI -- a convenience function.
    void
    Pop up the dialog used to configure the autofocus settings for the current autofocus device.
    void
    showBackgroundWindow(boolean show)
    Shows a background window, that hides potentially cluttered desktops and provides a better look for the application.
    void
    Display the position list dialog.
    Provides access to the application skin API for determining colors for various GUI components.
  • Method Details

    • refreshGUI

      void refreshGUI()
      Updates the GUI so that its state reflects the current state of the hardware (as understood by the Micro-Manager Core). This method will poll each device in the system for its current state, which may take significant time. Compare refreshGUIFromCache().
    • refreshGUIFromCache

      void refreshGUIFromCache()
      Updates the GUI so that its state reflects the current state of the hardware (as understood by the Micro-Manager Core). This method will pull values from the Core's System State Cache, which is fast but may not necessarily reflect the actual state of hardware.
    • setExposure

      void setExposure(double exposureMs)
      Set the exposure time for the current channel (if any). Equivalent to updating the exposure time field in the main window.
      Parameters:
      exposureMs - Exposure time, in milliseconds.
    • setChannelExposureTime

      void setChannelExposureTime(String channelGroup, String channel, double exposure)
      Updates the exposure time associated with the given preset. If the channel-group and channel name match the current active channel settings, then the displayed exposure time will also be updated.
      Parameters:
      channelGroup - Name of the config group used to control the channel.
      channel - Name of the preset in the config group that refers to the channel that should be updated.
      exposure - New exposure time to set.
    • getChannelExposureTime

      double getChannelExposureTime(String channelGroup, String channel, double defaultExp)
      Retrieve the exposure time that has been set for the specified channel.
      Parameters:
      channelGroup - Name of the config group used to control the channel.
      channel - Name of the preset in the config group that refers to the channel whose exposure time is desired.
      defaultExp - Default value to return if no exposure time is found.
      Returns:
      Exposure time for the channel, or the provided default value.
    • saveConfigPresets

      void saveConfigPresets(String path, boolean allowOverwrite) throws IOException
      Save the current state of the config file to the specified path. If you have generated new config groups and/or presets, they will be included in the new file.
      Parameters:
      path - Path to save the file to.
      allowOverwrite - If true, any existing file at the specified path will be overwritten.
      Throws:
      IOException - If shouldOverwrite is false and there is already a file at the chosen path.
    • showAutofocusDialog

      void showAutofocusDialog()
      Pop up the dialog used to configure the autofocus settings for the current autofocus device.
    • showPositionList

      void showPositionList()
      Display the position list dialog.
    • setROI

      void setROI(Rectangle rect) throws Exception
      Set the default camera's ROI -- a convenience function. Will stop and start Live mode for you, and update the GUI's display of values such as the view dimensions.
      Parameters:
      rect - Rectangle defining the ROI
      Throws:
      Exception - if there is an error in the Core when setting the ROI
    • makeActive

      void makeActive()
      Move the main Micro-Manager window to the top of the user interface.
    • getMainWindow

      JFrame getMainWindow()
      Provide access to the main window of the program. This is largely intended to allow client code to position their windows with respect to the main window.
      Returns:
      the main Window
    • skin

      Provides access to the application skin API for determining colors for various GUI components.
      Returns:
      ApplicationSkin instance.
    • getApplicationSkin

      ApplicationSkin getApplicationSkin()
      Provides access to the application skin API for determining colors for various GUI components. Identical to skin() except in name.
      Returns:
      ApplicationSkin instance.
    • showBackgroundWindow

      void showBackgroundWindow(boolean show)
      Shows a background window, that hides potentially cluttered desktops and provides a better look for the application.