public class ProductSceneView extends BasicView implements com.bc.ceres.swing.figure.FigureEditorAware, ProductNodeView, PropertyMapChangeListener, PixelInfoFactory, org.esa.beam.glayer.ProductLayerContext, com.bc.ceres.grender.ViewportAware
ProductSceneView
is a high-level image display component for color index/RGB images created
from one or more raster datasets of a data product.
It is also capable of displaying a graticule (geographical grid) and a ROI associated with a displayed raster dataset.
Modifier and Type | Class and Description |
---|---|
static class |
ProductSceneView.RGBChannel
A band that is used as an RGB channel for RGB image views.
|
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
static String |
BASE_IMAGE_LAYER_ID |
static String |
BITMASK_LAYER_ID
Deprecated.
since BEAM 4.7
|
static Color |
DEFAULT_IMAGE_BACKGROUND_COLOR |
static int |
DEFAULT_IMAGE_VIEW_BORDER_SIZE |
static String |
FIGURE_LAYER_ID
Deprecated.
since BEAM 4.7
|
static String |
GCP_LAYER_ID
Deprecated.
since BEAM 4.7
|
static String |
GRATICULE_LAYER_ID |
static String |
MASKS_LAYER_ID |
static String |
NO_DATA_LAYER_ID |
static String |
PIN_LAYER_ID
Deprecated.
since BEAM 4.7
|
static String |
PROPERTY_KEY_GRAPHICS_ANTIALIASING
Property name for antialiased graphics drawing
|
static String |
PROPERTY_KEY_IMAGE_INTERPOLATION
Property name for antialiased graphics drawing
|
static String |
PROPERTY_KEY_IMAGE_NAV_CONTROL_SHOWN
Name of property which switches display of af a navigataion control in the image view.
|
static String |
PROPERTY_KEY_IMAGE_SCROLL_BARS_SHOWN
Name of property which switches display of af a navigataion control in the image view.
|
static String |
PROPERTY_KEY_PIXEL_BORDER_SHOWN
Property name for the pixel border
|
static String |
PROPERTY_NAME_IMAGE_INFO
Name of property of image info
|
static String |
PROPERTY_NAME_SELECTED_LAYER
Name of property of selected layer
|
static String |
PROPERTY_NAME_SELECTED_PIN
Name of property of selected pin
|
static String |
ROI_LAYER_ID
Deprecated.
since BEAM 4.7
|
static String |
VECTOR_DATA_LAYER_ID |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
ProductSceneView(ProductSceneImage sceneImage) |
Modifier and Type | Method and Description |
---|---|
void |
addPixelPositionListener(PixelPositionListener listener)
Adds a new pixel position listener to this image display component.
|
boolean |
areScrollBarsShown() |
protected void |
copyPixelInfoStringToClipboard() |
String |
createPixelInfoString(int pixelX,
int pixelY)
Creates a string containing all available information at the given pixel position.
|
JPopupMenu |
createPopupMenu(Component component)
Creates the popup menu for the given component.
|
JPopupMenu |
createPopupMenu(MouseEvent event)
Creates the popup menu for the given mouse event.
|
void |
dispose()
Releases all of the resources used by this object instance and all of its owned children.
|
protected void |
disposeImageDisplayComponent() |
void |
disposeLayers() |
com.bc.ceres.glayer.support.ImageLayer |
getBaseImageLayer() |
AffineTransform |
getBaseImageToViewTransform() |
Object |
getCoordinateReferenceSystem()
The coordinate reference system (CRS) used by all the layers in this context.
|
int |
getCurrentPixelX() |
int |
getCurrentPixelY() |
com.bc.ceres.swing.figure.ShapeFigure |
getCurrentShapeFigure() |
SimpleFeatureFigure[] |
getFeatureFigures(boolean selectedOnly)
Gets either the selected figures, or all the figures of the currently selected layer.
|
com.bc.ceres.swing.figure.FigureEditor |
getFigureEditor() |
int |
getFirstImageLayerIndex() |
ImageInfo |
getImageInfo() |
com.bc.ceres.glayer.swing.LayerCanvas |
getLayerCanvas() |
com.bc.ceres.glayer.LayerContext |
getLayerContext()
Deprecated.
since BEAM 4.7
|
Rectangle2D |
getModelBounds() |
int |
getNumRasters()
Gets the number of raster datasets.
|
double |
getOrientation() |
Dimension |
getPreferredSize()
If the
preferredSize has been set to a
non-null value just returns it. |
Product |
getProduct()
Returns the product provided by this context.
|
RasterDataNode |
getRaster()
Gets the product raster of a single banded view.
|
RasterDataNode |
getRaster(int index)
Gets the product raster with the specified index.
|
RasterDataNode[] |
getRasters()
Gets all rasters of this view.
|
com.bc.ceres.glayer.Layer |
getRootLayer() |
String |
getSceneName() |
SimpleFeatureFigure |
getSelectedFeatureFigure() |
SimpleFeatureFigure[] |
getSelectedFeatureFigures()
Deprecated.
since BEAM 4.10, use
getFeatureFigures(boolean) instead |
Placemark[] |
getSelectedGcps() |
com.bc.ceres.glayer.Layer |
getSelectedLayer() |
Placemark |
getSelectedPin() |
Placemark[] |
getSelectedPins() |
com.bc.ceres.swing.selection.SelectionContext |
getSelectionContext()
Gets the current selection context, if any.
|
com.bc.ceres.swing.undo.UndoContext |
getUndoContext() |
com.bc.ceres.glayer.Layer |
getVectorDataCollectionLayer(boolean create) |
com.bc.ceres.grender.Viewport |
getViewport() |
Rectangle |
getVisibleImageBounds() |
Rectangle2D |
getVisibleModelBounds() |
ProductNode |
getVisibleProductNode()
Returns the currently visible product node.
|
double |
getZoomFactor() |
boolean |
isCurrentPixelPosValid() |
boolean |
isGcpOverlayEnabled() |
boolean |
isGcpSelected(Placemark gcp) |
boolean |
isGraticuleOverlayEnabled() |
boolean |
isMaskOverlayEnabled() |
boolean |
isNoDataOverlayEnabled() |
boolean |
isPinOverlayEnabled() |
boolean |
isPinSelected(Placemark pin) |
boolean |
isRGB() |
void |
propertyMapChanged(PropertyMap propertyMap)
Called if the property map changed.
|
void |
removePixelPositionListener(PixelPositionListener listener)
Removes a pixel position listener from this image display component.
|
void |
selectGcps(Placemark[] gpcs) |
void |
selectPins(Placemark[] pins) |
boolean |
selectPlacemarks(PlacemarkGroup placemarkGroup,
Placemark[] placemarks) |
VectorDataLayer |
selectVectorDataLayer(VectorDataNode vectorDataNode) |
void |
setGcpOverlayEnabled(boolean enabled) |
void |
setGraticuleOverlayEnabled(boolean enabled) |
void |
setImageInfo(ImageInfo imageInfo) |
void |
setLayerProperties(PropertyMap configuration)
Called after VISAT preferences have changed.
|
void |
setLayersVisible(VectorDataNode... vectorDataNodes) |
void |
setMaskOverlayEnabled(boolean enabled) |
void |
setNoDataOverlayEnabled(boolean enabled) |
void |
setPinOverlayEnabled(boolean enabled) |
void |
setRasters(RasterDataNode[] rasters) |
void |
setScrollBarsShown(boolean scrollBarsShown) |
void |
setSelectedLayer(com.bc.ceres.glayer.Layer layer) |
void |
synchronizeViewport(ProductSceneView otherView)
Deprecated.
since BEAM 4.10
|
boolean |
synchronizeViewportIfPossible(ProductSceneView thatView) |
void |
updateImage() |
void |
updateNoDataImage() |
void |
zoom(double x,
double y,
double viewScale) |
void |
zoom(Rectangle2D modelRect) |
getCommandUIFactory, setCommandUIFactory
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBounds
public static final String BASE_IMAGE_LAYER_ID
public static final String NO_DATA_LAYER_ID
public static final String VECTOR_DATA_LAYER_ID
public static final String MASKS_LAYER_ID
public static final String GRATICULE_LAYER_ID
@Deprecated public static final String BITMASK_LAYER_ID
@Deprecated public static final String ROI_LAYER_ID
@Deprecated public static final String GCP_LAYER_ID
@Deprecated public static final String PIN_LAYER_ID
@Deprecated public static final String FIGURE_LAYER_ID
public static final String PROPERTY_KEY_PIXEL_BORDER_SHOWN
public static final String PROPERTY_KEY_GRAPHICS_ANTIALIASING
public static final String PROPERTY_KEY_IMAGE_INTERPOLATION
public static final String PROPERTY_KEY_IMAGE_NAV_CONTROL_SHOWN
public static final String PROPERTY_KEY_IMAGE_SCROLL_BARS_SHOWN
public static final String PROPERTY_NAME_IMAGE_INFO
public static final String PROPERTY_NAME_SELECTED_LAYER
public static final String PROPERTY_NAME_SELECTED_PIN
public static final Color DEFAULT_IMAGE_BACKGROUND_COLOR
public static final int DEFAULT_IMAGE_VIEW_BORDER_SIZE
public ProductSceneView(ProductSceneImage sceneImage)
public com.bc.ceres.swing.undo.UndoContext getUndoContext()
public com.bc.ceres.swing.figure.FigureEditor getFigureEditor()
getFigureEditor
in interface com.bc.ceres.swing.figure.FigureEditorAware
public com.bc.ceres.grender.Viewport getViewport()
getViewport
in interface com.bc.ceres.grender.ViewportAware
public int getCurrentPixelX()
public int getCurrentPixelY()
public boolean isCurrentPixelPosValid()
public com.bc.ceres.swing.selection.SelectionContext getSelectionContext()
getSelectionContext
in class BasicView
null
if none exists.public com.bc.ceres.glayer.Layer getRootLayer()
getRootLayer
in interface com.bc.ceres.glayer.LayerContext
public Object getCoordinateReferenceSystem()
LayerType
in order to decide whether
the source can provide a new layer instance for this context.getCoordinateReferenceSystem
in interface com.bc.ceres.glayer.LayerContext
null
.@Deprecated public com.bc.ceres.glayer.LayerContext getLayerContext()
public com.bc.ceres.glayer.swing.LayerCanvas getLayerCanvas()
public ProductNode getVisibleProductNode()
getVisibleProductNode
in interface ProductNodeView
public String createPixelInfoString(int pixelX, int pixelY)
createPixelInfoString
in interface PixelInfoFactory
pixelX
- the pixel X co-ordinatepixelY
- the pixel Y co-ordinatepublic void propertyMapChanged(PropertyMap propertyMap)
setLayerProperties(org.esa.beam.util.PropertyMap)
.propertyMapChanged
in interface PropertyMapChangeListener
public Dimension getPreferredSize()
preferredSize
has been set to a
non-null
value just returns it.
If the UI delegate's getPreferredSize
method returns a non null
value then return that;
otherwise defer to the component's layout manager.getPreferredSize
in class JComponent
preferredSize
propertyJComponent.setPreferredSize(java.awt.Dimension)
,
ComponentUI
public JPopupMenu createPopupMenu(Component component)
PopupMenuFactory
PopupMenuHandler
registered on the given component.createPopupMenu
in interface PopupMenuFactory
component
- the source componentPopupMenuFactory
,
PopupMenuHandler
public JPopupMenu createPopupMenu(MouseEvent event)
PopupMenuFactory
PopupMenuHandler
registered on the event fired component.createPopupMenu
in interface PopupMenuFactory
event
- the fired mouse eventPopupMenuFactory
,
PopupMenuHandler
public void dispose()
This method should be called only if it is for sure that this object instance will never be used again. The
results of referencing an instance of this class after a call to dispose()
are undefined.
Overrides of this method should always call super.dispose();
after disposing this instance.
dispose
in interface Disposable
dispose
in interface ProductNodeView
dispose
in class BasicView
public Product getProduct()
org.esa.beam.glayer.ProductLayerContext
getProduct
in interface org.esa.beam.glayer.ProductLayerContext
public String getSceneName()
public ImageInfo getImageInfo()
public void setImageInfo(ImageInfo imageInfo)
public int getNumRasters()
1
for single banded palette images or 3
for RGB imagespublic RasterDataNode getRaster(int index)
index
- the zero-based product raster indexpublic RasterDataNode getRaster()
null
if this is a 3-banded RGB viewpublic RasterDataNode[] getRasters()
public void setRasters(RasterDataNode[] rasters)
public boolean isRGB()
public boolean isNoDataOverlayEnabled()
public void setNoDataOverlayEnabled(boolean enabled)
public com.bc.ceres.glayer.support.ImageLayer getBaseImageLayer()
public boolean isGraticuleOverlayEnabled()
public void setGraticuleOverlayEnabled(boolean enabled)
public boolean isPinOverlayEnabled()
public void setPinOverlayEnabled(boolean enabled)
public boolean isGcpOverlayEnabled()
public void setGcpOverlayEnabled(boolean enabled)
public boolean isMaskOverlayEnabled()
public void setMaskOverlayEnabled(boolean enabled)
public void setLayersVisible(VectorDataNode... vectorDataNodes)
vectorDataNodes
- The vector data nodes whose layer shall be made visible.public com.bc.ceres.swing.figure.ShapeFigure getCurrentShapeFigure()
public boolean areScrollBarsShown()
public void setScrollBarsShown(boolean scrollBarsShown)
public void setLayerProperties(PropertyMap configuration)
configuration
- the configuration.public final void addPixelPositionListener(PixelPositionListener listener)
listener
- the pixel position listener to be addedpublic final void removePixelPositionListener(PixelPositionListener listener)
listener
- the pixel position listener to be removedpublic com.bc.ceres.glayer.Layer getSelectedLayer()
public void setSelectedLayer(com.bc.ceres.glayer.Layer layer)
public VectorDataLayer selectVectorDataLayer(VectorDataNode vectorDataNode)
vectorDataNode
- The vector data node, whose layer shall be selected.null
.public boolean isPinSelected(Placemark pin)
pin
- The pins to test.true
, if the pin is selected.public boolean isGcpSelected(Placemark gcp)
gcp
- The ground control point to test.true
, if the ground control point is selected.public Placemark getSelectedPin()
public Placemark[] getSelectedPins()
public Placemark[] getSelectedGcps()
public void selectPins(Placemark[] pins)
pins
- The selected pins.public void selectGcps(Placemark[] gpcs)
gpcs
- The selected ground control points.public SimpleFeatureFigure getSelectedFeatureFigure()
public SimpleFeatureFigure[] getSelectedFeatureFigures()
getFeatureFigures(boolean)
insteadpublic SimpleFeatureFigure[] getFeatureFigures(boolean selectedOnly)
selectedOnly
- If true
, only selected figures are returned.public boolean selectPlacemarks(PlacemarkGroup placemarkGroup, Placemark[] placemarks)
public void disposeLayers()
public AffineTransform getBaseImageToViewTransform()
public Rectangle getVisibleImageBounds()
public Rectangle2D getVisibleModelBounds()
public Rectangle2D getModelBounds()
public double getOrientation()
public double getZoomFactor()
public void zoom(Rectangle2D modelRect)
public void zoom(double x, double y, double viewScale)
@Deprecated public void synchronizeViewport(ProductSceneView otherView)
public boolean synchronizeViewportIfPossible(ProductSceneView thatView)
protected void copyPixelInfoStringToClipboard()
protected void disposeImageDisplayComponent()
public void updateImage()
public void updateNoDataImage()
public int getFirstImageLayerIndex()
public com.bc.ceres.glayer.Layer getVectorDataCollectionLayer(boolean create)
Copyright © 2002–2014 Brockmann Consult GmbH. All rights reserved.