public class LayerViewPanel extends javax.swing.JPanel implements LayerListener, LayerManagerProxy, SelectionManagerProxy
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
LayerViewPanel(LayerManager layerManager,
LayerViewPanelContext context) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(LayerViewPanelListener listener) |
void |
categoryChanged(CategoryEvent e) |
static java.util.List |
components(com.vividsolutions.jts.geom.Geometry g) |
java.awt.Image |
createBlankPanelImage()
Returns an image with the dimensions of this panel.
|
void |
dispose() |
void |
erase(java.awt.Graphics2D g) |
void |
featuresChanged(FeatureEvent e)
Fired when a feature is added to or removed from a layer, or when a feature
is edited (using an EditTransaction).
|
java.util.Collection |
featuresWithVertex(java.awt.geom.Point2D viewPoint,
double viewTolerance,
java.util.Collection features) |
void |
fill(java.awt.Graphics2D g,
java.awt.Color color) |
void |
fireSelectionChanged() |
void |
flash(com.vividsolutions.jts.geom.GeometryCollection geometryCollection) |
void |
flash(java.awt.Shape shape,
java.awt.Color color,
java.awt.Stroke stroke,
int millisecondDelay) |
java.lang.String |
format(double d) |
protected java.lang.String |
format(double d,
double pixelWidthInModelUnits) |
Blackboard |
getBlackboard() |
LayerViewPanelContext |
getContext() |
CursorTool |
getCurrentCursorTool() |
com.vividsolutions.jts.geom.Geometry |
getFence() |
Java2DConverter |
getJava2DConverter() |
java.awt.Point |
getLastClickedPoint()
Note: the popup menu is shown only if the user right-clicks the panel.
|
java.awt.Point |
getLastMouseLocation() |
LayerManager |
getLayerManager() |
RenderingManager |
getRenderingManager() |
SelectionManager |
getSelectionManager() |
java.lang.String |
getToolTipText(java.awt.event.MouseEvent event) |
ToolTipWriter |
getToolTipWriter() |
Viewport |
getViewport() |
WorkbenchFrame |
getWorkBenchFrame()
Find the parent WorkBenchFrame.
|
static boolean |
intersects(com.vividsolutions.jts.geom.Geometry a,
com.vividsolutions.jts.geom.Geometry b)
Workaround for the fact that GeometryCollection#intersects is not
currently implemented.
|
void |
layerChanged(LayerEvent e) |
void |
paintComponent(java.awt.Graphics g) |
static javax.swing.JPopupMenu |
popupMenu() |
void |
removeCurrentCursorTool() |
void |
removeListener(LayerViewPanelListener listener) |
void |
repaint() |
void |
reSetCurrentCursorTool()
force the current tool to be reactivated on us. e.g. on task switches
|
void |
setCurrentCursorTool(CursorTool newct)
set a cursortool to associate with the layer view. will return immediatly
if the old cursor tools is identical to the new one.
|
void |
setDeferLayerEvents(boolean defer) |
void |
setViewportInitialized(boolean viewportInitialized)
When a layer is added, if this flag is false, the viewport will be zoomed
to the extent of the layer.
|
void |
superRepaint() |
java.util.Map |
visibleLayerToFeaturesInFenceMap()
The Fence layer will be excluded.
|
java.util.Map |
visibleLayerToFeaturesInFenceMap(com.vividsolutions.jts.geom.Geometry fence)
The Fence layer will be included.
|
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, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public LayerViewPanel(LayerManager layerManager, LayerViewPanelContext context)
public ToolTipWriter getToolTipWriter()
public java.lang.String getToolTipText(java.awt.event.MouseEvent event)
getToolTipText
in class javax.swing.JComponent
public static java.util.List components(com.vividsolutions.jts.geom.Geometry g)
public static boolean intersects(com.vividsolutions.jts.geom.Geometry a, com.vividsolutions.jts.geom.Geometry b)
public java.util.Map visibleLayerToFeaturesInFenceMap()
public java.util.Map visibleLayerToFeaturesInFenceMap(com.vividsolutions.jts.geom.Geometry fence)
public static javax.swing.JPopupMenu popupMenu()
public CursorTool getCurrentCursorTool()
public void reSetCurrentCursorTool()
public void setCurrentCursorTool(CursorTool newct)
newct
- public void removeCurrentCursorTool()
public WorkbenchFrame getWorkBenchFrame()
public void setViewportInitialized(boolean viewportInitialized)
public java.awt.Point getLastClickedPoint()
public java.awt.Point getLastMouseLocation()
public Viewport getViewport()
public Java2DConverter getJava2DConverter()
public com.vividsolutions.jts.geom.Geometry getFence()
public LayerManager getLayerManager()
getLayerManager
in interface LayerManagerProxy
public void featuresChanged(FeatureEvent e)
LayerListener
featuresChanged
in interface LayerListener
public void categoryChanged(CategoryEvent e)
categoryChanged
in interface LayerListener
public void layerChanged(LayerEvent e)
layerChanged
in interface LayerListener
public java.awt.Image createBlankPanelImage()
public void repaint()
repaint
in class java.awt.Component
public void superRepaint()
public void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
public void erase(java.awt.Graphics2D g)
public void fill(java.awt.Graphics2D g, java.awt.Color color)
public LayerViewPanelContext getContext()
public void addListener(LayerViewPanelListener listener)
public void removeListener(LayerViewPanelListener listener)
public java.lang.String format(double d)
protected java.lang.String format(double d, double pixelWidthInModelUnits)
public void fireSelectionChanged()
public RenderingManager getRenderingManager()
public java.util.Collection featuresWithVertex(java.awt.geom.Point2D viewPoint, double viewTolerance, java.util.Collection features) throws java.awt.geom.NoninvertibleTransformException
java.awt.geom.NoninvertibleTransformException
public void dispose()
public void flash(java.awt.Shape shape, java.awt.Color color, java.awt.Stroke stroke, int millisecondDelay)
millisecondDelay
- the GUI will be unresponsive for this length of time, so keep
it short!public SelectionManager getSelectionManager()
getSelectionManager
in interface SelectionManagerProxy
public Blackboard getBlackboard()
public void flash(com.vividsolutions.jts.geom.GeometryCollection geometryCollection) throws java.awt.geom.NoninvertibleTransformException
java.awt.geom.NoninvertibleTransformException
public void setDeferLayerEvents(boolean defer)