org.geotools.swt.control
Class MaplayerTableViewer

Object
  extended by Viewer
      extended by ContentViewer
          extended by StructuredViewer
              extended by ColumnViewer
                  extended by AbstractTableViewer
                      extended by TableViewer
                          extended by MaplayerTableViewer
All Implemented Interfaces:
IInputProvider, IInputSelectionProvider, IPostSelectionProvider, ISelectionChangedListener, ISelectionProvider

public class MaplayerTableViewer
extends TableViewer
implements ISelectionChangedListener

A table viewer for map layers.

Author:
Andrea Antonello (www.hydrologis.com)

Nested Class Summary
 
Nested classes/interfaces inherited from class StructuredViewer
StructuredViewer.ColorAndFontCollector, StructuredViewer.ColorAndFontCollectorWithProviders
 
Field Summary
 
Fields inherited from class Viewer
WIDGET_DATA_KEY
 
Constructor Summary
MaplayerTableViewer(Composite parent, int style)
          Constructor.
 
Method Summary
 void addLayer(Layer layer)
          Adds a Layer to the viewer and updates.
 void clear()
          Clears all the layers from the viewer.
 List<Layer> getLayersList()
          Getter for the loaded MapLayers list.
 Layer getSelectedMapLayer()
          Getter for the selected Layer.
 void removeLayer(Layer layer)
          Removes a Layer from the viewer and updates.
 void selectionChanged(SelectionChangedEvent arg0)
           
 void setPane(SwtMapPane pane)
          Setter for the map pane.
protected  void triggerEditorActivationEvent(ColumnViewerEditorActivationEvent event)
           
 
Methods inherited from class TableViewer
createViewerEditor, doClear, doClearAll, doDeselectAll, doFindItem, doGetColumn, doGetColumnCount, doGetItem, doGetItemCount, doGetItems, doGetSelection, doGetSelectionIndices, doIndexOf, doRemove, doRemove, doRemoveAll, doResetItem, doSelect, doSetItemCount, doSetSelection, doSetSelection, doShowItem, doShowSelection, getControl, getItemAt, getTable, getViewerRowFromItem, internalCreateNewRowPart, refresh, refresh, remove, setSelection
 
Methods inherited from class AbstractTableViewer
add, add, assertContentProviderType, clear, doFindInputItem, doUpdateItem, getColumnViewerOwner, getElementAt, getLabelProvider, getRawChildren, getSelectionFromWidget, handleDispose, hookControl, indexForElement, inputChanged, insert, internalRefresh, internalRefresh, remove, replace, reveal, setItemCount, setSelectionToWidget
 
Methods inherited from class ColumnViewer
applyEditorValue, cancelEditing, checkBusy, editElement, getCell, getCellEditors, getCellModifier, getColumnProperties, getColumnViewerEditor, getItem, getLabelProvider, getViewerRow, hookEditingSupport, isBusy, isCellEditorActive, refresh, refresh, setBusy, setCellEditors, setCellModifier, setColumnProperties, setColumnViewerEditor, setLabelProvider, update
 
Methods inherited from class StructuredViewer
addDoubleClickListener, addDragSupport, addDropSupport, addFilter, addOpenListener, addPostSelectionChangedListener, assertElementsNotNull, associate, buildLabel, disassociate, equals, filter, findItem, findItems, fireDoubleClick, fireOpen, firePostSelectionChanged, getColorAndFontCollector, getComparator, getComparer, getFilteredChildren, getFilters, getRoot, getSelection, getSortedChildren, getSorter, handleDoubleSelect, handleInvalidSelection, handleLabelProviderChanged, handleOpen, handlePostSelect, handleSelect, hasFilters, internalUpdate, mapElement, needsRefilter, preservingSelection, refresh, refresh, refreshItem, removeDoubleClickListener, removeFilter, removeOpenListener, removePostSelectionChangedListener, resetFilters, setComparator, setComparer, setContentProvider, setFilters, setInput, setSelectionToWidget, setSorter, setUseHashlookup, testFindItem, testFindItems, unmapAllElements, unmapElement, unmapElement, update, updateItem, updateSelection, usingElementMap
 
Methods inherited from class ContentViewer
getContentProvider, getInput, labelProviderChanged
 
Methods inherited from class Viewer
addHelpListener, addSelectionChangedListener, fireHelpRequested, fireSelectionChanged, getData, handleHelpRequest, removeHelpListener, removeSelectionChangedListener, scrollDown, scrollUp, setData, setSelection
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ISelectionProvider
addSelectionChangedListener, removeSelectionChangedListener, setSelection
 

Constructor Detail

MaplayerTableViewer

public MaplayerTableViewer(Composite parent,
                           int style)
Constructor.

Note that after the object is built and before actually using it, the map pane has to be set through the setPane(SwtMapPane) method.

Parameters:
parent - the parent Composite.
style - the style for the Composite.
Method Detail

setPane

public void setPane(SwtMapPane pane)
Setter for the map pane.

Parameters:
pane - the map pane to use.

getLayersList

public List<Layer> getLayersList()
Getter for the loaded MapLayers list.

Returns:
the list of map layers.

getSelectedMapLayer

public Layer getSelectedMapLayer()
Getter for the selected Layer.

Returns:
the selected layer or null.

selectionChanged

public void selectionChanged(SelectionChangedEvent arg0)
Specified by:
selectionChanged in interface ISelectionChangedListener

triggerEditorActivationEvent

protected void triggerEditorActivationEvent(ColumnViewerEditorActivationEvent event)
Overrides:
triggerEditorActivationEvent in class ColumnViewer

addLayer

public void addLayer(Layer layer)
Adds a Layer to the viewer and updates.

Parameters:
layer - the layer to add.

removeLayer

public void removeLayer(Layer layer)
Removes a Layer from the viewer and updates.

Parameters:
layer - the layer to remove.

clear

public void clear()
Clears all the layers from the viewer.



Copyright © 1996-2014 Geotools. All Rights Reserved.