From a76491b66a2e304d9ae27a162f407b98c70fbafa Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Wed, 01 May 2019 20:30:24 -0400 Subject: [PATCH] Fix flush UI. --- ObjEditor.java | 36 ++++++++++++++++++++++++++---------- 1 files changed, 26 insertions(+), 10 deletions(-) diff --git a/ObjEditor.java b/ObjEditor.java index 565390e..b81d8f2 100644 --- a/ObjEditor.java +++ b/ObjEditor.java @@ -143,6 +143,8 @@ //nameField.removeActionListener(this); // objEditor.ctrlPanel.remove(nameField); + objEditor.ctrlPanel.remove(namePanel); + if (!GroupEditor.allparams) return; @@ -165,7 +167,6 @@ // objEditor.ctrlPanel.remove(fasterButton); // objEditor.ctrlPanel.remove(remarkButton); - objEditor.ctrlPanel.remove(namePanel); objEditor.ctrlPanel.remove(setupPanel); objEditor.ctrlPanel.remove(commandsPanel); objEditor.ctrlPanel.remove(pushPanel); @@ -951,10 +952,6 @@ void SetupUI2(ObjEditor oe) { -// oe.aConstraints.weightx = 0; -// oe.aConstraints.weighty = 0; -// oe.aConstraints.gridx = 0; -// oe.aConstraints.gridy = 0; //SetupName(oe); namePanel = new cGridBag(); @@ -971,27 +968,45 @@ setupPanel = new cGridBag().setVertical(false); liveCB = AddCheckBox(setupPanel, "Live", copy.live); - link2masterCB = AddCheckBox(setupPanel, "Supp", copy.link2master); + liveCB.setToolTipText("Animate object"); hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); + hideCB.setToolTipText("Hide object"); // Return(); markCB = AddCheckBox(setupPanel, "Mark", copy.marked); - rewindCB = AddCheckBox(setupPanel, "Rew", copy.rewind); - randomCB = AddCheckBox(setupPanel, "Rand", copy.random); + markCB.setToolTipText("Set the animation target transform"); + + rewindCB = AddCheckBox(setupPanel, "Rewind", copy.rewind); + rewindCB.setToolTipText("Rewind animation"); + + randomCB = AddCheckBox(setupPanel, "Random", copy.random); + randomCB.setToolTipText("Option for switch node"); + if (Globals.ADVANCED) + { + link2masterCB = AddCheckBox(setupPanel, "Support", copy.link2master); + link2masterCB.setToolTipText("Attach to support"); + speedupCB = AddCheckBox(setupPanel, "Speed", copy.speedup); + speedupCB.setToolTipText("Option motion capture"); + } + oe.ctrlPanel.add(setupPanel); oe.ctrlPanel.Return(); commandsPanel = new cGridBag().setVertical(false); resetButton = AddButton(commandsPanel, "Reset"); + resetButton.setToolTipText("Jump to frame zero"); stepButton = AddButton(commandsPanel, "Step"); + stepButton.setToolTipText("Step one frame"); // resetAllButton = AddButton(oe, "Reset All"); // stepAllButton = AddButton(oe, "Step All"); - speedupCB = AddCheckBox(commandsPanel, "Speed", copy.speedup); // Return(); slowerButton = AddButton(commandsPanel, "Slow"); + slowerButton.setToolTipText("Decrease animation speed"); fasterButton = AddButton(commandsPanel, "Fast"); + fasterButton.setToolTipText("Increase animation speed"); remarkButton = AddButton(commandsPanel, "Remark"); + remarkButton.setToolTipText("Set the current transform as the target"); oe.ctrlPanel.add(commandsPanel); oe.ctrlPanel.Return(); @@ -2982,6 +2997,7 @@ if (event.getSource() == randomCB) { copy.random ^= true; + objEditor.refreshContents(); return; } if (event.getSource() == speedupCB) @@ -3205,7 +3221,7 @@ if (!Globals.ANIMATION) { FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE); - browser.show(); + browser.setVisible(true); String filename = browser.getFile(); if (filename != null && filename.length() > 0) { -- Gitblit v1.6.2