Package gistoolkit.display

Examples of gistoolkit.display.Layer


                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){
                               
                                // Create copies of the records.
                                Record[] tempCopyRecords = new Record[tempRecords.length];
                                for (int i=0; i<tempRecords.length; i++){
View Full Code Here


    /** Execute the cut command */
    public void execute(){
        // determine if there is a current selection
        try{
            if (getGISEditor() != null){
                Layer tempSelectedLayer = getGISDisplay().getSelectedLayer();
                if (tempSelectedLayer != null){
                    Record[] tempRecords = getGISEditor().getCopyBuffer();
                    if (tempRecords != null){
                        if (tempSelectedLayer.isUpdateable()){
                            for (int i=0; i<tempRecords.length; i++){
                                tempSelectedLayer.insert(tempRecords[i]);
                            }
                            getGISEditor().refresh();
                        }
                        else{
                            showInformation("Layer Not Updateable", "Can not insert records.");
View Full Code Here

       
        if ((mySelectedRecords == null) || (mySelectedRecords.length == 0)) super.draw();
        else{
            if ((getGISDisplay().getBufferImage() != null) && (getGISDisplay().getMapImage() != null)){
                getGISDisplay().getBufferImage().getGraphics().drawImage(getGISDisplay().getMapImage(), 0, 0, getGISDisplay());
                Layer tempLayer = getGISDisplay().getSelectedLayer();
                if (tempLayer != null){
                    for (int i=0; i<mySelectedRecords.length; i++){
                        tempLayer.drawHighlight(mySelectedRecords[i], getGISDisplay().getBufferImage().getGraphics(), getGISDisplay().getConverter());
                    }
                }
                getGISDisplay().getGraphics().drawImage(getGISDisplay().getBufferImage(), 0, 0, getGISDisplay());
            }
        }
View Full Code Here

    public void execute(){
        // query the user for the name of the new layer
        String tempName = JOptionPane.showInputDialog(getGISEditor(), "Enter the Name", "Name", JOptionPane.QUESTION_MESSAGE);
        if (tempName != null) {
            MemoryDataSource tempDataSource = new MemoryDataSource(tempName);
            Layer tempLayer = new Layer(tempDataSource);
            tempLayer.setLayerName(tempName);
            MonoShader tempShader = new MonoShader();
            tempShader.setFillColor(Color.lightGray);
            tempShader.setLineColor(Color.black);
            tempLayer.getStyle().setShader(tempShader);
            try{
                getGISDisplay().addLayer(tempLayer);
                getGISEditor().getLayerPanel().refresh();
            }
            catch (Exception e){
View Full Code Here

                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{
View Full Code Here

TOP

Related Classes of gistoolkit.display.Layer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.