diff --git a/.gitmodules b/.gitmodules index 5d7c8f02c0..4ba10345c3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "mmCoreAndDevices"] path = mmCoreAndDevices - url=https://github.com/micro-manager/mmCoreAndDevices.git - branch = main + url=https://github.com/microcombustion/mmCoreAndDevices.git + branch = teledyne-dalsa-genie-GigE diff --git a/mmCoreAndDevices b/mmCoreAndDevices index fee2c1e310..514ba2089f 160000 --- a/mmCoreAndDevices +++ b/mmCoreAndDevices @@ -1 +1 @@ -Subproject commit fee2c1e310e2d237c1f6dda412c262efaecdf094 +Subproject commit 514ba2089fcba36259f0f462e5cb35f36b1d6bf7 diff --git a/mmstudio/src/main/java/org/micromanager/Application.java b/mmstudio/src/main/java/org/micromanager/Application.java index bfd68b543c..abc9716020 100644 --- a/mmstudio/src/main/java/org/micromanager/Application.java +++ b/mmstudio/src/main/java/org/micromanager/Application.java @@ -41,7 +41,7 @@ public interface Application { * poll each device in the system for its current state, which may take * significant time. Compare refreshGUIFromCache(). */ - public void refreshGUI(); + void refreshGUI(); /** * Updates the GUI so that its state reflects the current state of the @@ -49,14 +49,14 @@ public interface Application { * pull values from the Core's System State Cache, which is fast but may not * necessarily reflect the actual state of hardware. */ - public void refreshGUIFromCache(); + void refreshGUIFromCache(); /** * Set the exposure time for the current channel (if any). Equivalent to * updating the exposure time field in the main window. * @param exposureMs Exposure time, in milliseconds. */ - public void setExposure(double exposureMs); + void setExposure(double exposureMs); /** * Updates the exposure time associated with the given preset. If the @@ -68,7 +68,7 @@ public interface Application { * channel that should be updated. * @param exposure New exposure time to set. */ - public void setChannelExposureTime(String channelGroup, String channel, + void setChannelExposureTime(String channelGroup, String channel, double exposure); /** @@ -80,7 +80,7 @@ public void setChannelExposureTime(String channelGroup, String channel, * @param defaultExp Default value to return if no exposure time is found. * @return Exposure time for the channel, or the provided default value. */ - public double getChannelExposureTime(String channelGroup, String channel, + double getChannelExposureTime(String channelGroup, String channel, double defaultExp); /** @@ -93,18 +93,18 @@ public double getChannelExposureTime(String channelGroup, String channel, * @throws IOException If shouldOverwrite is false and there is already a * file at the chosen path. */ - public void saveConfigPresets(String path, boolean allowOverwrite) throws IOException; + void saveConfigPresets(String path, boolean allowOverwrite) throws IOException; /** * Pop up the dialog used to configure the autofocus settings for the * current autofocus device. */ - public void showAutofocusDialog(); + void showAutofocusDialog(); /** * Display the position list dialog. */ - public void showPositionList(); + void showPositionList(); /** * Set the default camera's ROI -- a convenience function. Will stop and @@ -113,12 +113,12 @@ public double getChannelExposureTime(String channelGroup, String channel, * @param rect Rectangle defining the ROI * @throws Exception if there is an error in the Core when setting the ROI */ - public void setROI(Rectangle rect) throws Exception; + void setROI(Rectangle rect) throws Exception; /** * Move the main Micro-Manager window to the top of the user interface. */ - public void makeActive(); + void makeActive(); /** * Provide access to the main window of the program. This is largely @@ -126,19 +126,19 @@ public double getChannelExposureTime(String channelGroup, String channel, * to the main window. * @return the main Window */ - public JFrame getMainWindow(); + JFrame getMainWindow(); /** * Provides access to the application skin API for determining colors for * various GUI components. * @return ApplicationSkin instance. */ - public ApplicationSkin skin(); + ApplicationSkin skin(); /** * Provides access to the application skin API for determining colors for * various GUI components. Identical to skin() except in name. * @return ApplicationSkin instance. */ - public ApplicationSkin getApplicationSkin(); + ApplicationSkin getApplicationSkin(); } diff --git a/mmstudio/src/main/java/org/micromanager/ApplicationSkin.java b/mmstudio/src/main/java/org/micromanager/ApplicationSkin.java index febe67f2e6..c8fa139564 100644 --- a/mmstudio/src/main/java/org/micromanager/ApplicationSkin.java +++ b/mmstudio/src/main/java/org/micromanager/ApplicationSkin.java @@ -41,7 +41,7 @@ public interface ApplicationSkin { /** * Available skins used by the application. */ - public enum SkinMode { + enum SkinMode { DAY("Day"), NIGHT("Night"); private final String desc_; @@ -80,43 +80,43 @@ public static SkinMode fromString(String desc) { * application-wide event bus. * @param mode The mode to use. */ - public void setSkin(SkinMode mode); + void setSkin(SkinMode mode); /** * @return the current Micro-Manager skin. */ - public SkinMode getSkin(); + SkinMode getSkin(); /** * Return the current background color for normal GUI elements. * @return current background color */ - public Color getBackgroundColor(); + Color getBackgroundColor(); /** * Return the current "lighter" background color for highlighted or * otherwise differentiated GUI elements. * @return light background color */ - public Color getLightBackgroundColor(); + Color getLightBackgroundColor(); /** * Return the current "disabled" background color. * @return "disabled" background color */ - public Color getDisabledBackgroundColor(); + Color getDisabledBackgroundColor(); /** * Return the current color for enabled text. * @return current color for enabled text */ - public Color getEnabledTextColor(); + Color getEnabledTextColor(); /** * Return the current color for disabled text. * @return current color for disabled text. */ - public Color getDisabledTextColor(); + Color getDisabledTextColor(); /** * If the specified mode is not currently active, then we switch to that @@ -124,10 +124,10 @@ public static SkinMode fromString(String desc) { * with a nonstandard look-and-feel. * @param mode SkinMode to switch to (but without updating the UI) */ - public void suspendToMode(SkinMode mode); + void suspendToMode(SkinMode mode); /** * Restores the mode that was active before suspendToMode was called. */ - public void resume(); + void resume(); } diff --git a/mmstudio/src/main/java/org/micromanager/PropertyManager.java b/mmstudio/src/main/java/org/micromanager/PropertyManager.java new file mode 100644 index 0000000000..152e4744f9 --- /dev/null +++ b/mmstudio/src/main/java/org/micromanager/PropertyManager.java @@ -0,0 +1,47 @@ +package org.micromanager; + +import java.io.File; +import java.io.IOException; + +/** + * Provides access to PropertyMaps. And instance of this interface is obtained + * through Studio.properties() and Studio.propertyManager(); + */ +public interface PropertyManager { + + /** + * Provides an easy way for a script to obtain a PropertyMap Builder + * @return PropertyMap Builder + */ + PropertyMap.Builder propertyMapBuilder(); + + /** + * Returns an empty property map. + * @return empty property map + */ + PropertyMap emptyPropertyMap(); + + /** + * Creates a property map from its JSON-serialized form. + * JSON format is described in {@link org.micromanager.internal.propertymap.PropertyMapJSONSerializer} + * @param json json formatted String to be converted into a PropertyMap + * @return PropertyMap result from conversion + * @throws IOException if {@code json} is invalid JSON or if it does not + * represent a valid property map + */ + PropertyMap fromJSON(String json) throws IOException; + + /** + * Create a property map from its JSON-serialized form stored in a file. + * + * JSON format is described in {@link org.micromanager.internal.propertymap.PropertyMapJSONSerializer} + * @param file File containing JSON serialized Properties. + * @return PropertyMap resulting from conversion fo JSON in file. + * @throws IOException if there was a problem reading {@code file} or if the + * file contained invalid JSON or if the JSON did not represent a valid + * property map + * @throws java.io.FileNotFoundException this subclass of {@code IOException} + * is thrown if {@code file} does not exist + */ + PropertyMap loadJSON(File file) throws IOException; +} diff --git a/mmstudio/src/main/java/org/micromanager/PropertyMap.java b/mmstudio/src/main/java/org/micromanager/PropertyMap.java index 6f027ce12b..678b34ebfc 100644 --- a/mmstudio/src/main/java/org/micromanager/PropertyMap.java +++ b/mmstudio/src/main/java/org/micromanager/PropertyMap.java @@ -83,7 +83,7 @@ public interface PropertyMap { * This is only used for interchange purposes, for example when performing * bulk operations on property maps. */ - public interface OpaqueValue { + interface OpaqueValue { /** * * @return diff --git a/mmstudio/src/main/java/org/micromanager/PropertyMaps.java b/mmstudio/src/main/java/org/micromanager/PropertyMaps.java index 8014bf4ad4..b22b9f9922 100644 --- a/mmstudio/src/main/java/org/micromanager/PropertyMaps.java +++ b/mmstudio/src/main/java/org/micromanager/PropertyMaps.java @@ -48,8 +48,8 @@ public static PropertyMap emptyPropertyMap() { /** * Create a property map from its JSON-serialized form. - * @param json - * @return + * @param json json formatted String to be converted into a PropertyMap + * @return PropertyMap result from conversion * @throws IOException if {@code json} is invalid JSON or if it does not * represent a valid property map */ diff --git a/mmstudio/src/main/java/org/micromanager/Studio.java b/mmstudio/src/main/java/org/micromanager/Studio.java index 6d98b44c8e..044857d86b 100644 --- a/mmstudio/src/main/java/org/micromanager/Studio.java +++ b/mmstudio/src/main/java/org/micromanager/Studio.java @@ -43,7 +43,7 @@ public interface Studio { * implicit, temporary image storage datastore. * @return An implementation of the Album API. */ - public Album album(); + Album album(); /** * Provides access to and control of the contents of the Album, the @@ -51,42 +51,42 @@ public interface Studio { * in name. * @return An implementation of the Album API. */ - public Album getAlbum(); + Album getAlbum(); /** * Provides access to the compatibility layer that exposes some old 1.4 * API methods. * @return An implementation of the compatibility API. */ - public CompatibilityInterface compat(); + CompatibilityInterface compat(); /** * Provides access to the compatibility layer that exposes some old 1.4 * API methods. Identical to compat() in all but name. * @return An implementation of the compatibility API. */ - public CompatibilityInterface getCompatibilityInterface(); + CompatibilityInterface getCompatibilityInterface(); /** * Provides access to Micro-Manager's logging functions, like logError(), * showMessage(), etc. * @return Access to Micro-Manager's logging interface. */ - public LogManager logs(); + LogManager logs(); /** * Provides access to Micro-Manager's logging functions, like logError(), * showMessage(), etc. Identical to logs() except in name. * @return Access to Micro-Manager's logging interface. */ - public LogManager getLogManager(); + LogManager getLogManager(); /** * Provide access to the AcquisitionManager, for running data acquisition * using the Micro-Manager acquisition engine. * @return AcquisitionManager */ - public AcquisitionManager acquisitions(); + AcquisitionManager acquisitions(); /** * Provide access to the AcquisitionManager, for running data acquisition @@ -94,14 +94,14 @@ public interface Studio { * except in name. * @return AcquisitionManager */ - public AcquisitionManager getAcquisitionManager(); + AcquisitionManager getAcquisitionManager(); /** * Provide access to the AlertManager, for creating low-profile, non- * interrupting alerts in the user interface. * @return AlertManager */ - public AlertManager alerts(); + AlertManager alerts(); /** * Provide access to the AlertManager, for creating low-profile, non- @@ -109,62 +109,62 @@ public interface Studio { * in name. * @return AlertManager */ - public AlertManager getAlertManager(); + AlertManager getAlertManager(); /** * Provide access to the AutofocusManager, for performing autofocus * operations. * @return AutofocusManager */ - public AutofocusManager getAutofocusManager(); + AutofocusManager getAutofocusManager(); /** * Provides access to the Core and its functionality. * @return Micro-Manager core object. */ - public CMMCore core(); + CMMCore core(); /** * Provides access to the Core and its functionality. Identical to core() * except in name. * @return Micro-Manager core object. */ - public CMMCore getCMMCore(); + CMMCore getCMMCore(); /** * Provide access to the DataManager instance for accessing Micro-Manager * data constructs. * @return DataManager instance */ - public DataManager data(); + DataManager data(); /** * Provide access to the DataManager instance for accessing Micro-Manager * data constructs. Identical to data() except in name. * @return DataManager instance */ - public DataManager getDataManager(); + DataManager getDataManager(); /** * Provides access to the DisplayManager instance for accessing * Micro-Manager display constructs. * @return DisplayManager instance */ - public DisplayManager displays(); + DisplayManager displays(); /** * Provides access to the DisplayManager instance for accessing * Micro-Manager display constructs. Identical to displays() except in name. * @return DisplayManager instance */ - public DisplayManager getDisplayManager(); + DisplayManager getDisplayManager(); /** * Provides access to the EventManager instance for subscribing to and * posting events on the application-wide EventBus. * @return EventManager instance */ - public EventManager events(); + EventManager events(); /** * Provides access to the EventManager instance for subscribing to and @@ -172,114 +172,128 @@ public interface Studio { * except in name. * @return EventManager instance */ - public EventManager getEventManager(); + EventManager getEventManager(); /** * Provides access to some utility methods for use in the Beanshell * scripting panel. * @return ScriptController instance. */ - public ScriptController scripter(); + ScriptController scripter(); /** * Provides access to some utility methods for use in the Beanshell * scripting panel. Identical to scripter() except in name. * @return ScriptController instance. */ - public ScriptController getScriptController(); + ScriptController getScriptController(); /** * Provides access to the Snap/Live display and associated logic. * @return SnapLiveManager instance. */ - public SnapLiveManager live(); + SnapLiveManager live(); /** * Provides access to the Snap/Live display and associated logic. Identical * to live() except in name. * @return SnapLiveManager instance. */ - public SnapLiveManager getSnapLiveManager(); + SnapLiveManager getSnapLiveManager(); /** * Provides access to the UserProfile instance for accessing per-user * profiles. * @return UserProfile instance */ - public UserProfile profile(); + UserProfile profile(); /** * Provides access to the UserProfile instance for accessing per-user * profiles. Identical to profile() except in name. * @return UserProfile instance */ - public UserProfile getUserProfile(); + UserProfile getUserProfile(); /** * Provides access to the PluginManager for accessing plugin instances. * @return PluginManager instance. */ - public PluginManager plugins(); + PluginManager plugins(); /** * Provides access to the PluginManager for accessing plugin instances. * Identical to plugins() except in name. * @return PluginManager instance. */ - public PluginManager getPluginManager(); + PluginManager getPluginManager(); /** * Provides access to the PositionListManager for interacting with the * Stage Position List. * @return PositionListManager instance. */ - public PositionListManager positions(); + PositionListManager positions(); /** * Provides access to the PositionListManager for interacting with the * Stage Position List. Identical to positions() except in name. * @return PositionListManager instance. */ - public PositionListManager getPositionListManager(); + PositionListManager getPositionListManager(); /** * Provides access to the QuickAccessManager for accessing the Quick-Access * Panel system. * @return QuickAccessManager instance. */ - public QuickAccessManager quickAccess(); + QuickAccessManager quickAccess(); /** * Provides access to the QuickAccessManager for accessing the Quick-Access * Panel system. Identical to quickAccess() except in name. * @return QuickAccessManager instance. */ - public QuickAccessManager getQuickAccessManager(); + QuickAccessManager getQuickAccessManager(); /** * Provides access to the ShutterManager for controlling the shutter state. * @return ShutterManager instance. */ - public ShutterManager shutter(); + ShutterManager shutter(); /** * Provides access to the ShutterManager for controlling the shutter state. * Identical to shutter() except in name. * @return ShutterManager instance. */ - public ShutterManager getShutterManager(); + ShutterManager getShutterManager(); /** * Provides access to the application API for controlling and updating the * GUI. * @return Application instance. */ - public Application app(); + Application app(); /** * Provides access to the application API for controlling and updating the * GUI. Identical to app() except in name. * @return Application instance. */ - public Application getApplication(); + Application getApplication(); + + /** + * Provides access to the PropertyManagerAPI. Provides access to the + * PropertyMap.Builder + * @return PropertyManager instance + */ + PropertyManager properties(); + + /** + * Provides access to the PropertyManagerAPI. Provides access to the + * PropertyMap.Builder + * @return PropertyManager instance + */ + PropertyManager getPropertyManager(); } diff --git a/mmstudio/src/main/java/org/micromanager/UserProfile.java b/mmstudio/src/main/java/org/micromanager/UserProfile.java index 775207619f..3466bab332 100644 --- a/mmstudio/src/main/java/org/micromanager/UserProfile.java +++ b/mmstudio/src/main/java/org/micromanager/UserProfile.java @@ -46,7 +46,7 @@ public interface UserProfile { * Return the name of this profile as displayed to the user * @return the profile name */ - public String getProfileName(); + String getProfileName(); /** * Get an interface to save and retrieve settings. @@ -56,76 +56,76 @@ public interface UserProfile { * @param owner the class that "owns" the settings * @return an object allowing settings to be set and retrieved */ - public MutablePropertyMapView getSettings(Class> owner); + MutablePropertyMapView getSettings(Class> owner); /** * Reset this user profile, deleting all settings. *
* Do not confuse with {@code getSettings(owner).clear()}!
*/
- public void clearSettingsForAllClasses();
+ void clearSettingsForAllClasses();
// Old methods with weird types
/** @deprecated use {@code getSettings(c).getString(key, fallback)} instead */
@Deprecated
- public String getString(Class> c, String key, String fallback);
+ String getString(Class> c, String key, String fallback);
/** @deprecated use {@code getSettings(c).getStringList(key, fallback)} instead */
@Deprecated
- public String[] getStringArray(Class> c, String key, String[] fallback);
+ String[] getStringArray(Class> c, String key, String[] fallback);
/** @deprecated use {@code getSettings(c).putString(key, value)} instead */
@Deprecated
- public void setString(Class> c, String key, String value);
+ void setString(Class> c, String key, String value);
/** @deprecated use {@code getSettings(c).putStringList(key, value)} instead */
@Deprecated
- public void setStringArray(Class> c, String key, String[] value);
+ void setStringArray(Class> c, String key, String[] value);
/** @deprecated use {@code getSettings(c).getInteger(key, fallback)} instead */
@Deprecated
- public Integer getInt(Class> c, String key, Integer fallback);
+ Integer getInt(Class> c, String key, Integer fallback);
/** @deprecated use {@code getSettings(c).getIntegerList(key, fallback)} instead */
@Deprecated
- public Integer[] getIntArray(Class> c, String key, Integer[] fallback);
+ Integer[] getIntArray(Class> c, String key, Integer[] fallback);
/** @deprecated use {@code getSettings(c).putInteger(key, value)} instead */
@Deprecated
- public void setInt(Class> c, String key, Integer value);
+ void setInt(Class> c, String key, Integer value);
/** @deprecated use {@code getSettings(c).putIntegerList(key, value)} instead */
@Deprecated
- public void setIntArray(Class> c, String key, Integer[] value);
+ void setIntArray(Class> c, String key, Integer[] value);
/** @deprecated use {@code getSettings(c).getLong(key, fallback)} instead */
@Deprecated
- public Long getLong(Class> c, String key, Long fallback);
+ Long getLong(Class> c, String key, Long fallback);
/** @deprecated use {@code getSettings(c).getLongList(key, fallback)} instead */
@Deprecated
- public Long[] getLongArray(Class> c, String key, Long[] fallback);
+ Long[] getLongArray(Class> c, String key, Long[] fallback);
/** @deprecated use {@code getSettings(c).putLong(key, value)} instead */
@Deprecated
- public void setLong(Class> c, String key, Long value);
+ void setLong(Class> c, String key, Long value);
/** @deprecated use {@code getSettings(c).putLongList(key, value)} instead */
@Deprecated
- public void setLongArray(Class> c, String key, Long[] value);
+ void setLongArray(Class> c, String key, Long[] value);
/** @deprecated use {@code getSettings(c).getDouble(key, fallback)} instead */
@Deprecated
- public Double getDouble(Class> c, String key, Double fallback);
+ Double getDouble(Class> c, String key, Double fallback);
/** @deprecated use {@code getSettings(c).getDoubleList(key, fallback)} instead */
@Deprecated
- public Double[] getDoubleArray(Class> c, String key, Double[] fallback);
+ Double[] getDoubleArray(Class> c, String key, Double[] fallback);
/** @deprecated use {@code getSettings(c).putDouble(key, value)} instead */
@Deprecated
- public void setDouble(Class> c, String key, Double value);
+ void setDouble(Class> c, String key, Double value);
/** @deprecated use {@code getSettings(c).putDoubleList(key, value)} instead */
@Deprecated
- public void setDoubleArray(Class> c, String key, Double[] value);
+ void setDoubleArray(Class> c, String key, Double[] value);
/** @deprecated use {@code getSettings(c).getBoolean(key, fallback)} instead */
@Deprecated
- public Boolean getBoolean(Class> c, String key, Boolean fallback);
+ Boolean getBoolean(Class> c, String key, Boolean fallback);
/** @deprecated use {@code getSettings(c).getBooleanList(key, fallback)} instead */
@Deprecated
- public Boolean[] getBooleanArray(Class> c, String key, Boolean[] fallback);
+ Boolean[] getBooleanArray(Class> c, String key, Boolean[] fallback);
/** @deprecated use {@code getSettings(c).putBoolean(key, value)} instead */
@Deprecated
- public void setBoolean(Class> c, String key, Boolean value);
+ void setBoolean(Class> c, String key, Boolean value);
/** @deprecated use {@code getSettings(c).putBooleanList(key, value)} instead */
@Deprecated
- public void setBooleanArray(Class> c, String key, Boolean[] value);
+ void setBooleanArray(Class> c, String key, Boolean[] value);
}
\ No newline at end of file
diff --git a/mmstudio/src/main/java/org/micromanager/acquisition/AcquisitionManager.java b/mmstudio/src/main/java/org/micromanager/acquisition/AcquisitionManager.java
index 1125d0b919..d68e220b3c 100644
--- a/mmstudio/src/main/java/org/micromanager/acquisition/AcquisitionManager.java
+++ b/mmstudio/src/main/java/org/micromanager/acquisition/AcquisitionManager.java
@@ -40,13 +40,13 @@ public interface AcquisitionManager {
* Provides an empty Sequence Settings Builder
*
*/
- SequenceSettings.Builder getSequenceSettingsBuilder();
+ SequenceSettings.Builder sequenceSettingsBuilder();
/**
* Provides and empty ChannelSpec Builder
*
*/
- ChannelSpec.Builder getChannelSpecBuilder();
+ ChannelSpec.Builder channelSpecBuilder();
/**
* Executes Acquisition with settings as in the MDA dialog.
diff --git a/mmstudio/src/main/java/org/micromanager/acquisition/SequenceSettings.java b/mmstudio/src/main/java/org/micromanager/acquisition/SequenceSettings.java
index 31cd498acb..ef622e9fc8 100644
--- a/mmstudio/src/main/java/org/micromanager/acquisition/SequenceSettings.java
+++ b/mmstudio/src/main/java/org/micromanager/acquisition/SequenceSettings.java
@@ -383,6 +383,7 @@ public SequenceSettings copy() {
* Default constructor needed since we have a copy constructor
* @deprecated use Builder instead
*/
+ @Deprecated
private SequenceSettings() {
}
@@ -414,7 +415,7 @@ private SequenceSettings() {
/**
* Time intervals between the starts of time points in milliseconds
*/
- public ArrayList