From 0c85af6e46f48b7425d59fc776b193c06a4a1f52 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Sun, 04 Aug 2019 12:08:30 -0400 Subject: [PATCH] Material icons --- GroupEditor.java | 36 +++++++++++++++++++++--------------- 1 files changed, 21 insertions(+), 15 deletions(-) diff --git a/GroupEditor.java b/GroupEditor.java index f72277a..0efe0b9 100644 --- a/GroupEditor.java +++ b/GroupEditor.java @@ -356,9 +356,9 @@ this.copy = this.group = group; //selectees = this.group.selectees; - if (copy.versions == null) + if (copy.versionlist == null) { - copy.versions = new byte[100][]; + copy.versionlist = new Object3D[100]; copy.versionindex = -1; } @@ -383,9 +383,9 @@ ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true); - if (copy.versions == null) + if (copy.versionlist == null) { - copy.versions = new byte[100][]; + copy.versionlist = new Object3D[100]; copy.versionindex = -1; Save(true); @@ -932,7 +932,7 @@ restoreCameraButton.addActionListener(this); copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); - saveButton.setToolTipText("New version"); + saveButton.setToolTipText("Duplicate current version"); saveButton.addActionListener(this); copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); @@ -942,12 +942,12 @@ cGridBag updown = new cGridBag().setVertical(true); updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); - restoreButton.setToolTipText("Restore current"); + restoreButton.setToolTipText("Undo (restore current version)"); restoreButton.addActionListener(this); restoreButton.setEnabled(false); updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); - replaceButton.setToolTipText("Replace current"); + replaceButton.setToolTipText("Save (replace current version)"); replaceButton.addActionListener(this); replaceButton.setEnabled(false); @@ -1110,14 +1110,14 @@ editButton.addActionListener(this); editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); - uneditButton.setToolTipText("Remove selection controls"); + uneditButton.setToolTipText("Unpin and remove selection controls"); uneditButton.addActionListener(this); editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); allParamsButton.setToolTipText("Show all controle"); allParamsButton.addActionListener(this); - editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); clearPanelButton.setToolTipText("Clear edit panel"); clearPanelButton.addActionListener(this); @@ -1183,7 +1183,7 @@ dgr.addDragGestureListener(this); }catch(Exception e) {} */ - radio.layout = sixButton; // sevenButton; + radio.layout = threeButton; // sixButton; oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); } @@ -1328,7 +1328,7 @@ } radioButton.SetObject(obj); - radioButton.layout = sixButton; // sevenButton; + radioButton.layout = threeButton; // sixButton; radioButton.SetCamera(cameraView.renderCamera, false); radioButton.addActionListener(this); radioPanel.add(radioButton); @@ -2613,11 +2613,13 @@ { // Restore current version Restore(); + restoreButton.setEnabled(false); } else if (source == replaceButton) { // Overwrite current version Replace(); + replaceButton.setEnabled(false); } else if (source == redoButton) { @@ -3820,10 +3822,10 @@ { Object3D child = (Object3D)e.nextElement(); if(child.editWindow != null) - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); child.pinned = false; child.CloseUI(); listUI.remove(child); +// objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); //child.editWindow = null; // ??????????? } @@ -3842,6 +3844,7 @@ obj.CloseUI(); } listUI.clear(); + SetPinStates(group.selection.size() > 0); refreshContents(true); } else if (source == allParamsButton) @@ -3928,6 +3931,7 @@ radio.layout.doClick(); ClearUnpinned(); + //Grafreed.Assert(group != null); //Grafreed.Assert(group.selection != null); SetPinStates(group.selection == null || group.selection.size() > 0); @@ -3944,11 +3948,13 @@ } else if (event.getSource() == editCameraItem) { cameraView.ProtectCamera(); + cameraView.requestFocusInWindow(); cameraView.repaint(); return; } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton) { cameraView.RevertCamera(); + cameraView.requestFocusInWindow(); cameraView.repaint(); return; // } else if (event.getSource() == textureButton) @@ -5081,9 +5087,7 @@ freezemodel = false; } - - boolean flashIt = true; - + public void valueChanged(TreeSelectionEvent e) //public boolean handleEvent(Event event) { @@ -5158,6 +5162,8 @@ uneditButton.setEnabled(enabled); unselectButton.setEnabled(enabled); flashSelectionButton.setEnabled(enabled); + + clearPanelButton.setEnabled(!listUI.isEmpty()); } void refreshContents(boolean cp) -- Gitblit v1.6.2