public interface DisplayWindow extends DataViewer, java.io.Closeable
DataViewer
instead.Modifier and Type | Method and Description |
---|---|
void |
addOverlay(Overlay overlay)
Add a graphical overlay.
|
void |
adjustZoom(double factor)
Multiply the current zoom ratio of the image canvas by the provided
factor.
|
void |
autostretch()
Perform a one-shot autoscaling of intensities.
|
void |
close()
Close this display window unconditionally.
|
void |
displayStatusString(java.lang.String status)
Display a custom string in the window.
|
DisplayWindow |
duplicate()
Create a new display window for the same data provider as this one.
|
java.awt.Window |
getAsWindow()
Deprecated.
use
getWindow() instead |
ij.ImagePlus |
getImagePlus()
Deprecated.
Directly accessing the
ImagePlus of an MMStudio
display window will generally result in very fragile code. Consider
accessing image data through DataViewer.getDataProvider() . For drawing
overlay graphics, see addOverlay(org.micromanager.display.overlay.Overlay) . |
double |
getMagnification()
Deprecated.
use
getZoom() instead |
java.util.List<Overlay> |
getOverlays()
Get the overlays attached to this display.
|
java.awt.Window |
getWindow()
Get the
java.awt.Window used for this image display. |
double |
getZoom()
Get the current zoom ratio of the display.
|
boolean |
isFullScreen()
Tell whether full screen mode is currently enabled.
|
void |
removeOverlay(Overlay overlay)
Remove a graphical overlay.
|
boolean |
requestToClose()
Close this display window, giving its owner a chance to cancel closing.
|
void |
setCustomTitle(java.lang.String title)
Add a custom extra string to the title of this display.
|
void |
setFullScreen(boolean enable)
Enable or disable full screen mode.
|
void |
setMagnification(double ratio)
Deprecated.
use
setZoom(double) instead |
void |
setZoom(double ratio)
Set the zoom ratio for this display.
|
void |
show()
DisplayWindows are not shown by default.
|
void |
toFront()
Raise this display window to the front.
|
void |
toggleFullScreen()
Deprecated.
use
setFullScreen(boolean) instead |
addListener, compareAndSetDisplayPosition, compareAndSetDisplayPosition, compareAndSetDisplaySettings, getDataProvider, getDatastore, getDisplayedImages, getDisplayPosition, getDisplaySettings, getName, isClosed, isVisible, registerForEvents, removeListener, setDisplayedImageTo, setDisplayPosition, setDisplayPosition, setDisplaySettings, unregisterForEvents
void displayStatusString(java.lang.String status)
status
- String to display in the window.double getZoom()
@Deprecated double getMagnification()
getZoom()
insteadgetZoom()
.void setZoom(double ratio)
ratio
- zoom ratio to set (1.0 = actual size)@Deprecated void setMagnification(double ratio)
setZoom(double)
insteadsetZoom(double)
.ratio
- void adjustZoom(double factor)
setZoom(factor * getZoom())
if called on
the Swing/AWT event dispatch thread.
Calls are ignored if the display has closed.
This method can be called from any thread. However, you should call it
from the Swing/AWT event dispatch thread if you want to correctly
synchronize with other user interface changes.factor
- the factor to zoom in byvoid autostretch()
void addOverlay(Overlay overlay)
overlay
- the overlay to addjava.lang.NullPointerException
- if overlay
is nullremoveOverlay(org.micromanager.display.overlay.Overlay)
,
getOverlays()
void removeOverlay(Overlay overlay)
overlay
- the overlay to removeaddOverlay(org.micromanager.display.overlay.Overlay)
java.util.List<Overlay> getOverlays()
addOverlay(org.micromanager.display.overlay.Overlay)
@Deprecated ij.ImagePlus getImagePlus()
ImagePlus
of an MMStudio
display window will generally result in very fragile code. Consider
accessing image data through DataViewer.getDataProvider()
. For drawing
overlay graphics, see addOverlay(org.micromanager.display.overlay.Overlay)
.ImagePlus
object used by the display window.
Note that the ImagePlus
may be replaced with a new one during the
lifetime of the display window.
It is recommended that this method be called on the Swing/AWT event
dispatch thread. If you call it from another thread, make sure that your
thread is not obstructing the event dispatch thread (i.e. the event
dispatch thread is not waiting for your thread to finish something).ImagePlus
used by the window, which may be a
CompositeImage
, or null
if none has been created or if
the display has closed.boolean requestToClose()
void close()
close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable
void setFullScreen(boolean enable)
enable
- whether to enable or disable full screen modeboolean isFullScreen()
false
if the
display has closed@Deprecated void toggleFullScreen()
setFullScreen(boolean)
insteadDisplayWindow duplicate()
void toFront()
java.awt.Window getWindow() throws java.lang.IllegalStateException
java.awt.Window
used for this image display.
You should not access the contents of the returned window, but you can
set its on-screen position and size, etc.
If the display is in full screen mode, this method returns the original
(hidden) window, not the window used for full-screen display.
It is recommended that this method be called on the Swing/AWT event
dispatch thread. If you call it from another thread, make sure that your
thread is not obstructing the event dispatch thread (i.e. the event
dispatch thread is not waiting for your thread to finish something).java.awt.Window
used by this image displayjava.lang.IllegalStateException
- if the display has closed@Deprecated java.awt.Window getAsWindow()
getWindow()
insteadjava.awt.Window
used for this image display.java.awt.Window
used by this image display, or
null
if the display has been closedvoid setCustomTitle(java.lang.String title)
DataViewer.getName()
returns.
Calls are ignored if the display has closed.
This method can be called from any thread.title
- a custom window title, or null
to revert to the
defaultvoid show()