org.geotools.swt.styling.simple
Class GraphicViewer

Object
  extended by GraphicViewer

public class GraphicViewer
extends Object

Allows editing/viewing of a Style Layer Descriptor "Graphic".

Here is the pretty picture:


          +-+ +-------+ +------+
   Point: |x| | star\/| |size\/|
          +-+ +-------+ +------+
 

Workflow:

  1. createControl( parent ) - set up controls
  2. setGraphic( graphic, mode ) - provide content from SimpleStyleConfigurator
    1. Symbolizer values copied into fields based on mode
    2. fields copied into controls
    3. controls enabled based on mode & fields
  3. Listener.widgetSelected/modifyText - User performs an "edit"
  4. Listener.sync( SelectionEvent ) - update fields with values of controls
  5. fire( SelectionSevent ) - notify SimpleStyleConfigurator of change
  6. getGraphic( Fill, Stroke, StyleBuilder ) - construct a Graphic based on fields

    Since:
    1.0.0
    Author:
    Jody Garnett

    Constructor Summary
    GraphicViewer()
               
     
    Method Summary
     void addListener(SelectionListener listener1)
              Accepts a listener that will be notified when content changes.
     Composite createControl(Composite parent, KeyListener klisten, StyleBuilder build)
              TODO summary sentence for createControl ...
    protected  void fire(SelectionEvent event)
              TODO summary sentence for fire ...
     Graphic getGraphic(Fill filll, Stroke stroke, StyleBuilder build)
              TODO summary sentence for getGraphic ...
     void removeListener(SelectionListener listener1)
              Remove listener.
     void setGraphic(Graphic graphic, Mode mode, Color defaultColor)
              TODO summary sentence for setGraphic ...
     
    Methods inherited from class Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    GraphicViewer

    public GraphicViewer()
    Method Detail

    addListener

    public void addListener(SelectionListener listener1)
    Accepts a listener that will be notified when content changes.

    Parameters:
    listener1 -

    removeListener

    public void removeListener(SelectionListener listener1)
    Remove listener.

    Parameters:
    listener1 -

    fire

    protected void fire(SelectionEvent event)
    TODO summary sentence for fire ...

    Parameters:
    event -

    createControl

    public Composite createControl(Composite parent,
                                   KeyListener klisten,
                                   StyleBuilder build)
    TODO summary sentence for createControl ...

    Parameters:
    parent -
    klisten -
    build -
    Returns:
    Generated composite

    getGraphic

    public Graphic getGraphic(Fill filll,
                              Stroke stroke,
                              StyleBuilder build)
    TODO summary sentence for getGraphic ...

    Parameters:
    filll -
    stroke -
    build -
    Returns:
    Graphic defined by this model

    setGraphic

    public void setGraphic(Graphic graphic,
                           Mode mode,
                           Color defaultColor)
    TODO summary sentence for setGraphic ...

    Parameters:
    graphic -
    mode -
    enabled -


    Copyright © 1996-2014 Geotools. All Rights Reserved.