if (getGISDisplay().getDrawModel() != null){
if (getGISDisplay().getDrawModel() instanceof SelectDrawModel){
SelectDrawModel tempSelectDrawModel = (SelectDrawModel) getGISDisplay().getDrawModel();
Record[] tempRecords = tempSelectDrawModel.getSelectedRecords();
if (tempRecords != null){
Layer tempSelectedLayer = getGISDisplay().getSelectedLayer();
if (tempSelectedLayer != null){
// If the layer is updateable, then delete the records
if (tempSelectedLayer.isUpdateable()){
for (int i=0; i<tempRecords.length; i++){
tempSelectedLayer.delete(tempRecords[i]);
}
}
// The layer is not updateable, so show an information message.
else{