[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/tool SpaceTool.java, 1.102, 1.103
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2011-03-06 23:13:35
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory vz-cvs-2.sog:/tmp/cvs-serv5261/src/net/sourceforge/bprocessor/gl/tool Modified Files: SpaceTool.java Log Message: Removed the "empty" space Index: SpaceTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SpaceTool.java,v retrieving revision 1.102 retrieving revision 1.103 diff -C2 -d -r1.102 -r1.103 *** SpaceTool.java 25 Jun 2009 22:17:40 -0000 1.102 --- SpaceTool.java 6 Mar 2011 23:13:32 -0000 1.103 *************** *** 150,159 **** JPopupMenu menu = new JPopupMenu(side); SpacePopupListener spl = new SpacePopupListener(side.equals("front"), editor.getView()); ! ! ! Surface surface = null; ! Space space = null; ! { Selection selection = Selection.primary(); --- 150,158 ---- JPopupMenu menu = new JPopupMenu(side); SpacePopupListener spl = new SpacePopupListener(side.equals("front"), editor.getView()); ! ! ! Surface surface = null; ! { Selection selection = Selection.primary(); *************** *** 166,228 **** } } ! ! if (surface != null) { ! ! if (surface != null) { ! if (side.equals("front")) { ! space = surface.getFrontDomain(); ! } ! if (side.equals("back")) { ! space = surface.getBackDomain(); ! } ! } ! ! ! ! JMenuItem voidItem = new JMenuItem("Void"); ! Space sp = Project.getInstance().getActiveSpace(); ActionListener voidListener = ! new DomainPopupListener(sp.getEmpty(), ! surface, ! side.equals("front")); voidItem.addActionListener(voidListener); ! Collection domains = null; String category = null; ! Space owner = space.getOwner(); ! ! ! ! if (space.getLevel() == Space.PROJECT_LEVEL) { ! domains = Project.getInstance().getSpaces(); ! category = "Project"; ! } else if (space.getLevel() == Space.SPACE_LEVEL) { ! domains = owner.getElements(); category = "Space"; ! } else if (space.getLevel() == Space.ELEMENT_LEVEL) { ! domains = owner.getElements(); category = "Element"; ! } else if (space.getLevel() == Space.PART_LEVEL) { ! domains = owner.getElements(); category = "Part"; } ! ! JMenuItem createFuncItem = new JMenuItem("New Functional " + category); ActionListener funcListener = new CreateSpaceActionListener(surface, ! side.equals("front"), ! true); createFuncItem.addActionListener(funcListener); ! JMenuItem createConstItem = new JMenuItem("New Construction " + category); ActionListener constListener = new CreateSpaceActionListener(surface, ! side.equals("front"), ! false); createConstItem.addActionListener(constListener); ! ! JMenuItem selectSpaceItem = new JMenuItem("Select " + category); ! selectSpaceItem.addActionListener(new SpaceMenuAction(space, "Select") { public void actionPerformed(ActionEvent arg0) { if (space != null) { --- 165,207 ---- } } ! ! if (surface != null) { ! JMenuItem voidItem = new JMenuItem("empty"); ActionListener voidListener = ! new DomainPopupListener(null, ! surface, ! side.equals("front")); voidItem.addActionListener(voidListener); ! Collection domains = null; String category = null; ! Space owner = surface.getOwner(); ! ! domains = owner.getElements(); ! ! if (owner.getLevel() == Space.PROJECT_LEVEL) { category = "Space"; ! } else if (owner.getLevel() == Space.SPACE_LEVEL) { category = "Element"; ! } else if (owner.getLevel() == Space.ELEMENT_LEVEL) { category = "Part"; } ! JMenuItem createFuncItem = new JMenuItem("New Functional " + category); ActionListener funcListener = new CreateSpaceActionListener(surface, ! side.equals("front"), ! true); createFuncItem.addActionListener(funcListener); ! JMenuItem createConstItem = new JMenuItem("New Construction " + category); ActionListener constListener = new CreateSpaceActionListener(surface, ! side.equals("front"), ! false); createConstItem.addActionListener(constListener); ! ! JMenuItem selectSpaceItem = new JMenuItem("Select " + category); ! selectSpaceItem.addActionListener(new SpaceMenuAction(owner, "Select") { public void actionPerformed(ActionEvent arg0) { if (space != null) { *************** *** 232,238 **** } }); ! JMenuItem editSpaceItem = new JMenuItem("Edit " + category); ! editSpaceItem.addActionListener(new SpaceMenuAction(space, "Edit") { public void actionPerformed(ActionEvent arg0) { if (space != null) { --- 211,217 ---- } }); ! JMenuItem editSpaceItem = new JMenuItem("Edit " + category); ! editSpaceItem.addActionListener(new SpaceMenuAction(owner, "Edit") { public void actionPerformed(ActionEvent arg0) { if (space != null) { *************** *** 243,253 **** } }); ! ! ! ! if (!space.isContainer()) { editSpaceItem.setEnabled(false); } ! JMenu funcMenu = new JMenu("Functional " + category + "s"); JMenu constMenu = new JMenu("Construction " + category + "s"); --- 222,232 ---- } }); ! ! ! ! if (!owner.isContainer()) { editSpaceItem.setEnabled(false); } ! JMenu funcMenu = new JMenu("Functional " + category + "s"); JMenu constMenu = new JMenu("Construction " + category + "s"); *************** *** 262,267 **** JMenuItem domainItem = new JMenuItem(domain.getDisplayName()); ActionListener ml = new DomainPopupListener(domain, ! surface, ! side.equals("front")); domainItem.addActionListener(ml); if (domain.isFunctionalSpace()) { --- 241,246 ---- JMenuItem domainItem = new JMenuItem(domain.getDisplayName()); ActionListener ml = new DomainPopupListener(domain, ! surface, ! side.equals("front")); domainItem.addActionListener(ml); if (domain.isFunctionalSpace()) { |