Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10339/src/net/sourceforge/bprocessor/gl/tool
Modified Files:
SelectTool.java
Log Message:
Select labels
Index: SelectTool.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SelectTool.java,v
retrieving revision 1.72
retrieving revision 1.73
diff -C2 -d -r1.72 -r1.73
*** SelectTool.java 20 Dec 2007 11:44:40 -0000 1.72
--- SelectTool.java 22 Jul 2008 13:19:52 -0000 1.73
***************
*** 9,14 ****
--- 9,16 ----
import net.sourceforge.bprocessor.gl.Editor;
import net.sourceforge.bprocessor.gui.GUI;
+ import net.sourceforge.bprocessor.model.Container;
import net.sourceforge.bprocessor.model.Geometric;
import net.sourceforge.bprocessor.model.Selection;
+ import net.sourceforge.bprocessor.model.Surface;
import java.awt.Cursor;
***************
*** 45,50 ****
*/
protected void pressed(MouseEvent e) {
if (e.getButton() == MouseEvent.BUTTON1) {
! select.pressed(e);
}
}
--- 47,93 ----
*/
protected void pressed(MouseEvent e) {
+ boolean done = false;
if (e.getButton() == MouseEvent.BUTTON1) {
! if (!(SelectTool.this instanceof SpaceTool)) {
! if (target != null) {
! if (target instanceof String) {
! String side = (String)target;
! Surface surface = null;
! Container space = null;
!
! {
! Selection selection = Selection.primary();
! Object candidate = null;
! if (selection.size() == 1) {
! candidate = selection.iterator().next();
! }
! if (candidate instanceof Surface) {
! surface = (Surface) candidate;
! }
! }
!
!
! if (surface != null) {
!
! if (surface != null) {
! if (side.equals("front")) {
! space = surface.getFrontDomain();
! }
! if (side.equals("back")) {
! space = surface.getBackDomain();
! }
! }
! }
!
! if (space != null) {
! Selection.primary().set(space);
! done = true;
! }
! }
! }
! }
! if (!done) {
! select.pressed(e);
! }
}
}
|