Ejemplo n.º 1
0
 /**
  * Returns the layer name (depending of the "show layer names" check cob is clicked)
  *
  * @param layer
  * @return
  */
 private String getLayerName(WFSLayerNode layer) {
   if (showLayerNames) {
     return "[" + layer.getName() + "] " + layer.getTitle();
   } else {
     return layer.getTitle();
   }
 }
  /**
   * Refreshes the wizard components data each time a feature is selected. The
   * <i>describeFeatureType</i> operation must be sent.
   */
  public void refreshData() {
    WFSLayerNode lyr = (WFSLayerNode) getLstFeatures().getSelectedValue();

    try {
      getTxtName().setText(lyr.getTitle());
    } catch (NullPointerException e) {
      getTxtName().setText(PluginServices.getText(this, "default_name"));
      NotificationManager.addError(PluginServices.getText(this, "default_name"), e);
    }

    IPanelGroup panelGroup = getPanelGroup();

    if (panelGroup == null) return;

    ((WFSParamsPanel) panelGroup).refresh(lyr);

    repaint();
  }