Class WidgetPlugin
java.lang.Object
org.micromanager.quickaccess.QuickAccessPlugin
org.micromanager.quickaccess.WidgetPlugin
- All Implemented Interfaces:
MMGenericPlugin, MMPlugin, org.scijava.plugin.SciJavaPlugin
This plugin allows arbitrary controls ("widgets") to be included in the
Quick-Access Window. It gives you the maximum control over how your control
will appear and behave. However, it also requires you to implement the most
logic.
-
Field Summary
FieldsFields inherited from class QuickAccessPlugin
CELL_HEIGHT, CELL_WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract PropertyMapconfigureControl(Frame parent) Generate configuration information that can be used to configure a control generated by this plugin.abstract JComponentcreateControl(PropertyMap config) Create the GUI components for this control.booleanReturns true if the widget can accept custom icons (i.e.getSize()Return the dimensionality of the widget, in cells.Methods inherited from class QuickAccessPlugin
getIcon, getPaddedCellSizeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MMPlugin
getCopyright, getHelpText, getName, getVersion, setContext
-
Field Details
-
CUSTOM_ICON_STRING
Key used for custom icon information. If your plugin returns true in getCanCustomizeIcon(), then there may be a property, in the PropertyMap passed to createControl(), under this key. You should not need to read or modify this property; just pass your config to QuickAccessManager.getCustomIcon() to get the customized icon the user has requested.- See Also:
-
-
Constructor Details
-
WidgetPlugin
public WidgetPlugin()
-
-
Method Details
-
createControl
Create the GUI components for this control.- Parameters:
config- A PropertyMap as output by configureControl used to configure this control. The PropertyMap may be empty or may be preserved from a previous session.
-
configureControl
Generate configuration information that can be used to configure a control generated by this plugin. This method is expected to block the Event Dispatch Thread (EDT) -- thus, any configuration UI should be modal. It is also only ever called from the EDT. If for any reason the control should not be created (for example, because the user canceled a dialog during configuration), then this method must return null.- Parameters:
parent- The Quick-Access Window- Returns:
- A PropertyMap containing the information needed to generate the control, or null if the control should not be created.
-
getSize
Return the dimensionality of the widget, in cells. For example, a value of 2x1 here would indicate a widget that is 2 cells wide and 1 tall. The size of a single cell is the CELL_WIDTH and CELL_HEIGHT values in QuickAccessPlugin. -
getCanCustomizeIcon
public boolean getCanCustomizeIcon()Returns true if the widget can accept custom icons (i.e. the setIcon() method actually does something). This will allow users to provide their own icons for individual instances of the widget.
-