public class ImageView extends Object implements MonitorView
MonitorView.
The background image fills layer zero. Its size determines the preferred size of the view. Minimum and maximum sizes supplied determine minimum and maximum sizes of the panel. When the panel is resized, the background image is scaled.
The addImage(...), addComponent(...), addView(...) methods
can be used to add extra images, components, and monitoring data views to other layers.
The requirement that components in the same layer do not overlap adds an extra constraint to
the minimum size of the panel. There are two versions of these methods,
for images and components that should and should not scale when the page is resized.
All content should be added before the getPanel() method is called.
| Modifier and Type | Class and Description |
|---|---|
static class |
ImageView.Item |
static class |
ImageView.MEvent |
static interface |
ImageView.MListener |
| Modifier and Type | Field and Description |
|---|---|
static float |
MAX_SCALE |
static float |
MIN_SCALE |
CATEGORY| Constructor and Description |
|---|
ImageView(String name,
BufferedImage image) |
ImageView(String name,
BufferedImage image,
Dimension minSize,
Dimension maxSize) |
ImageView(String name,
BufferedImage image,
double minScale,
double maxScale) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(ImageView.Item item) |
void |
addMouseListener(ImageView.MListener listener) |
AgentChannelsFilter |
getFilter()
Returns
null since there is no filter associated with an image-based view. |
String |
getName()
Returns the name of this view.
|
JComponent |
getPanel()
Returns the graphical component maintained by this view.
|
void |
install()
Installs this view, connecting it to the data source.
|
static void |
main(String[] args) |
void |
setFilter(AgentChannelsFilter filter)
Does nothing since there is no filter associated with an image-based view.
|
void |
setName(String name)
Sets the name of this view.
|
void |
uninstall()
Uninstalls this view, disconnecting it from the data source.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFormater, isEmpty, setFormatterconfigure, connect, disconnect, statusChangedpublic static final float MAX_SCALE
public static final float MIN_SCALE
public ImageView(String name, BufferedImage image)
public ImageView(String name, BufferedImage image, double minScale, double maxScale)
public ImageView(String name, BufferedImage image, Dimension minSize, Dimension maxSize)
public void add(ImageView.Item item)
public void addMouseListener(ImageView.MListener listener)
public String getName()
MonitorViewgetName in interface MonitorViewpublic void setName(String name)
MonitorViewsetName in interface MonitorViewname - View name.public JComponent getPanel()
MonitorViewgetPanel in interface MonitorViewpublic AgentChannelsFilter getFilter()
null since there is no filter associated with an image-based view.getFilter in interface MonitorViewpublic void setFilter(AgentChannelsFilter filter)
setFilter in interface MonitorViewfilter - Filter to ignore.public void install()
MonitorViewinstall in interface MonitorViewpublic void uninstall()
MonitorViewuninstall in interface MonitorViewpublic static void main(String[] args)
Copyright © 2023 LSST. All rights reserved.