.. | .. |
---|
206 | 206 | // pasteExpandItem = menu.add(new MenuItem("Paste expand")); |
---|
207 | 207 | // pasteExpandItem.addActionListener(this); |
---|
208 | 208 | menu.add("-"); |
---|
209 | | - clearItem = menu.add(new MenuItem("Clear")); |
---|
210 | | - clearItem.addActionListener(this); |
---|
| 209 | + deleteItem = menu.add(new MenuItem("Delete")); |
---|
| 210 | + deleteItem.addActionListener(this); |
---|
211 | 211 | |
---|
212 | 212 | if (Globals.ADVANCED) |
---|
213 | 213 | { |
---|
.. | .. |
---|
433 | 433 | genNormalsMESHItem.addActionListener(this); |
---|
434 | 434 | if (Globals.ADVANCED) |
---|
435 | 435 | { |
---|
436 | | - genNormalsMINEItem = menu.add(new MenuItem("My Normals")); |
---|
| 436 | + genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals")); |
---|
437 | 437 | genNormalsMINEItem.addActionListener(this); |
---|
438 | 438 | } |
---|
439 | 439 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
.. | .. |
---|
685 | 685 | |
---|
686 | 686 | //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
687 | 687 | |
---|
688 | | - oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
689 | | - twoButton.setToolTipText("Show center view only"); |
---|
690 | | - twoButton.addActionListener(this); |
---|
691 | | - this.fullscreenLayout = twoButton; |
---|
692 | | - |
---|
693 | 688 | oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
694 | 689 | fourButton.addActionListener(this); |
---|
695 | 690 | fourButton.setToolTipText("Show left panel only"); |
---|
| 691 | + |
---|
| 692 | + oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 693 | + twoButton.setToolTipText("Show right view only"); |
---|
| 694 | + twoButton.addActionListener(this); |
---|
| 695 | + this.fullscreenLayout = twoButton; |
---|
| 696 | + |
---|
696 | 697 | oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
697 | | - sixButton.setToolTipText("2-column layout left"); |
---|
| 698 | + sixButton.setToolTipText("Show left and right"); |
---|
698 | 699 | sixButton.addActionListener(this); |
---|
699 | | - oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
700 | | - threeButton.setToolTipText("2-column layout right"); |
---|
701 | | - threeButton.addActionListener(this); |
---|
702 | | - oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
703 | | - sevenButton.setToolTipText("3-column layout"); |
---|
704 | | - sevenButton.addActionListener(this); |
---|
| 700 | +// oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 701 | +// threeButton.setToolTipText("2-column layout right"); |
---|
| 702 | +// threeButton.addActionListener(this); |
---|
| 703 | +// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 704 | +// sevenButton.setToolTipText("3-column layout"); |
---|
| 705 | +// sevenButton.addActionListener(this); |
---|
705 | 706 | // |
---|
706 | 707 | |
---|
707 | | - oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
708 | | - rootButton.setToolTipText("Edit selection in new tab"); |
---|
| 708 | + oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 709 | + rootButton.setToolTipText("Open selection in new tab"); |
---|
709 | 710 | rootButton.addActionListener(this); |
---|
710 | 711 | |
---|
711 | 712 | oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
871 | 872 | dgr.addDragGestureListener(this); |
---|
872 | 873 | }catch(Exception e) {} |
---|
873 | 874 | */ |
---|
874 | | - radio.layout = sevenButton; |
---|
| 875 | + radio.layout = sixButton; // sevenButton; |
---|
875 | 876 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
876 | 877 | } |
---|
877 | 878 | |
---|
.. | .. |
---|
1013 | 1014 | } |
---|
1014 | 1015 | |
---|
1015 | 1016 | radioButton.SetObject(obj); |
---|
1016 | | - radioButton.layout = sevenButton; |
---|
| 1017 | + radioButton.layout = sixButton; // sevenButton; |
---|
1017 | 1018 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
1018 | 1019 | radioButton.addActionListener(this); |
---|
1019 | 1020 | radioPanel.add(radioButton); |
---|
.. | .. |
---|
1692 | 1693 | listUI.remove(i); |
---|
1693 | 1694 | } |
---|
1694 | 1695 | } |
---|
| 1696 | + } |
---|
| 1697 | + |
---|
| 1698 | + private void EditElement(Object3D elem, boolean newWindow) |
---|
| 1699 | + { |
---|
| 1700 | + // if (!(elem instanceof Composite)) |
---|
| 1701 | + // newWindow = false; |
---|
| 1702 | + listUI.add(elem); |
---|
| 1703 | + elem.openEditWindow(this, newWindow); //, false); |
---|
| 1704 | + System.out.println("edit : " + elem); |
---|
| 1705 | + elem.editWindow.refreshContents(true); // ? new |
---|
1695 | 1706 | } |
---|
1696 | 1707 | |
---|
1697 | 1708 | /** |
---|
.. | .. |
---|
2658 | 2669 | { |
---|
2659 | 2670 | StepAll(); |
---|
2660 | 2671 | } else |
---|
2661 | | - if (source == clearItem) // || event.getSource() == clearButton) |
---|
| 2672 | + if (source == deleteItem) // || event.getSource() == clearButton) |
---|
2662 | 2673 | { |
---|
2663 | 2674 | //int indices[] = jList.getSelectedIndices(); |
---|
2664 | 2675 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
.. | .. |
---|
3553 | 3564 | radio.layout.doClick(); |
---|
3554 | 3565 | |
---|
3555 | 3566 | ClearUnpinned(); |
---|
3556 | | - Grafreed.Assert(group != null); |
---|
3557 | | - Grafreed.Assert(group.selection != null); |
---|
3558 | | - SetPinStates(group.selection.size() > 0); |
---|
3559 | | - if (group.selection.size() == 1) |
---|
| 3567 | + //Grafreed.Assert(group != null); |
---|
| 3568 | + //Grafreed.Assert(group.selection != null); |
---|
| 3569 | + SetPinStates(group.selection == null || group.selection.size() > 0); |
---|
| 3570 | + if (group.selection == null || group.selection.size() == 1) |
---|
3560 | 3571 | EditSelection(false); |
---|
3561 | 3572 | keepparent = group.parent; |
---|
3562 | 3573 | // PARENT = NULL or not??? |
---|
.. | .. |
---|
4627 | 4638 | |
---|
4628 | 4639 | void EditSelection(boolean newWindow) |
---|
4629 | 4640 | { |
---|
| 4641 | + if (group.selection == null) |
---|
| 4642 | + { |
---|
| 4643 | + EditElement(group, newWindow); // ? new |
---|
| 4644 | + return; |
---|
| 4645 | + } |
---|
| 4646 | + |
---|
4630 | 4647 | // aConstraints.gridy = 0; |
---|
4631 | 4648 | for (int i=0; i<group.selection.size(); i++) |
---|
4632 | 4649 | { |
---|
.. | .. |
---|
4637 | 4654 | Object3D elem = (Object3D)group.selection.elementAt(i); |
---|
4638 | 4655 | if(elem != group || !newWindow) |
---|
4639 | 4656 | { |
---|
4640 | | - // if (!(elem instanceof Composite)) |
---|
4641 | | - // newWindow = false; |
---|
4642 | | - listUI.add(elem); |
---|
4643 | | - elem.openEditWindow(this, newWindow); //, false); |
---|
4644 | | - System.out.println("edit : " + elem); |
---|
4645 | | - elem.editWindow.refreshContents(true); // ? new |
---|
| 4657 | + EditElement(elem, newWindow); // ? new |
---|
4646 | 4658 | } |
---|
4647 | 4659 | } |
---|
4648 | 4660 | } |
---|
.. | .. |
---|
5695 | 5707 | private MenuItem pasteLinkItem; |
---|
5696 | 5708 | private MenuItem pasteCloneItem; |
---|
5697 | 5709 | private MenuItem pasteExpandItem; |
---|
5698 | | - private MenuItem clearItem; |
---|
| 5710 | + private MenuItem deleteItem; |
---|
5699 | 5711 | private MenuItem clearAllItem; |
---|
5700 | 5712 | private MenuItem genUVItem; |
---|
5701 | 5713 | private MenuItem genNormalsMESHItem; |
---|