|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectWindow
ApplicationWindow
SwtMapFrame
public class SwtMapFrame
An SWT frame containing a map display pane and a toolbar, status bar and map layer table.
Nested Class Summary | |
---|---|
static class |
SwtMapFrame.Tool
Constants for available toolbar buttons used with the enableTool(org.geotools.swt.SwtMapFrame.Tool...) method. |
Nested classes/interfaces inherited from class Window |
---|
Window.IExceptionHandler |
Field Summary |
---|
Fields inherited from class ApplicationWindow |
---|
seperator1 |
Fields inherited from class Window |
---|
CANCEL, OK |
Constructor Summary | |
---|---|
SwtMapFrame(boolean showMenu,
boolean showToolBar,
boolean showStatusBar,
boolean showLayerTable)
Default constructor. |
|
SwtMapFrame(boolean showMenu,
boolean showToolBar,
boolean showStatusBar,
boolean showLayerTable,
MapContent content)
Constructs a new JMapFrame object with specified context
and a default renderer (an instance of StreamingRenderer ). |
|
SwtMapFrame(boolean showMenu,
boolean showToolBar,
boolean showStatusBar,
boolean showLayerTable,
MapContent content,
GTRenderer renderer)
Constructs a new JMapFrame object with specified context and renderer |
Method Summary | |
---|---|
protected Control |
createContents(Composite parent)
|
protected MenuManager |
createMenuManager()
|
protected ToolBarManager |
createToolBarManager(int style)
|
void |
enableTool(SwtMapFrame.Tool... tool)
This method is an alternative to #enableToolBar(boolean). |
MapContent |
getMapContent()
Get the map context associated with this frame. |
SwtMapPane |
getMapPane()
Provides access to the instance of JMapPane being used
by this frame. |
GTRenderer |
getRenderer()
Get the renderer being used by this frame. |
void |
setMapContent(MapContent content)
Set the MapContent object used by this frame. |
void |
setRenderer(GTRenderer renderer)
Set the renderer to be used by this frame. |
static void |
showMap(MapContent content)
Creates a new JMapFrame object with a toolbar, map pane and status
bar; sets the supplied MapContent ; and displays the frame on the
AWT event dispatching thread. |
Methods inherited from class ApplicationWindow |
---|
addCoolBar, addMenuBar, addStatusLine, addToolBar, canHandleShellCloseEvent, close, configureShell, coolBarChildrenExist, createCoolBarControl, createCoolBarManager, createCoolBarManager2, createStatusLine, createStatusLineManager, createToolBarControl, createToolBarManager2, createTrimWidgets, getCoolBarControl, getCoolBarManager, getCoolBarManager2, getFont, getLayout, getMenuBarManager, getSeperator1, getStatusLineManager, getSymbolicFontName, getToolBarControl, getToolBarManager, getToolBarManager2, run, setStatus, showTopSeperator, toolBarChildrenExist |
Methods inherited from class Window |
---|
constrainShellSize, create, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getInitialLocation, getInitialSize, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, initializeBounds, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SwtMapFrame(boolean showMenu, boolean showToolBar, boolean showStatusBar, boolean showLayerTable)
JMapFrame
with
no context or renderer set
public SwtMapFrame(boolean showMenu, boolean showToolBar, boolean showStatusBar, boolean showLayerTable, MapContent content)
JMapFrame
object with specified context
and a default renderer (an instance of StreamingRenderer
).
showLayerTable
- showStatusBar
- content
- the map context with layers to be displayedpublic SwtMapFrame(boolean showMenu, boolean showToolBar, boolean showStatusBar, boolean showLayerTable, MapContent content, GTRenderer renderer)
JMapFrame
object with specified context and renderer
showLayerTable
- showStatusBar
- context
- the map context with layers to be displayedrenderer
- the renderer to be usedMethod Detail |
---|
public static void showMap(MapContent content)
JMapFrame
object with a toolbar, map pane and status
bar; sets the supplied MapContent
; and displays the frame on the
AWT event dispatching thread. The context's title is used as the frame's
title.
content
- the map context containing the layers to displaypublic void enableTool(SwtMapFrame.Tool... tool)
myMapFrame.enableTool(Tool.PAN, Tool.ZOOM);
tool
- one or more SwtMapFrame.Tool constantsprotected Control createContents(Composite parent)
createContents
in class Window
protected ToolBarManager createToolBarManager(int style)
createToolBarManager
in class ApplicationWindow
protected MenuManager createMenuManager()
createMenuManager
in class ApplicationWindow
public MapContent getMapContent()
null
if no map context has been set explicitly with the
constructor or setMapContent(org.geotools.map.MapContent).
MapContent
objectpublic void setMapContent(MapContent content)
content
- a MapContent instance
IllegalArgumentException
- if context is nullpublic GTRenderer getRenderer()
null
if no renderer was set via the constructor
or setRenderer(org.geotools.renderer.GTRenderer).
GTRenderer
objectpublic void setRenderer(GTRenderer renderer)
renderer
- a GTRenderer instance
IllegalArgumentException
- if renderer is nullpublic SwtMapPane getMapPane()
JMapPane
being used
by this frame.
JMapPane
object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |