Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17008/src/net/sourceforge/bprocessor/gl/tool
Modified Files:
SpaceTool.java
Log Message:
All connected
Index: SpaceTool.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SpaceTool.java,v
retrieving revision 1.62
retrieving revision 1.63
diff -C2 -d -r1.62 -r1.63
*** SpaceTool.java 30 Oct 2006 11:39:37 -0000 1.62
--- SpaceTool.java 31 Oct 2006 10:29:56 -0000 1.63
***************
*** 156,185 ****
protected JPopupMenu makeSelectionMenu() {
if (Selection.primary().isEmpty()) {
! if (target instanceof String) {
! String type = (String) target;
! JPopupMenu menu = new JPopupMenu();
! JMenuItem layerItem = new JMenuItem("Layer");
! Surface surface = null;
! Space space = null;
!
! Iterator iter = Selection.primary().iterator();
! while (iter.hasNext()) {
! Object current = iter.next();
! if (current instanceof Surface) {
! surface = (Surface) current;
! }
! }
! if (surface != null) {
! if (type.equals("front")) {
! space = surface.getFrontDomain();
! }
! if (type.equals("back")) {
! space = surface.getBackDomain();
! }
! }
! layerItem.addActionListener(new LayerAction(space, surface));
! menu.add(layerItem);
! return menu;
! } else if (target instanceof Space) {
return PopupMenu.getSpaceMenu((Space)target);
} else if (target instanceof Surface) {
--- 156,160 ----
protected JPopupMenu makeSelectionMenu() {
if (Selection.primary().isEmpty()) {
! if (target instanceof Space) {
return PopupMenu.getSpaceMenu((Space)target);
} else if (target instanceof Surface) {
***************
*** 204,212 ****
}
}
! String name = type.getName();
! log.info(name);
! if (name.substring(name.length() - 5).equals("Space")) {
return PopupMenu.getSpaceMenu(Selection.primary());
! } else if (name.substring(name.length() - 7).equals("Surface")) {
return PopupMenu.getSurfaceMenu(Selection.primary());
} else {
--- 179,185 ----
}
}
! if (type == Space.class) {
return PopupMenu.getSpaceMenu(Selection.primary());
! } else if (type == Surface.class) {
return PopupMenu.getSurfaceMenu(Selection.primary());
} else {
|