Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27109/src/net/sourceforge/bprocessor/gl/view
Modified Files:
View.java
Log Message:
Refactored ClickBox related code
Index: View.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v
retrieving revision 1.174
retrieving revision 1.175
diff -C2 -d -r1.174 -r1.175
*** View.java 25 Jan 2007 10:20:52 -0000 1.174
--- View.java 25 Jan 2007 12:14:30 -0000 1.175
***************
*** 8,11 ****
--- 8,12 ----
import net.sourceforge.bprocessor.gl.GLView;
+ import net.sourceforge.bprocessor.gl.tool.ClickBox;
import net.sourceforge.bprocessor.gl.tool.SpaceTool;
import net.sourceforge.bprocessor.gl.model.GlObject;
***************
*** 355,359 ****
private Set highligts;
! /** GL objects that are in the model */
private Set glObjects3D;
--- 356,362 ----
private Set highligts;
! /** GL objects that are in the model
! * FIXME this should be a list to be able to control ordering.
! */
private Set glObjects3D;
***************
*** 456,462 ****
}
}
!
!
!
/**
* The constructor
--- 459,463 ----
}
}
!
/**
* The constructor
***************
*** 929,936 ****
if (object instanceof Space) {
Space space = (Space) object;
! Collection<Surface> envelope = space.getEnvelope();
! for (Surface surface : envelope) {
! highligts.addAll(surface.getEdges());
! invisibles.add(surface);
}
} else {
--- 930,947 ----
if (object instanceof Space) {
Space space = (Space) object;
! if (space.isUnion()) {
! for (Space element : (Collection<Space>) space.getElements()) {
! Collection<Surface> envelope = element.getEnvelope();
! for (Surface surface : envelope) {
! highligts.addAll(surface.getEdges());
! invisibles.add(surface);
! }
! }
! } else {
! Collection<Surface> envelope = space.getEnvelope();
! for (Surface surface : envelope) {
! highligts.addAll(surface.getEdges());
! invisibles.add(surface);
! }
}
} else {
***************
*** 1049,1053 ****
if (selection) {
drawClickBox(5 + length, height - 15, 0.5,
! nameLength, 10, sp);
}
length = nameLength;
--- 1060,1064 ----
if (selection) {
drawClickBox(5 + length, height - 15, 0.5,
! nameLength, 10, new ClickBox(sp));
}
length = nameLength;
***************
*** 1063,1067 ****
if (selection) {
drawClickBox(5 + length, height - 15, 0.5,
! nameLength, 10, sp);
}
length += nameLength;
--- 1074,1078 ----
if (selection) {
drawClickBox(5 + length, height - 15, 0.5,
! nameLength, 10, new ClickBox(sp));
}
length += nameLength;
|