Search in sources :

Example 1 with PointSymbolizerEditor

use of eu.esdihumboldt.hale.ui.style.editors.PointSymbolizerEditor in project hale by halestudio.

the class SimplePointStylePage method createControl.

/**
 * @see IDialogPage#createControl(Composite)
 */
@Override
public void createControl(Composite parent) {
    // create new controls
    Composite page = new Composite(parent, SWT.NONE);
    RowLayout layout = new RowLayout(SWT.HORIZONTAL);
    page.setLayout(layout);
    Style style = getParent().getStyle();
    PointSymbolizer point = null;
    try {
        Symbolizer[] symbolizers = SLD.symbolizers(style);
        for (Symbolizer symbol : symbolizers) {
            if (symbol instanceof LineSymbolizer) {
                point = (PointSymbolizer) symbol;
                break;
            }
        }
    } catch (Exception e) {
    // ignore
    }
    if (point == null) {
        point = styleBuilder.createPointSymbolizer();
    }
    pointEditor = new PointSymbolizerEditor(page, point);
    setControl(page);
}
Also used : PointSymbolizer(org.geotools.styling.PointSymbolizer) Composite(org.eclipse.swt.widgets.Composite) PointSymbolizerEditor(eu.esdihumboldt.hale.ui.style.editors.PointSymbolizerEditor) RowLayout(org.eclipse.swt.layout.RowLayout) LineSymbolizer(org.geotools.styling.LineSymbolizer) Style(org.geotools.styling.Style) Symbolizer(org.geotools.styling.Symbolizer) PointSymbolizer(org.geotools.styling.PointSymbolizer) LineSymbolizer(org.geotools.styling.LineSymbolizer)

Aggregations

PointSymbolizerEditor (eu.esdihumboldt.hale.ui.style.editors.PointSymbolizerEditor)1 RowLayout (org.eclipse.swt.layout.RowLayout)1 Composite (org.eclipse.swt.widgets.Composite)1 LineSymbolizer (org.geotools.styling.LineSymbolizer)1 PointSymbolizer (org.geotools.styling.PointSymbolizer)1 Style (org.geotools.styling.Style)1 Symbolizer (org.geotools.styling.Symbolizer)1