org.geotools.swt.styling.simple
Class AbstractSimpleConfigurator

Object
  extended by Window
      extended by Dialog
          extended by AbstractSimpleConfigurator
All Implemented Interfaces:
IShellProvider
Direct Known Subclasses:
SimpleStyleConfigurator

public class AbstractSimpleConfigurator
extends Dialog

This is here to save me some typing and ensure that the simple raster and feature configurators look similar.

Since:
0.6.0
Author:
mleslie

Nested Class Summary
 
Nested classes/interfaces inherited from class Window
Window.IExceptionHandler
 
Field Summary
protected  StyleBuilder build
          build field
protected  SimpleFeatureCollection featureCollection
           
protected  Style style
           
 
Fields inherited from class Dialog
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS
 
Fields inherited from class Window
CANCEL, OK
 
Constructor Summary
AbstractSimpleConfigurator(Shell parent, SimpleFeatureCollection featureCollection, Style style)
          Construct AbstractSimpleConfigurator.
 
Method Summary
protected  Style getStyle()
          Retrieves the style object from the style blackboard.
static SelectionEvent selectionEvent(ModifyEvent e)
          Morph a text ModifyEvent into a SelectionEvent as best we can.
protected  void setLayout(Composite parent)
           
static Composite subpart(Composite parent, String label)
          Construct a subpart labeled with the provided tag.
 
Methods inherited from class Dialog
applyDialogFont, buttonPressed, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonBar, createButtonsForButtonBar, createContents, createDialogArea, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, isResizable, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
 
Methods inherited from class Window
canHandleShellCloseEvent, configureShell, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, 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
 

Field Detail

build

protected StyleBuilder build
build field


featureCollection

protected SimpleFeatureCollection featureCollection

style

protected Style style
Constructor Detail

AbstractSimpleConfigurator

public AbstractSimpleConfigurator(Shell parent,
                                  SimpleFeatureCollection featureCollection,
                                  Style style)
Construct AbstractSimpleConfigurator.

Method Detail

setLayout

protected void setLayout(Composite parent)

getStyle

protected Style getStyle()
Retrieves the style object from the style blackboard.

Returns:
Style

subpart

public static Composite subpart(Composite parent,
                                String label)
Construct a subpart labeled with the provided tag.

Creates a composite with a grid layout of the specifed columns, and a label with text from label.

Parameters:
parent -
label -
Returns:
Composite with one label

selectionEvent

public static SelectionEvent selectionEvent(ModifyEvent e)
Morph a text ModifyEvent into a SelectionEvent as best we can.

This may be a bad abuse of the event system, it appears to be in use because we are too lazy to specify a new event type for style modification.

However this does seem to be in keeping with the purpose of SelectionEvent it already isolates out code from TypedEvents by providing a summary of what changed in which widet.

Parameters:
e -
Returns:
A SelectionEvent based on the provided modify event


Copyright © 1996-2014 Geotools. All Rights Reserved.