Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4003
Modified Files:
SelectTool.java
Log Message:
solved a conflict
Index: SelectTool.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SelectTool.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** SelectTool.java 26 Aug 2005 14:48:15 -0000 1.9
--- SelectTool.java 30 Aug 2005 12:59:36 -0000 1.10
***************
*** 26,30 ****
import java.util.Iterator;
import java.util.Set;
- import java.util.List;
import org.apache.log4j.Logger;
--- 26,29 ----
***************
*** 113,140 ****
viewType = View.VIEW_3D;
}
! Vertex v = vertexCollide(coords);
! if ((v != null) && (viewType != View.VIEW_3D)) {
Notification n = new Notification(Notification.VERTEX_SELECTED, v.getId());
Notifier.getInstance().sendNotification(n);
! } else {
! Object selectObject;
! selectObject = view.getObjectAtPoint(x, y);
! if (selectObject instanceof Surface) {
! Surface surface = (Surface)selectObject;
! Notification n = new Notification(Notification.SURFACE_SELECTED, surface.getId());
! Notifier.getInstance().sendNotification(n);
! } else if (selectObject instanceof Edge) {
! Edge edge = (Edge)selectObject;
! Notification n = new Notification(Notification.EDGE_SELECTED, edge.getId());
! Notifier.getInstance().sendNotification(n);
! } else if (selectObject instanceof Vertex) {
! Vertex vertex = (Vertex) selectObject;
! Notification n = new Notification(Notification.VERTEX_SELECTED, vertex.getId());
! Notifier.getInstance().sendNotification(n);
! selectedVertex = vertex;
! }
! }
! }
! }
/**
--- 112,134 ----
viewType = View.VIEW_3D;
}
!
! Object selectObject;
! selectObject = view.getObjectAtPoint(x, y);
! if (selectObject instanceof Vertex) {
! Vertex v = (Vertex)selectObject;
Notification n = new Notification(Notification.VERTEX_SELECTED, v.getId());
Notifier.getInstance().sendNotification(n);
! } else if (selectObject instanceof Surface) {
! Surface surface = (Surface)selectObject;
! Notification n = new Notification(Notification.SURFACE_SELECTED, surface.getId());
! Notifier.getInstance().sendNotification(n);
! } else if (selectObject instanceof Edge) {
! Edge edge = (Edge)selectObject;
! Notification n = new Notification(Notification.EDGE_SELECTED, edge.getId());
! Notifier.getInstance().sendNotification(n);
! }
! }
! }
!
/**
***************
*** 196,241 ****
super.keyPressed(e);
}
! }
!
!
! /**
! * Deletes a surface and its edges if it is safe to do so.
! * @param surface the surface to delete
! */
! private void deleteSurface(Surface surface) {
! List edges = surface.getEdges();
! Iterator it = edges.iterator();
! Edge edge = null;
! removeSurface(surface);
! while (it.hasNext()) {
! edge = (Edge)it.next();
! deleteEdge(edge);
! }
!
! }
!
! /**
! * Deletes an edge and it's endpoint vertecies if it is safe to do so.
! * @param edge the edge to delete
! */
! private void deleteEdge(Edge edge) {
! Set surfaces = edge.getSurfaces();
! if (surfaces.size() < 1) {
! removeEdge(edge);
! deleteVertex(edge.getTo());
! deleteVertex(edge.getFrom());
! }
! }
!
! /**
! * Deletes a vertex if it is safe to do so.
! * @param vertex the vertex to delete
! */
! private void deleteVertex(Vertex vertex) {
! Set edges = vertex.getEdges();
! if (edges.size() < 1) {
! removeVertex(vertex);
! }
! }
/**
--- 190,194 ----
super.keyPressed(e);
}
! }
/**
|