From c209bbe1cf788c9af3dcffea7667c830170a3f1f Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Wed, 01 May 2019 20:30:51 -0400
Subject: [PATCH] Complete advanced mode.

---
 cFileSystemPane.java |   54 ++++++++++++++++++++++++++++++++----------------------
 1 files changed, 32 insertions(+), 22 deletions(-)

diff --git a/cFileSystemPane.java b/cFileSystemPane.java
index ccd740b..a446d0f 100644
--- a/cFileSystemPane.java
+++ b/cFileSystemPane.java
@@ -8,7 +8,9 @@
 
 import java.io.File;
 
-public class cFileSystemPane extends JPanel implements ActionListener, ItemListener, DragGestureListener,
+import grafeme.ui.*;
+
+public class cFileSystemPane extends cGridBag implements ActionListener, ItemListener, DragGestureListener,
         //DragSourceListener,
         DropTargetListener
 {
@@ -33,7 +35,7 @@
         setName("File system");
         //System.out.println("layout : " + getLayout());
         //setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
-        setLayout(new GridBagLayout());
+        //setLayout(new GridBagLayout());
         //ToolTipManager.sharedInstance().registerComponent(jTree);
         jTree.setCellRenderer(new cFileSystemModel.Renderer());
         
@@ -58,20 +60,27 @@
 	GridBagConstraints aConstraints = new GridBagConstraints(0,0,1,1, 1.0,1.0,
         	GridBagConstraints.EAST,GridBagConstraints.HORIZONTAL,new Insets(1,1,1,1), 0,0);
 
-	aConstraints.weighty = 0;
-	aConstraints.gridwidth = 1;
-        add(refreshButton = new JButton("Refresh"), aConstraints);
-        aConstraints.gridx += 1;
-        add(loadButton = new JButton("Load"), aConstraints);
-        aConstraints.gridx += 1;
-        add(printButton = new JButton("Print"), aConstraints);
-   //     aConstraints.gridx += 1;
-   //     add(replaceButton = new JButton("Replace"), aConstraints);
+        cGridBag fileCommsnds = new cGridBag();
+        
+        fileCommsnds.add(refreshButton = new JButton("Refresh")); //, aConstraints);
+                refreshButton.setToolTipText("Refresh entire tree");
+        fileCommsnds.add(loadButton = new JButton("Load")); //, aConstraints);
+                loadButton.setToolTipText("Load selected file(s)");
         
         refreshButton.addActionListener(this);
         loadButton.addActionListener(this);
-        printButton.addActionListener(this);
+        
+        if (Globals.ADVANCED)
+        {
+                fileCommsnds.add(printButton = new JButton("Print")); //, aConstraints);
+                printButton.setToolTipText("Print file path in terminal");
+                printButton.addActionListener(this);
+                fileCommsnds.add(mergeAttributesCB = new cCheckBox("Merge", cJME.mergeAttributes)); //, aConstraints);
+                mergeAttributesCB.setToolTipText("Merge common attributes (recommended)");
+                mergeAttributesCB.addItemListener(this);
 //        replaceButton.addActionListener(this);
+   //     add(replaceButton = new JButton("Replace"), aConstraints);
+        }
 
 //        aConstraints.gridx += 1;
 //            add(trimCB = new cCheckBox("Trim", cJME.trim), aConstraints);
@@ -86,17 +95,18 @@
 //            add(genUVCB = new cCheckBox("UV", cJME.genUV), aConstraints);
 //			genUVCB.addItemListener(this);
                         
-        aConstraints.gridx += 1;
-            add(mergeAttributesCB = new cCheckBox("Merge", cJME.mergeAttributes), aConstraints);
-			mergeAttributesCB.addItemListener(this);
+        add(fileCommsnds);
+        fileCommsnds.preferredHeight = 1;
         
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-	aConstraints.weighty = 1;
-	aConstraints.gridwidth = 10;
-	aConstraints.fill = GridBagConstraints.BOTH;
-
-        add(tree, aConstraints);
+        Return();
+        
+        cGridBag treeBag = new cGridBag();
+        
+        treeBag.add(tree);
+        
+        treeBag.preferredHeight = 30;
+        
+        add(treeBag); //, aConstraints);
         
             GroupEditor oe = (GroupEditor) owner;
 

--
Gitblit v1.6.2