private void populate(String wktString){
  wktGeometry=WKTConversion.parseWKTString(wktString);
  WKTType geometryType=null;
  boolean valid=false;
  if (wktGeometry != null) {
    geometryType=wktGeometry.getGeometryType();
    valid=wktGeometry.isValid();
  }
  model.setSelectedItem(geometryType);
  updateUI(geometryType);
  if (valid) {
    if (geometryType.canHaveMultipleShapes()) {
      populateMultiShapeList();
    }
 else {
      populateSegmentList(0);
    }
  }
  wktTextArea.setText(wktString);
  updateWKTString();
}

private void populate ( String wktString ) { wktGeometry = WKTConversion . parseWKTString ( wktString ) ; WKTType geometryType = null ; boolean valid = false ; if ( wktGeometry != null ) { geometryType = wktGeometry . getGeometryType ( ) ; valid = wktGeometry . isValid ( ) ; } model . setSelectedItem ( geometryType ) ; updateUI ( geometryType ) ; if ( valid ) { if ( geometryType . canHaveMultipleShapes ( ) ) { populateMultiShapeList ( ) ; } else { populateSegmentList ( 0 ) ; } } wktTextArea . setText ( wktString ) ; updateWKTString ( ) ; }
populate dialog using wkt : / / string .
