|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.jdesktop.swingx.JXPanel
org.jdesktop.swingx.JXMapKit
public class JXMapKit
The JXMapKit is a pair of JXMapViewers preconfigured to be easy to use
with common features built in. This includes zoom buttons, a zoom slider,
and a mini-map in the lower right corner showing an overview of the map.
Each feature can be turned off using an appropriate
isXvisible property. For example, to turn
off the minimap call
jxMapKit.setMiniMapVisible(false);
The JXMapViewer is preconfigured to connect to maps.swinglabs.org which serves up global satellite imagery from NASA's Blue Marble NG image collection.
| Nested Class Summary | |
|---|---|
static class |
JXMapKit.DefaultProviders
|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JXMapKit()
Creates a new JXMapKit |
|
| Method Summary | |
|---|---|
GeoPosition |
getAddressLocation()
|
GeoPosition |
getCenterPosition()
|
JXMapKit.DefaultProviders |
getDefaultProvider()
|
JXMapViewer |
getMainMap()
Returns a reference to the main embedded JXMapViewer component |
JXMapViewer |
getMiniMap()
Returns a reference to the mini embedded JXMapViewer component |
Action |
getZoomInAction()
Returns an action which can be attached to buttons or menu items to make the map zoom in |
JButton |
getZoomInButton()
returns a reference to the zoom in button |
Action |
getZoomOutAction()
Returns an action which can be attached to buttons or menu items to make the map zoom out |
JButton |
getZoomOutButton()
returns a reference to the zoom out button |
JSlider |
getZoomSlider()
returns a reference to the zoom slider |
boolean |
isAddressLocationShown()
|
boolean |
isDataProviderCreditShown()
|
boolean |
isMiniMapVisible()
Indicates if the mini-map is currently visible |
boolean |
isZoomButtonsVisible()
Indicates if the zoom buttons are visible. |
boolean |
isZoomSliderVisible()
Indicates if the zoom slider is currently visible |
static void |
main(String... args)
|
void |
setAddressLocation(GeoPosition pos)
|
void |
setAddressLocationShown(boolean b)
|
void |
setCenterPosition(GeoPosition pos)
|
void |
setDataProviderCreditShown(boolean b)
|
void |
setDefaultProvider(JXMapKit.DefaultProviders prov)
|
void |
setMiniMapVisible(boolean miniMapVisible)
Sets if the mini-map should be visible |
void |
setTileFactory(TileFactory fact)
Sets the tile factory for both embedded JXMapViewer components. |
void |
setZoom(int zoom)
Set the current zoomlevel for the main map. |
void |
setZoomButtonsVisible(boolean zoomButtonsVisible)
Sets if the zoom buttons should be visible. |
void |
setZoomSliderVisible(boolean zoomSliderVisible)
Sets if the zoom slider should be visible |
| Methods inherited from class org.jdesktop.swingx.JXPanel |
|---|
getAlpha, getBackgroundPainter, getEffectiveAlpha, getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, isInheritAlpha, isPaintBorderInsets, paint, paintComponent, setAlpha, setBackground, setBackgroundPainter, setInheritAlpha, setPaintBorderInsets, setScrollableTracksViewportHeight, setScrollableTracksViewportWidth |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JXMapKit()
| Method Detail |
|---|
public void setZoom(int zoom)
zoom - the new zoom levelpublic Action getZoomOutAction()
public Action getZoomInAction()
public boolean isMiniMapVisible()
public void setMiniMapVisible(boolean miniMapVisible)
miniMapVisible - a new value for the miniMap propertypublic boolean isZoomSliderVisible()
public void setZoomSliderVisible(boolean zoomSliderVisible)
zoomSliderVisible - the new value of the zoomSliderVisible propertypublic boolean isZoomButtonsVisible()
public void setZoomButtonsVisible(boolean zoomButtonsVisible)
zoomButtonsVisible - new value of the zoomButtonsVisible propertypublic void setTileFactory(TileFactory fact)
fact - the new TileFactorypublic void setCenterPosition(GeoPosition pos)
public GeoPosition getCenterPosition()
public GeoPosition getAddressLocation()
public void setAddressLocation(GeoPosition pos)
public JXMapViewer getMainMap()
public JXMapViewer getMiniMap()
public JButton getZoomInButton()
public JButton getZoomOutButton()
public JSlider getZoomSlider()
public void setAddressLocationShown(boolean b)
public boolean isAddressLocationShown()
public void setDataProviderCreditShown(boolean b)
public boolean isDataProviderCreditShown()
public void setDefaultProvider(JXMapKit.DefaultProviders prov)
public JXMapKit.DefaultProviders getDefaultProvider()
public static void main(String... args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||