DrawingTool dt = getDrawingTool(); if (dt != null) { GraphicAttributes fga = getFilterGA(); fga.setFillPaint(OMColor.clear);  OMRect rect = (OMRect) getDrawingTool().create("com.bbn.openmap.omGraphics.OMRect", fga, layer, false); if (rect != null) { rect.setAppObject(externalKey); } else { Debug.error("DemoLayer: Drawing tool can't create OMRect"); } } else { Debug.output("DemoLayer can't find a drawing tool"); }
resetFiltering(); repaint();
            public void actionPerformed(ActionEvent event) {                DrawingTool dt = getDrawingTool();                if (dt != null) {                    GraphicAttributes fga = getFilterGA();                    fga.setFillPaint(OMColor.clear);                    OMRect rect = (OMRect) getDrawingTool().create("com.bbn.openmap.omGraphics.OMRect",                            fga,                            layer,                            false);                    if (rect != null) {                        rect.setAppObject(externalKey);                    } else {                        Debug.error("DemoLayer: Drawing tool can't create OMRect");                    }                } else {                    Debug.output("DemoLayer can't find a drawing tool");                }            }