org.geotools.swt.styling.simple
Class LabelViewer

Object
  extended by LabelViewer

public class LabelViewer
extends Object

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

Here is the pretty picture:


          +-+ +------------+ +------+ +------+
   Label: |x| |     title\/| | Font | |Offset|
          +-+ +------------+ +------+ +------+
 or
          +-+ +------------+ +------+ +------+ +------+ +--------+
   Label: |x| |     title\/| | Font | |VAlign| |HAlign| |Rotation|
          +-+ +------------+ +------+ +------+ +------+ +--------+
 

Workflow:

  1. createControl( parent ) - set up controls
  2. set( SimpleFeatureType, TextSymbolizer, 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. get( StyleBuilder ) - construct based on fields

    Since:
    1.0.0
    Author:
    Jody Garnett

    Constructor Summary
    LabelViewer()
               
     
    Method Summary
     void addListener(SelectionListener listener1)
              Accepts a listener that will be notified when content changes.
     Composite createControl(Composite parent, KeyListener klisten)
               
    protected  void fire(SelectionEvent event)
               
     TextSymbolizer get(StyleBuilder build)
              Constructs a TextSymbolizer from the inputs
     void listen(boolean listen)
               
     void removeListener(SelectionListener listener1)
              Remove listener.
     void set(SimpleFeatureType schema, TextSymbolizer sym, Mode mode)
              Start editing the provided symbolizer.
     
    Methods inherited from class Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    LabelViewer

    public LabelViewer()
    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)

    get

    public TextSymbolizer get(StyleBuilder build)
    Constructs a TextSymbolizer from the inputs

    Parameters:
    build -
    Returns:
    TextSymbolizer defined by this model

    set

    public void set(SimpleFeatureType schema,
                    TextSymbolizer sym,
                    Mode mode)
    Start editing the provided symbolizer.

    Parameters:
    schema -
    sym -
    mode -

    listen

    public void listen(boolean listen)

    createControl

    public Composite createControl(Composite parent,
                                   KeyListener klisten)


    Copyright © 1996-2014 Geotools. All Rights Reserved.