Revision 11073 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/styling/SymbolPreviewer.java

View differences:

SymbolPreviewer.java
43 43
*
44 44
* $Id$
45 45
* $Log$
46
* Revision 1.3  2007-04-04 16:01:14  jaume
46
* Revision 1.4  2007-04-05 16:08:34  jaume
47
* Styled labeling stuff
48
*
49
* Revision 1.3  2007/04/04 16:01:14  jaume
47 50
* *** empty log message ***
48 51
*
49 52
* Revision 1.2  2007/03/09 11:25:00  jaume
......
101 104
import java.awt.Graphics;
102 105
import java.awt.Graphics2D;
103 106
import java.awt.Rectangle;
107
import java.awt.event.MouseListener;
108
import java.awt.event.MouseMotionListener;
104 109
import java.awt.geom.AffineTransform;
105 110

  
106 111
import javax.swing.JPanel;
......
119 124

  
120 125

  
121 126
	public SymbolPreviewer() {
122
		super();
127
		super(true);
123 128
		setBackground(Color.WHITE);
124 129
	}
125 130

  
......
153 158
			g2.drawString(noneSelected,	 (r.x*scale) - (hGap/2), r.height/2+vGap*scale);
154 159
		}
155 160
	}
161

  
162

  
163
	public void setEditorTool(EditorTool l) {
164
		MouseListener[] ml = getMouseListeners();
165
		for (int i = 0; i < ml.length; i++) {
166
			super.removeMouseListener(ml[i]);
167
		}
168
		MouseMotionListener[] mml = getMouseMotionListeners();
169
		for (int i = 0; i < mml.length; i++) {
170
			super.removeMouseMotionListener(mml[i]);
171
		}
172

  
173
		if (l!= null) {
174
			super.addMouseListener(l);
175
			setCursor(l.getCursor());
176
			super.addMouseMotionListener(l);
177
		}
178
	}
179

  
180

  
156 181
}

Also available in: Unified diff