[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/view PopupMenu.java, 1.42, 1.43
Status: Pre-Alpha
Brought to you by:
henryml
From: Sebastian G. <sg...@us...> - 2010-05-19 15:45:53
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv15024/src/net/sourceforge/bprocessor/gl/view Modified Files: PopupMenu.java Log Message: Index: PopupMenu.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/PopupMenu.java,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** PopupMenu.java 9 Mar 2010 13:01:53 -0000 1.42 --- PopupMenu.java 19 May 2010 15:45:42 -0000 1.43 *************** *** 67,75 **** /** The logger */ private static Logger log = Logger.getLogger(PopupMenu.class); ! private static final boolean CHECKS = false; private Editor editor; ! /** * The popupMenu constructor --- 67,75 ---- /** The logger */ private static Logger log = Logger.getLogger(PopupMenu.class); ! private static final boolean CHECKS = false; private Editor editor; ! /** * The popupMenu constructor *************** *** 79,83 **** this.editor = editor; } ! /** * Make a popupmenu for a list of surfaces --- 79,83 ---- this.editor = editor; } ! /** * Make a popupmenu for a list of surfaces *************** *** 110,114 **** }; menu.add(flip); ! { AbstractAction action = new EntityMenuAction(s, "Assign from Neighbours") { --- 110,114 ---- }; menu.add(flip); ! { AbstractAction action = new EntityMenuAction(s, "Assign from Neighbours") { *************** *** 122,126 **** menu.add(action); } ! { AbstractAction action = new GeometricMenuAction(surfaces, "Smooth...") { --- 122,126 ---- menu.add(action); } ! { AbstractAction action = new GeometricMenuAction(surfaces, "Smooth...") { *************** *** 194,198 **** return menu; } ! /** * --- 194,198 ---- return menu; } ! /** * *************** *** 232,236 **** return menu; } ! /** * --- 232,236 ---- return menu; } ! /** * *************** *** 242,250 **** return menu; } ! private abstract class ModellorAction extends AbstractAction { protected Modellor modellor; protected Space space; ! public ModellorAction(Modellor modellor, Space space) { super(modellor.title()); --- 242,250 ---- return menu; } ! private abstract class ModellorAction extends AbstractAction { protected Modellor modellor; protected Space space; ! public ModellorAction(Modellor modellor, Space space) { super(modellor.title()); *************** *** 253,257 **** } } ! /** * A popup generator for a collection of space --- 253,257 ---- } } ! /** * A popup generator for a collection of space *************** *** 261,267 **** private JPopupMenu getSpaceMenu(Collection s) { JPopupMenu menu = getGeometricMenu(s); ! menu.addSeparator(); ! { AbstractAction action = new CollectionMenuAction(s, "Explode") { --- 261,267 ---- private JPopupMenu getSpaceMenu(Collection s) { JPopupMenu menu = getGeometricMenu(s); ! menu.addSeparator(); ! { AbstractAction action = new CollectionMenuAction(s, "Explode") { *************** *** 272,276 **** Collection<Edge> edges = new LinkedList(space.getEdges()); Collection<Surface> surfaces = new LinkedList(space.getSurfaces()); ! for (Vertex current : vertices) { space.remove(current); --- 272,276 ---- Collection<Edge> edges = new LinkedList(space.getEdges()); Collection<Surface> surfaces = new LinkedList(space.getSurfaces()); ! for (Vertex current : vertices) { space.remove(current); *************** *** 285,289 **** space.getOwner().insert(current); } ! for (Surface current : surfaces) { space.remove(current); --- 285,289 ---- space.getOwner().insert(current); } ! for (Surface current : surfaces) { space.remove(current); *************** *** 294,298 **** space.getOwner().insert(current); } ! } } --- 294,298 ---- space.getOwner().insert(current); } ! } } *************** *** 322,326 **** // Some options do only apply to one space Space sp = (Space)s.iterator().next(); ! AbstractAction edit = new SpaceMenuAction(sp, "Edit") { public void actionPerformed(ActionEvent arg0) { --- 322,326 ---- // Some options do only apply to one space Space sp = (Space)s.iterator().next(); ! AbstractAction edit = new SpaceMenuAction(sp, "Edit") { public void actionPerformed(ActionEvent arg0) { *************** *** 349,354 **** menu.add(action); } ! ! { AbstractAction action = new SpaceMenuAction(sp, "Subdivide...") { --- 349,354 ---- menu.add(action); } ! ! { AbstractAction action = new SpaceMenuAction(sp, "Subdivide...") { *************** *** 370,373 **** --- 370,400 ---- } { + AbstractAction action = new SpaceMenuAction(sp, "Hyperbolic Paraboloid..") { + public void actionPerformed(ActionEvent event) { + Command command = new Command.Hyperbolicparaboloid(space); + AttributeView.instance().display(command); + } + }; + menu.add(action); + } + { + AbstractAction action = new SpaceMenuAction(sp, "Uniform Nonrational B-Spline..") { + public void actionPerformed(ActionEvent event) { + Command command = new Command.UniformNonrationalBSpline(space); + AttributeView.instance().display(command); + } + }; + menu.add(action); + } + { + AbstractAction action = new SpaceMenuAction(sp, "Nonuniform Nonrational B-Spline..") { + public void actionPerformed(ActionEvent event) { + Command command = new Command.NonuniformNonrationalBSpline(space); + AttributeView.instance().display(command); + } + }; + menu.add(action); + } + { AbstractAction action = new SpaceMenuAction(sp, "Offset..") { public void actionPerformed(ActionEvent event) { *************** *** 445,449 **** menu.add(action); } ! AbstractAction item = new SpaceMenuAction(sp, "Consistency Check") { public void actionPerformed(ActionEvent arg0) { --- 472,476 ---- menu.add(action); } ! AbstractAction item = new SpaceMenuAction(sp, "Consistency Check") { public void actionPerformed(ActionEvent arg0) { *************** *** 452,456 **** }; menu.add(item); ! if (CHECKS) { AbstractAction check = new SpaceMenuAction(sp, "Consistency Check") { --- 479,483 ---- }; menu.add(item); ! if (CHECKS) { AbstractAction check = new SpaceMenuAction(sp, "Consistency Check") { *************** *** 553,557 **** }; menu.add(allConnected); ! AbstractAction simplify = new GeometricMenuAction(arguments, "Simplify Geometry") { public void actionPerformed(ActionEvent arg0) { --- 580,584 ---- }; menu.add(allConnected); ! AbstractAction simplify = new GeometricMenuAction(arguments, "Simplify Geometry") { public void actionPerformed(ActionEvent arg0) { *************** *** 560,564 **** }; menu.add(simplify); ! { AbstractAction action = new GeometricMenuAction(arguments, "Make Union") { --- 587,591 ---- }; menu.add(simplify); ! { AbstractAction action = new GeometricMenuAction(arguments, "Make Union") { *************** *** 570,574 **** Set<Edge> edges = new HashSet(); Set<Vertex> vertices = new HashSet(); ! for (Geometric current : entities) { if (current instanceof Item) { --- 597,601 ---- Set<Edge> edges = new HashSet(); Set<Vertex> vertices = new HashSet(); ! for (Geometric current : entities) { if (current instanceof Item) { *************** *** 593,597 **** geometrics.addAll(vertices); } ! Mesh mesh = new Mesh(geometrics); HashMap map = new HashMap(); --- 620,624 ---- geometrics.addAll(vertices); } ! Mesh mesh = new Mesh(geometrics); HashMap map = new HashMap(); *************** *** 638,644 **** public void actionPerformed(ActionEvent event) { Set<Vertex> vertices = Geometric.collect(entities); ! Vertex center = null; ! if (entities.size() == 1) { Geometric geometric = entities.iterator().next(); --- 665,671 ---- public void actionPerformed(ActionEvent event) { Set<Vertex> vertices = Geometric.collect(entities); ! Vertex center = null; ! if (entities.size() == 1) { Geometric geometric = entities.iterator().next(); *************** *** 648,656 **** } } ! if (center == null) { center = Vertex.center(vertices); } ! CoordinateSystem system = Project.getInstance().getActiveCoordinateSystem(); system = system.copy(); --- 675,683 ---- } } ! if (center == null) { center = Vertex.center(vertices); } ! CoordinateSystem system = Project.getInstance().getActiveCoordinateSystem(); system = system.copy(); *************** *** 666,672 **** public void actionPerformed(ActionEvent event) { Set<Vertex> vertices = Geometric.collect(entities); ! Vertex center = null; ! if (entities.size() == 1) { Geometric geometric = entities.iterator().next(); --- 693,699 ---- public void actionPerformed(ActionEvent event) { Set<Vertex> vertices = Geometric.collect(entities); ! Vertex center = null; ! if (entities.size() == 1) { Geometric geometric = entities.iterator().next(); *************** *** 676,688 **** } } ! if (center == null) { center = Vertex.center(vertices); } ! CoordinateSystem system = Project.getInstance().getActiveCoordinateSystem(); system = system.copy(); system.setOrigin(center); ! Command command = new Command.Translate(vertices, system); AttributeView.instance().display(command); --- 703,715 ---- } } ! if (center == null) { center = Vertex.center(vertices); } ! CoordinateSystem system = Project.getInstance().getActiveCoordinateSystem(); system = system.copy(); system.setOrigin(center); ! Command command = new Command.Translate(vertices, system); AttributeView.instance().display(command); *************** *** 695,701 **** public void actionPerformed(ActionEvent event) { Set<Vertex> vertices = Geometric.collect(entities); ! Vertex center = null; ! if (entities.size() == 1) { Geometric geometric = entities.iterator().next(); --- 722,728 ---- public void actionPerformed(ActionEvent event) { Set<Vertex> vertices = Geometric.collect(entities); ! Vertex center = null; ! if (entities.size() == 1) { Geometric geometric = entities.iterator().next(); *************** *** 705,717 **** } } ! if (center == null) { center = Vertex.center(vertices); } ! CoordinateSystem system = Project.getInstance().getActiveCoordinateSystem(); system = system.copy(); system.setOrigin(center); ! Command command = new Command.Rotate(vertices, system); AttributeView.instance().display(command); --- 732,744 ---- } } ! if (center == null) { center = Vertex.center(vertices); } ! CoordinateSystem system = Project.getInstance().getActiveCoordinateSystem(); system = system.copy(); system.setOrigin(center); ! Command command = new Command.Rotate(vertices, system); AttributeView.instance().display(command); *************** *** 761,769 **** menu.add(action); } ! } return menu; } ! /** * Get background menu --- 788,796 ---- menu.add(action); } ! } return menu; } ! /** * Get background menu *************** *** 896,900 **** return menu; } ! /** * --- 923,927 ---- return menu; } ! /** * *************** *** 995,1000 **** return menu; } ! ! /** * --- 1022,1027 ---- return menu; } ! ! /** * *************** *** 1016,1023 **** return menu; } ! /** {@inheritDoc} */ public JPopupMenu menuFor(Collection<? extends Entity> geometrics) { ! if (geometrics.isEmpty()) { return getBackgroundMenu(); --- 1043,1050 ---- return menu; } ! /** {@inheritDoc} */ public JPopupMenu menuFor(Collection<? extends Entity> geometrics) { ! if (geometrics.isEmpty()) { return getBackgroundMenu(); |