Exemplo n.º 1
0
  private void initTree(final JContextTree tree) {

    LayerFeatureItem item = new LayerFeatureItem();
    item.actions().add(new ClearSelectionAction());
    item.actions().add(new DeleteSelectionAction());

    tree.controls().add(item);
    tree.controls().add(new NewGroupItem());
    tree.controls().add(new ZoomToLayerItem());
    tree.controls().add(new SeparatorItem());
    tree.controls().add(new SessionCommitItem());
    tree.controls().add(new SessionRollbackItem());
    tree.controls().add(new SeparatorItem());
    tree.controls().add(new DeleteItem());
    tree.controls().add(new SeparatorItem());

    LayerPropertyItem property = new LayerPropertyItem();
    List<PropertyPane> lstproperty = new ArrayList<PropertyPane>();
    lstproperty.add(new LayerGeneralPanel());
    lstproperty.add(new JLayerCRSPane());
    lstproperty.add(new JLayerDataStructurePanel());

    LayerFilterPropertyPanel filters = new LayerFilterPropertyPanel();
    filters.addPropertyPanel(MessageBundle.format("filter"), new JCQLPropertyPanel());
    lstproperty.add(filters);

    LayerStylePropertyPanel styles = new LayerStylePropertyPanel();
    styles.addPropertyPanel(MessageBundle.format("analyze"), new JSimpleStylePanel());
    styles.addPropertyPanel(
        MessageBundle.format("analyze_vector"), new JClassificationSingleStylePanel());
    styles.addPropertyPanel(
        MessageBundle.format("analyze_vector"), new JClassificationIntervalStylePanel());
    styles.addPropertyPanel(MessageBundle.format("analyze_raster"), new JColorMapPane());
    styles.addPropertyPanel(MessageBundle.format("analyze_raster"), new JCellSymbolizerPane());
    styles.addPropertyPanel(MessageBundle.format("analyze_raster"), new JIsolineSymbolizerPane());
    styles.addPropertyPanel(MessageBundle.format("sld"), new JAdvancedStylePanel());
    styles.addPropertyPanel(MessageBundle.format("sld"), new JSLDImportExportPanel());
    lstproperty.add(styles);

    property.setPropertyPanels(lstproperty);

    tree.controls().add(property);
    tree.controls().add(new ContextPropertyItem());

    tree.revalidate();
  }
Exemplo n.º 2
0
 public SessionCommitAction(final FeatureMapLayer layer) {
   putValue(SMALL_ICON, ICON_SAVE);
   putValue(NAME, MessageBundle.format("sessionCommit"));
   putValue(SHORT_DESCRIPTION, MessageBundle.format("sessionCommit"));
   setLayer(layer);
 }