public class SlippyMapBBoxChooser extends JMapViewer implements BBoxChooser
Modifier and Type | Class and Description |
---|---|
static interface |
SlippyMapBBoxChooser.TileSourceProvider |
static class |
SlippyMapBBoxChooser.TMSTileSourceProvider
TMS TileSource provider for the slippymap chooser
|
JMapViewer.ZOOM_BUTTON_STYLE
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
private Bounds |
bbox |
private OsmTileLoader |
cachedLoader |
(package private) Point |
iSelectionRectEnd |
(package private) Point |
iSelectionRectStart |
private SizeButton |
iSizeButton |
private SourceButton |
iSourceButton |
private static StringProperty |
PROP_MAPSTYLE |
private static CopyOnWriteArrayList<SlippyMapBBoxChooser.TileSourceProvider> |
providers |
static String |
RESIZE_PROP |
private OsmTileLoader |
uncachedLoader |
attribution, center, debug, evtListenerList, mapMarkerList, mapMarkersVisible, mapPolygonList, mapPolygonsVisible, mapRectangleList, mapRectanglesVisible, MAX_ZOOM, MIN_ZOOM, move, scrollWrapEnabled, tileController, tileGridVisible, tileSource, zoom, zoomButtonStyle, zoomInButton, zoomOutButton, zoomSlider
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
BBOX_PROP
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
SlippyMapBBoxChooser()
Constructs a new
SlippyMapBBoxChooser . |
Modifier and Type | Method and Description |
---|---|
static void |
addTileSourceProvider(SlippyMapBBoxChooser.TileSourceProvider tileSourceProvider)
Plugins that wish to add custom tile sources to slippy map choose should call this method
|
private List<TileSource> |
getAllTileSources() |
Bounds |
getBoundingBox()
Replies the currently selected bounding box in this BBoxChooser.
|
protected Point |
getTopLeftCoordinates() |
boolean |
handleAttribution(Point p,
boolean click) |
void |
paint(Graphics g)
Draw the map.
|
void |
refreshTileSources()
Refreshes the tile sources
|
void |
resizeSlippyMap()
Performs resizing of the DownloadDialog in order to enlarge or shrink the
map.
|
void |
setBoundingBox(Bounds bbox)
Sets the current bounding box in this bbox chooser without
emiting a property change event.
|
void |
setFileCacheEnabled(boolean enabled) |
void |
setMaxTilesInMemory(int tiles) |
void |
setSelection(Point aStart,
Point aEnd)
Callback for the OsmMapControl.
|
void |
toggleMapSource(TileSource tileSource) |
addJMVListener, addMapMarker, addMapPolygon, addMapRectangle, getAttribution, getCenter, getLatOffset, getMapMarkerList, getMapMarkersVisible, getMapPolygonList, getMapPosition, getMapPosition, getMapPosition, getMapPosition, getMapRectangleList, getMeterPerPixel, getPosition, getPosition, getPosition, getRadius, getTileCache, getTileController, getToolTipText, getZoom, getZoomButtonStyle, getZoomControlsVisible, initializeZoomSlider, isMapPolygonsVisible, isMapRectanglesVisible, isScrollWrapEnabled, isTileGridVisible, moveMap, paintComponent, paintMarker, paintPolygon, paintRectangle, removeAllMapMarkers, removeAllMapPolygons, removeAllMapRectangles, removeJMVListener, removeMapMarker, removeMapPolygon, removeMapRectangle, setCenter, setDisplayPosition, setDisplayPosition, setDisplayPosition, setDisplayPosition, setDisplayToFitMapElements, setDisplayToFitMapMarkers, setDisplayToFitMapPolygons, setDisplayToFitMapRectangles, setMapMarkerList, setMapMarkerVisible, setMapPolygonList, setMapPolygonsVisible, setMapRectangleList, setMapRectanglesVisible, setScrollWrapEnabled, setTileGridVisible, setTileLoader, setTileSource, setZoom, setZoom, setZoomButtonStyle, setZoomContolsVisible, tileLoadingFinished, zoomChanged, zoomIn, zoomIn, zoomOut, zoomOut
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, 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, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
private static CopyOnWriteArrayList<SlippyMapBBoxChooser.TileSourceProvider> providers
private static final StringProperty PROP_MAPSTYLE
public static final String RESIZE_PROP
private OsmTileLoader cachedLoader
private OsmTileLoader uncachedLoader
private final SizeButton iSizeButton
private final SourceButton iSourceButton
Point iSelectionRectStart
Point iSelectionRectEnd
public SlippyMapBBoxChooser()
SlippyMapBBoxChooser
.public static void addTileSourceProvider(SlippyMapBBoxChooser.TileSourceProvider tileSourceProvider)
tileSourceProvider
- private List<TileSource> getAllTileSources()
public boolean handleAttribution(Point p, boolean click)
protected Point getTopLeftCoordinates()
public void paint(Graphics g)
paint
in class JComponent
public final void setFileCacheEnabled(boolean enabled)
public final void setMaxTilesInMemory(int tiles)
public void setSelection(Point aStart, Point aEnd)
aStart
- aEnd
- public void resizeSlippyMap()
public void toggleMapSource(TileSource tileSource)
public Bounds getBoundingBox()
BBoxChooser
getBoundingBox
in interface BBoxChooser
public void setBoundingBox(Bounds bbox)
setBoundingBox
in interface BBoxChooser
bbox
- the bounding box. null to reset the bounding boxpublic final void refreshTileSources()