org.geotools.swt
Class MapLayerComposite

Object
  extended by Widget
      extended by Control
          extended by Scrollable
              extended by Composite
                  extended by MapLayerComposite
All Implemented Interfaces:
Drawable

public class MapLayerComposite
extends Composite

Displays a list of the map layers in an associated JMapPane and provides controls to set the visibility, selection and style of each layer.

Implementation note: DefaultMapContext stores its list of MapLayer objects in rendering order, ie. the layer at index 0 is rendererd first, followed by index 1 etc. MapLayerTable stores its layers in the reverse order since it is more intuitive for the user to think of a layer being 'on top' of other layers.

Author:
Andrea Antonello (www.hydrologis.com), Michael Bedward

Field Summary
 
Fields inherited from class Control
handle
 
Constructor Summary
MapLayerComposite(Composite parent, int style)
          Default constructor.
 
Method Summary
 void onAddLayer(Layer layer)
          Add a new layer to those listed in the table.
 void onRemoveLayer(Layer layer)
          Remove a layer from those listed in the table.
 void repaint(Layer layer)
          Repaint the list item associated with the specified MapLayer object
 void setMapPane(SwtMapPane pane)
          Set the map pane that the MapLayerTable will service.
 
Methods inherited from class Composite
changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
 
Methods inherited from class Scrollable
computeTrim, getClientArea, getHorizontalBar, getVerticalBar
 
Methods inherited from class Control
addControlListener, addDragDetectListener, addFocusListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getRegion, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setRegion, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
 
Methods inherited from class Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapLayerComposite

public MapLayerComposite(Composite parent,
                         int style)
Default constructor. A subsequent call to setMapPane(org.geotools.swt.SwtMapPane) will be required.

Method Detail

setMapPane

public void setMapPane(SwtMapPane pane)
Set the map pane that the MapLayerTable will service.

Parameters:
pane - the map pane

onAddLayer

public void onAddLayer(Layer layer)
Add a new layer to those listed in the table. This method will be called by the associated map pane automatically as part of the event sequence when a new MapLayer is added to the pane's MapContext.

Parameters:
layer - the map layer

onRemoveLayer

public void onRemoveLayer(Layer layer)
Remove a layer from those listed in the table. This method will be called by the associated map pane automatically as part of the event sequence when a new MapLayer is removed from the pane's MapContext.

Parameters:
layer - the map layer

repaint

public void repaint(Layer layer)
Repaint the list item associated with the specified MapLayer object

Parameters:
layer - the map layer


Copyright © 1996-2014 Geotools. All Rights Reserved.