Revision 38029

View differences:

trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/layout/tools/LayoutSelectListenerImpl.java
227 227
             if (cursor != null) {
228 228
                 layout.getLayoutControl().setMapCursor(cursor);
229 229
             }
230
//             else {
231
//                 layout.setMapCursor(Layout.icrux);
232
//             }
230
             else {
231
                 layout.getLayoutControl().setMapCursor(cur);
232
             }
233 233
         }
234 234
  	}
235 235

  
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/layout/tools/behavior/LayoutSelectBehavior.java
77 77
	 * @see com.iver.cit.gvsig.fmap.tools.Behavior.Behavior#paintComponent(java.awt.Graphics)
78 78
	 */
79 79
	public void paintComponent(Graphics g) {
80
		VolatileImage image = createVolatileImage();
81
		Graphics gh = image.createGraphics();
82
		gh.setColor(getLayoutControl().getBackground());
83
		gh.fillRect(0, 0, image.getWidth(), image.getHeight());
80
//		VolatileImage image = createVolatileImage();
81
//		Graphics gh = image.createGraphics();
82
//		gh.setColor(getLayoutControl().getBackground());
83
//		gh.fillRect(0, 0, image.getWidth(), image.getHeight());
84
//
85
//		getLayoutControl().getLayoutDraw().drawRectangle((Graphics2D) gh);
86
//		gh.drawImage(getLayoutControl().getImgRuler(),0,0,null);
87
//		gh.drawImage(getLayoutControl().getImage(),0,0,null);
88
//		getLayoutControl().getLayoutDraw().drawGrid((Graphics2D) gh);
89
//
90
//		getLayoutControl().getLayoutDraw().drawHandlers((Graphics2D)gh, Color.black);
91
//		gh.setColor(Color.black);
92
//		gh.setXORMode(Color.white);
84 93

  
85
		getLayoutControl().getLayoutDraw().drawRectangle((Graphics2D) gh);
86
		gh.drawImage(getLayoutControl().getImgRuler(),0,0,null);
87
		gh.drawImage(getLayoutControl().getImage(),0,0,null);
88
		getLayoutControl().getLayoutDraw().drawGrid((Graphics2D) gh);
94
		if (getLayoutControl().getImage() != null)
95
		{
96
			g.setColor(getLayoutControl().getBackground());
97
			g.fillRect(0, 0, getLayoutControl().getImage().getWidth(), getLayoutControl().getImage().getHeight());
98
	
99
			getLayoutControl().getLayoutDraw().drawRectangle((Graphics2D) g);
100
			
101
			g.setColor(Color.black);
102
			
103
			g.drawImage(getLayoutControl().getImage(),0,0,null);
104
			g.drawImage(getLayoutControl().getImgRuler(), 0,0,null);
105
		}
89 106

  
90
		getLayoutControl().getLayoutDraw().drawHandlers((Graphics2D)gh, Color.black);
91
		gh.setColor(Color.black);
92
		gh.setXORMode(Color.white);
107
		g.setColor(Color.black);
108
		g.setXORMode(Color.white);
93 109

  
110
		
94 111
		if (getLayoutControl().isReSel()) {
95 112
        	Rectangle reSel=getLayoutControl().getReSel();
96 113
        	reSel=new Rectangle();
97 114
        	reSel.setFrameFromDiagonal(getLayoutControl().getFirstPoint(), getLayoutControl().getLastPoint());
98
            gh.drawRect(reSel.x, reSel.y, reSel.width, reSel.height);
115
//            gh.drawRect(reSel.x, reSel.y, reSel.width, reSel.height);
116
            g.drawRect(reSel.x, reSel.y, reSel.width, reSel.height);
99 117
        }
100 118
        IFFrame[] frames = getLayoutControl().getLayoutContext().getFFrameSelected();
101 119
        for (int i = 0; i < frames.length; i++) {
102
            gh.setColor(Color.black);
120
//            gh.setColor(Color.black);
103 121
            frames[i].drawHandlers((Graphics2D) g);
104 122
            int difx = (getLayoutControl().getLastPoint().x - getLayoutControl().getFirstPoint().x);
105 123
            int dify = (getLayoutControl().getLastPoint().y - getLayoutControl().getFirstPoint().y);
......
107 125
                Rectangle2D rectangle = frames[i].getMovieRect(difx, dify);
108 126
                if (rectangle == null)
109 127
                    return;
110
                ((Graphics2D) gh).rotate(Math.toRadians(frames[i]
128
                ((Graphics2D) g).rotate(Math.toRadians(frames[i]
111 129
                        .getRotation()), rectangle.getX()
112 130
                        + (rectangle.getWidth() / 2), rectangle.getY()
113 131
                        + (rectangle.getHeight() / 2));
114 132

  
115 133
                if (rectangle != null && dragged && !getLayoutControl().isReSel()) {
116
                    gh.drawRect((int) rectangle.getMinX(), (int) rectangle
134
                    g.drawRect((int) rectangle.getMinX(), (int) rectangle
117 135
                            .getMinY(), (int) rectangle.getWidth(),
118 136
                            (int) rectangle.getHeight());
119 137
                }
120 138

  
121
                ((Graphics2D) gh).rotate(Math.toRadians(-frames[i]
139
                ((Graphics2D) g).rotate(Math.toRadians(-frames[i]
122 140
                        .getRotation()), rectangle.getX()
123 141
                        + (rectangle.getWidth() / 2), rectangle.getY()
124 142
                        + (rectangle.getHeight() / 2));
......
127 145
        }
128 146

  
129 147
//		long t2 = System.currentTimeMillis();
130
		gh.setPaintMode();
148
		g.setPaintMode();
131 149
//		getLayoutControl().getLayoutDraw().drawRuler((Graphics2D) gh, Color.black);
132
		g.drawImage(image,0,0,null);
150
//		g.drawImage(image,0,0,null);
133 151

  
134 152

  
135 153

  
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/MapContext.java
79 79
import com.iver.cit.gvsig.fmap.layers.name.LayerNameUtils;
80 80
import com.iver.cit.gvsig.fmap.layers.order.DefaultOrderManager;
81 81
import com.iver.cit.gvsig.fmap.layers.order.OrderManager;
82
import com.iver.cit.gvsig.fmap.operations.Cancel;
82 83
import com.iver.cit.gvsig.fmap.operations.selection.Record;
83 84
import com.iver.cit.gvsig.fmap.operations.strategies.FeatureVisitor;
84 85
import com.iver.cit.gvsig.fmap.operations.strategies.SelectedZoomVisitor;
......
1148 1149
	public void draw(BufferedImage image, Graphics2D g, double scale)
1149 1150
			throws ReadDriverException {
1150 1151
//		layers.setDirty(true);
1151
		draw(image, g, new Cancellable() {
1152
			/**
1153
			 * @see com.iver.utiles.swing.threads.Cancellable#isCanceled()
1154
			 */
1155
			public boolean isCanceled() {
1156
				return false;
1157
			}
1158

  
1159
			public void setCanceled(boolean canceled) {
1160
				// TODO Auto-generated method stub
1161

  
1162
			}
1163
		}, scale);
1152
		Cancel cancel = new Cancel();
1153
		draw(image, g, cancel, scale);
1164 1154
	}
1165 1155

  
1166 1156

  

Also available in: Unified diff