From 8c837a9e50c29e66bdf5bd7ea2fd15b1a7d5d598 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Mon, 29 Apr 2019 15:12:34 -0400
Subject: [PATCH] Use separators.
---
ObjEditor.java | 52 +++++++++++++++++++---------------------------------
1 files changed, 19 insertions(+), 33 deletions(-)
diff --git a/ObjEditor.java b/ObjEditor.java
index e07d192..8a5cd39 100644
--- a/ObjEditor.java
+++ b/ObjEditor.java
@@ -978,10 +978,10 @@
fasterButton = AddButton(oe, "Fast");
remarkButton = AddButton(oe, "Rem");
- Return();
+ //Return();
- normalpushField = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, -1);
- Return();
+ //normalpushField = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, -1);
+ //Return();
// oe.ctrlPanel.add(stepButton = new cButton("Step"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
// ObjEditor.aConstraints.gridx += 1;
@@ -1445,17 +1445,13 @@
//aConstraints.gridx += 1;
//ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
- JPanel colorPanel = new JPanel(new BorderLayout());
- colorPanel.setBorder(BorderFactory.createLineBorder(Color.black));
-
cGridBag colorSection = new cGridBag().setVertical(true);
-
- colorPanel.add(colorSection);
cGridBag color = new cGridBag();
color.add(colorLabel = new JLabel("Color/hue")); // , aConstraints);
colorLabel.setHorizontalAlignment(SwingConstants.TRAILING);
color.add(colorField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
+ //colorField.preferredWidth = 200;
colorSection.add(color);
cGridBag modulation = new cGridBag();
@@ -1488,16 +1484,13 @@
shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
colorSection.add(shadowbias);
- ctrlPanel.add(colorPanel);
+ ctrlPanel.add(new JSeparator());
+
+ ctrlPanel.add(colorSection);
//ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
- JPanel diffusePanel = new JPanel(new BorderLayout());
- diffusePanel.setBorder(BorderFactory.createLineBorder(Color.black));
-
cGridBag diffuseSection = new cGridBag().setVertical(true);
-
- diffusePanel.add(diffuseSection);
cGridBag diffuse = new cGridBag();
diffuse.add(diffuseLabel = new JLabel("Diffuse")); // , aConstraints);
@@ -1541,16 +1534,13 @@
fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
diffuseSection.add(fakedepth);
- ctrlPanel.add(diffusePanel);
+ ctrlPanel.add(new JSeparator());
+
+ ctrlPanel.add(diffuseSection);
//ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
- JPanel specularPanel = new JPanel(new BorderLayout());
- specularPanel.setBorder(BorderFactory.createLineBorder(Color.black));
-
cGridBag specularSection = new cGridBag().setVertical(true);
-
- specularPanel.add(specularSection);
cGridBag specular = new cGridBag();
specular.add(specularLabel = new JLabel("Specular")); // , aConstraints);
@@ -1595,16 +1585,13 @@
// aConstraints.gridwidth = 1;
- ctrlPanel.add(specularPanel);
+ ctrlPanel.add(new JSeparator());
+
+ ctrlPanel.add(specularSection);
//ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
- JPanel globalPanel = new JPanel(new BorderLayout());
- globalPanel.setBorder(BorderFactory.createLineBorder(Color.black));
-
cGridBag globalSection = new cGridBag().setVertical(true);
-
- globalPanel.add(globalSection);
cGridBag camera = new cGridBag();
camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints);
@@ -1630,16 +1617,13 @@
opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
globalSection.add(opacity);
- ctrlPanel.add(globalPanel);
+ ctrlPanel.add(new JSeparator());
+
+ ctrlPanel.add(globalSection);
//ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
- JPanel texturePanel = new JPanel(new BorderLayout());
- texturePanel.setBorder(BorderFactory.createLineBorder(Color.black));
-
cGridBag textureSection = new cGridBag().setVertical(true);
-
- texturePanel.add(textureSection);
cGridBag bump = new cGridBag();
bump.add(bumpLabel = new JLabel("Bump")); // , aConstraints);
@@ -1677,7 +1661,9 @@
opacityPower.add(opacityPowerField = new cNumberSlider(this, 0.0, 10 /*10 dec 2013*/)); // , aConstraints);
textureSection.add(opacityPower);
- ctrlPanel.add(texturePanel);
+ ctrlPanel.add(new JSeparator());
+
+ ctrlPanel.add(textureSection);
//ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
--
Gitblit v1.6.2