[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/view View.java, 1.236, 1.237 Display.java,
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2007-10-02 12:38:12
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2919/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Display.java Log Message: constructor drawing Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Display.java 2 Oct 2007 06:42:09 -0000 1.16 --- Display.java 2 Oct 2007 12:38:01 -0000 1.17 *************** *** 53,56 **** --- 53,57 ---- private static Collection<? extends Geometric> extras; private static Grid grid; + private static boolean intersecting; *************** *** 183,186 **** --- 184,203 ---- /** + * Returns the value of intersecting + * @return intersecting + */ + public static boolean intersecting() { + return intersecting; + } + + /** + * Sets the value of intersecting + * @param value intersecting + */ + public static void intersecting(boolean value) { + intersecting = value; + } + + /** * Sets the objects table * @param value ArrayList *************** *** 425,432 **** private static void selectConstructors(Collection<Constructor> constructors) { ! for (Constructor current : constructors) { ! push(current); ! draw(current); ! pop(); } } --- 442,456 ---- private static void selectConstructors(Collection<Constructor> constructors) { ! if (intersecting) { ! for (Constructor current : constructors) { ! Collection<Edge> guides = current.guides(grid.size()); ! selectEdges(guides); ! } ! } else { ! for (Constructor current : constructors) { ! push(current); ! draw(current); ! pop(); ! } } } *************** *** 674,680 **** --- 698,707 ---- { Collection<Edge> edges = new LinkedList(); + Collection<Constructor> constructors = new LinkedList(); for (Geometric current : extras) { if (current instanceof Edge) { edges.add((Edge) current); + } else if (current instanceof Constructor) { + constructors.add((Constructor) current); } } *************** *** 684,687 **** --- 711,720 ---- drawEdges(edges, true); } + if (selecting()) { + selectConstructors(constructors); + } else { + paintConstructors(constructors); + } + } Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.236 retrieving revision 1.237 diff -C2 -d -r1.236 -r1.237 *** View.java 25 Sep 2007 11:07:38 -0000 1.236 --- View.java 2 Oct 2007 12:38:01 -0000 1.237 *************** *** 702,708 **** Display.target(null); } ! Display.extras(tempEdges); Display.draw(gld); Display.selecting(false); } else { drawAll(hitdetection); --- 702,717 ---- Display.target(null); } ! if (selectionMode == INTERSECTIONS) { ! Display.intersecting(true); ! } else { ! Display.intersecting(false); ! } ! Collection<Geometric> extras = new LinkedList(); ! extras.addAll(tempEdges); ! extras.addAll(tempConstructors); ! Display.extras(extras); Display.draw(gld); Display.selecting(false); + Display.intersecting(false); } else { drawAll(hitdetection); |