public final class ImageViewerDialog extends ToggleDialog implements LayerManager.LayerChangeListener, MainLayerManager.ActiveLayerChangeListener
GeoImageLayer
.Modifier and Type | Class and Description |
---|---|
private class |
ImageViewerDialog.ImageCenterViewAction |
private class |
ImageViewerDialog.ImageCollapseAction |
private class |
ImageViewerDialog.ImageCopyPathAction |
private class |
ImageViewerDialog.ImageFirstAction |
private class |
ImageViewerDialog.ImageLastAction |
private class |
ImageViewerDialog.ImageNextAction |
private class |
ImageViewerDialog.ImagePreviousAction |
private class |
ImageViewerDialog.ImageRemoveAction |
private class |
ImageViewerDialog.ImageRemoveFromDiskAction |
private class |
ImageViewerDialog.ImageZoomAction |
ToggleDialog.ButtonHidingType, ToggleDialog.TitleBar, ToggleDialog.ToggleDialogAction
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
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 |
activeOrEditLayerChanged(MainLayerManager.ActiveLayerChangeEvent e)
Called whenever the active or edit layer changed.
|
private void |
build() |
(package private) static void |
createInstance() |
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
|
static boolean |
isCenterView()
Returns whether the center view is currently active.
|
void |
layerAdded(LayerManager.LayerAddEvent e)
Notifies this listener that a layer has been added.
|
void |
layerOrderChanged(LayerManager.LayerOrderChangeEvent e)
Notifies this listener that the order of layers was changed.
|
void |
layerRemoving(LayerManager.LayerRemoveEvent e)
Notifies this listener that a alayer was just removed.
|
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) |
private void |
showLayer(Layer newLayer) |
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, registerInWindowMenu, 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 final ImageViewerDialog.ImageZoomAction imageZoomAction
private final ImageViewerDialog.ImageCenterViewAction imageCenterViewAction
private final ImageViewerDialog.ImageNextAction imageNextAction
private final ImageViewerDialog.ImageRemoveAction imageRemoveAction
private final ImageViewerDialog.ImageRemoveFromDiskAction imageRemoveFromDiskAction
private final ImageViewerDialog.ImagePreviousAction imagePreviousAction
private final ImageViewerDialog.ImageCollapseAction imageCollapseAction
private final ImageViewerDialog.ImageFirstAction imageFirstAction
private final ImageViewerDialog.ImageLastAction imageLastAction
private final ImageViewerDialog.ImageCopyPathAction imageCopyPathAction
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 createInstance()
public static ImageViewerDialog getInstance()
private 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 static boolean isCenterView()
true
if the center view is active, false
otherwisepublic void layerAdded(LayerManager.LayerAddEvent e)
LayerManager.LayerChangeListener
Listeners are called in the EDT thread. You should not do blocking or long-running tasks in this method.
layerAdded
in interface LayerManager.LayerChangeListener
e
- The new added layer eventpublic void layerRemoving(LayerManager.LayerRemoveEvent e)
LayerManager.LayerChangeListener
Listeners are called in the EDT thread after the layer was removed.
Use LayerManager.LayerRemoveEvent.scheduleRemoval(Collection)
to remove more layers.
You should not do blocking or long-running tasks in this method.
layerRemoving
in interface LayerManager.LayerChangeListener
e
- The layer to be removed (as event)public void layerOrderChanged(LayerManager.LayerOrderChangeEvent e)
LayerManager.LayerChangeListener
Listeners are called in the EDT thread. You should not do blocking or long-running tasks in this method.
layerOrderChanged
in interface LayerManager.LayerChangeListener
e
- The order change event.public void activeOrEditLayerChanged(MainLayerManager.ActiveLayerChangeEvent e)
MainLayerManager.ActiveLayerChangeListener
You can be sure that this layer is still contained in this set.
Listeners are called in the EDT thread and you can manipulate the layer manager in the current thread.
activeOrEditLayerChanged
in interface MainLayerManager.ActiveLayerChangeListener
e
- The change event.