|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
org.geotools.swing.JMapViewer
public class JMapViewer extends JComponent
A Swing panel containing a map display pane and (optionally) a toolbar, status bar and map layer table.
This is an adaptation of JMapFrame into an embeddable JComponent.| Nested Class Summary | |
|---|---|
enum |
JMapViewer.Tool
Constants for available toolbar buttons used with the enableTool method. |
| Field Summary | |
|---|---|
static String |
TOOLBAR_INFO_BUTTON_NAME
Name assigned to toolbar button for feature info queries. |
static String |
TOOLBAR_PAN_BUTTON_NAME
Name assigned to toolbar button for map panning. |
static String |
TOOLBAR_POINTER_BUTTON_NAME
Name assigned to toolbar button for default pointer. |
static String |
TOOLBAR_RESET_BUTTON_NAME
Name assigned to toolbar button for map reset. |
static String |
TOOLBAR_ZOOMIN_BUTTON_NAME
Name assigned to toolbar button for map zoom in. |
static String |
TOOLBAR_ZOOMOUT_BUTTON_NAME
Name assigned to toolbar button for map zoom out. |
private org.geotools.swing.MapLayerTable |
mapLayerTable
|
private org.geotools.swing.JMapPane |
mapPane
|
private boolean |
showLayerTable
|
private boolean |
showStatusBar
|
private boolean |
showToolBar
|
private org.geotools.swing.control.JMapStatusBar |
statusBar
|
private JToolBar |
toolBar
|
private Set |
toolSet
A Swing panel containing a map display pane and (optionally) a toolbar, status bar and map layer table. |
private boolean |
uiSet
|
| Fields inherited from class JComponent | |
|---|---|
| WHEN_FOCUSED, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_IN_FOCUSED_WINDOW, UNDEFINED_CONDITION, TOOL_TIP_TEXT_KEY, TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, WIDTH, HEIGHT, PROPERTIES, SOMEBITS, FRAMEBITS, ALLBITS, ERROR, ABORT |
| Fields inherited from class Container | |
|---|---|
| TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, WIDTH, HEIGHT, PROPERTIES, SOMEBITS, FRAMEBITS, ALLBITS, ERROR, ABORT |
| Constructor Summary | |
JMapViewer()
Default constructor. |
|
JMapViewer(org.geotools.map.MapContent content)
Constructs a new JMapViewer object with specified map content. |
|
| Method Summary | |
|---|---|
void
|
enableTool(JMapViewer.Tool... tool)
This method is an alternative to setShowToolBar(boolean). |
org.geotools.map.MapContent
|
getMapContent()
Get the map content associated with this viewer. |
org.geotools.swing.MapLayerTable
|
getMapLayerTable()
|
org.geotools.swing.JMapPane
|
getMapPane()
Provides access to the instance of JMapPane being used by this viewer. |
org.geotools.renderer.GTRenderer
|
getRenderer()
|
org.geotools.swing.control.JMapStatusBar
|
getStatusBar()
|
JToolBar
|
getToolBar()
|
void
|
initComponents()
Creates and lays out the viewer's components that have been specified with the enable methods (e.g. |
boolean
|
isShowLayerTable()
|
boolean
|
isShowStatusBar()
|
boolean
|
isShowToolBar()
|
void
|
setMapContent(org.geotools.map.MapContent content)
Set the MapContent object used by this viewer. |
void
|
setRenderer(org.geotools.renderer.GTRenderer renderer)
|
void
|
setShowLayerTable(boolean enabled)
Set whether a map layer table will be displayed to show the list of layers in the map content and set their order, visibility and selected status. |
void
|
setShowStatusBar(boolean enabled)
Set whether a status bar will be displayed to display cursor position and map bounds. |
void
|
setShowToolBar(boolean enabled)
Sets whether to display the default toolbar (default is false). |
void
|
validate()
|
JMapViewer
|
valueOf(String name)
Returns the enum constant of this type with the specified name. |
JMapViewer[]
|
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Field Detail |
|---|
public static final String TOOLBAR_INFO_BUTTON_NAME
public static final String TOOLBAR_PAN_BUTTON_NAME
public static final String TOOLBAR_POINTER_BUTTON_NAME
public static final String TOOLBAR_RESET_BUTTON_NAME
public static final String TOOLBAR_ZOOMIN_BUTTON_NAME
public static final String TOOLBAR_ZOOMOUT_BUTTON_NAME
private org.geotools.swing.MapLayerTable mapLayerTable
private org.geotools.swing.JMapPane mapPane
private boolean showLayerTable
private boolean showStatusBar
private boolean showToolBar
private org.geotools.swing.control.JMapStatusBar statusBar
private JToolBar toolBar
private Set toolSet
private boolean uiSet
| Constructor Detail |
|---|
public JMapViewer()
public JMapViewer(org.geotools.map.MapContent content)
content - the map content
| Method Detail |
|---|
public void enableTool(JMapViewer.Tool... tool)
myMapFrame.enableTool(Tool.PAN, Tool.ZOOM);
Calling this method with no arguments or null is equivalent
to enableToolBar(false).
tool - tools to display on the toolbar
public org.geotools.map.MapContent getMapContent()
public org.geotools.swing.MapLayerTable getMapLayerTable()
public org.geotools.swing.JMapPane getMapPane()
public org.geotools.renderer.GTRenderer getRenderer()
public org.geotools.swing.control.JMapStatusBar getStatusBar()
public JToolBar getToolBar()
public void initComponents()
public boolean isShowLayerTable()
public boolean isShowStatusBar()
public boolean isShowToolBar()
public void setMapContent(org.geotools.map.MapContent content)
content - the map content
public void setRenderer(org.geotools.renderer.GTRenderer renderer)
public void setShowLayerTable(boolean enabled)
enabled - whether the map layer table is required.
public void setShowStatusBar(boolean enabled)
enabled - whether the status bar is required.
public void setShowToolBar(boolean enabled)
enabled - whether the toolbar is required
@Override public void validate()
JMapViewer valueOf(String name)
JMapViewer[] values()
Groovy Documentation