public final class ImageViewerDialog extends ToggleDialog implements MapView.LayerChangeListener
Modifier and Type | Class and Description |
---|---|
(package private) class |
ImageViewerDialog.ImageAction |
ToggleDialog.ButtonHidingType, ToggleDialog.TitleBar, ToggleDialog.ToggleDialogAction
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
private javax.swing.JButton |
btnCollapse |
private javax.swing.JButton |
btnNext |
private javax.swing.JButton |
btnPrevious |
private boolean |
centerView |
private boolean |
collapseButtonClicked |
private static java.lang.String |
COMMAND_CENTERVIEW |
private static java.lang.String |
COMMAND_COLLAPSE |
private static java.lang.String |
COMMAND_COPY_PATH |
private static java.lang.String |
COMMAND_FIRST |
private static java.lang.String |
COMMAND_LAST |
private static java.lang.String |
COMMAND_NEXT |
private static java.lang.String |
COMMAND_PREVIOUS |
private static java.lang.String |
COMMAND_REMOVE |
private static java.lang.String |
COMMAND_REMOVE_FROM_DISK |
private static java.lang.String |
COMMAND_ZOOM |
private ImageEntry |
currentEntry |
private GeoImageLayer |
currentLayer |
private static ImageViewerDialog |
dialog |
private ImageDisplay |
imgDisplay |
private javax.swing.JToggleButton |
tbCentre |
button, buttonHiding, detachedDialog, dialogsPanel, isCollapsed, isDocked, isShowing, name, preferenceClass, preferencePrefix, PROP_DYNAMIC_BUTTONS, titleBar, toggleAction, windowMenuItem
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Modifier | Constructor and Description |
---|---|
private |
ImageViewerDialog() |
Modifier and Type | Method and Description |
---|---|
void |
activeLayerChange(Layer oldLayer,
Layer newLayer)
Notifies this listener that the active layer has changed.
|
protected void |
build() |
void |
destroy()
Called when the object has been destroyed.
|
void |
displayImage(GeoImageLayer layer,
ImageEntry entry) |
protected boolean |
dockWhenClosingDetachedDlg()
When an image is closed, really close it and do not pop
up the side dialog.
|
static ImageEntry |
getCurrentImage()
Returns the currently displayed image.
|
static GeoImageLayer |
getCurrentLayer()
Returns the layer associated with the image.
|
static ImageViewerDialog |
getInstance()
Replies the unique instance of this dialog
|
boolean |
hasImage()
Returns whether an image is currently displayed
|
void |
layerAdded(Layer newLayer)
Notifies this listener that a layer has been added.
|
void |
layerRemoved(Layer oldLayer)
Notifies this listener that a layer has been removed.
|
(package private) static void |
newInstance() |
static boolean |
setCentreEnabled(boolean value)
Enables (or disables) the "Center view" button.
|
static void |
setNextEnabled(boolean value)
Enables (or disables) the "Next" button.
|
static void |
setPreviousEnabled(boolean value)
Enables (or disables) the "Previous" button.
|
static void |
showImage(GeoImageLayer layer,
ImageEntry entry) |
protected void |
stateChanged()
primitive stateChangedListener for subclasses
|
buttonHidden, buttonShown, closeDetachedDialog, collapse, createLayout, createLayout, detach, dock, eventDispatched, expand, getButton, getDefaultDetachedSize, getName, getPreferencePrefix, getPreferredHeight, getToggleAction, helpTopic, hideDialog, hideNotify, isDialogInCollapsedView, isDialogInDefaultView, isDialogShowing, preferenceChanged, setButton, setContentVisible, setDialogsPanel, setIsButtonHiding, setIsCollapsed, setIsDocked, setIsShowing, setTitle, showDialog, showNotify, toggleButtonHook, toString, unfurlDialog
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, getPreferredSize, 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, 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, transferFocus, transferFocusBackward, transferFocusUpCycle
private static final java.lang.String COMMAND_ZOOM
private static final java.lang.String COMMAND_CENTERVIEW
private static final java.lang.String COMMAND_NEXT
private static final java.lang.String COMMAND_REMOVE
private static final java.lang.String COMMAND_REMOVE_FROM_DISK
private static final java.lang.String COMMAND_PREVIOUS
private static final java.lang.String COMMAND_COLLAPSE
private static final java.lang.String COMMAND_FIRST
private static final java.lang.String COMMAND_LAST
private static final java.lang.String COMMAND_COPY_PATH
private final ImageDisplay imgDisplay
private boolean centerView
private static volatile ImageViewerDialog dialog
private boolean collapseButtonClicked
private javax.swing.JButton btnNext
private javax.swing.JButton btnPrevious
private javax.swing.JButton btnCollapse
private javax.swing.JToggleButton tbCentre
private transient GeoImageLayer currentLayer
private transient ImageEntry currentEntry
private ImageViewerDialog()
static void newInstance()
public static ImageViewerDialog getInstance()
protected void build()
public void destroy()
Destroyable
destroy
in interface Destroyable
destroy
in class ToggleDialog
public static void showImage(GeoImageLayer layer, ImageEntry entry)
public static void setPreviousEnabled(boolean value)
value
- true
to enable the button, false
otherwisepublic static void setNextEnabled(boolean value)
value
- true
to enable the button, false
otherwisepublic static boolean setCentreEnabled(boolean value)
value
- true
to enable the button, false
otherwisepublic void displayImage(GeoImageLayer layer, ImageEntry entry)
protected boolean dockWhenClosingDetachedDlg()
dockWhenClosingDetachedDlg
in class ToggleDialog
protected void stateChanged()
ToggleDialog
stateChanged
in class ToggleDialog
public boolean hasImage()
public static ImageEntry getCurrentImage()
null
public static GeoImageLayer getCurrentLayer()
public void activeLayerChange(Layer oldLayer, Layer newLayer)
MapView.LayerChangeListener
activeLayerChange
in interface MapView.LayerChangeListener
oldLayer
- The previous active layernewLayer
- The new activer layerpublic void layerAdded(Layer newLayer)
MapView.LayerChangeListener
layerAdded
in interface MapView.LayerChangeListener
newLayer
- The new added layerpublic void layerRemoved(Layer oldLayer)
MapView.LayerChangeListener
layerRemoved
in interface MapView.LayerChangeListener
oldLayer
- The old removed layer