Normand Briere
2019-05-01 25cef97465f0bfa8959663754e9243006324c81c
Nimbus L&F
3 files modified
85 ■■■■■ changed files
GrafreeD.java 43 ●●●● patch | view | raw | blame | history
GroupEditor.java 36 ●●●●● patch | view | raw | blame | history
cButton.java 6 ●●●● patch | view | raw | blame | history
GrafreeD.java
....@@ -15,6 +15,8 @@
1515 //import com.jamonapi.*;
1616 public class GrafreeD extends Applet implements ActionListener
1717 {
18
+ static boolean NIMBUSLAF = false;
19
+
1820 static int RENDERME = 0;
1921
2022 static boolean epsequal = false;
....@@ -801,19 +803,44 @@
801803 // PlayAudio("/Users/nbriere/Downloads/Footsteps-6.wav", 4, 1);
802804
803805
804
-
805
- try
806
+/**/
807
+ if (NIMBUSLAF)
806808 {
807
- MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
808
- MetalLookAndFeel.setCurrentTheme(new Theme(Constants.yellowTheme));
809
- UIManager.setLookAndFeel(new MetalLookAndFeel());
810
- //UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
809
+ try
810
+ {
811
+ Object o = UIManager.getInstalledLookAndFeels();
812
+
813
+ javax.swing.plaf.metal.MetalLookAndFeel.setCurrentTheme(new javax.swing.plaf.metal.DefaultMetalTheme());
814
+ //MetalLookAndFeel.setCurrentTheme(new Theme(Constants.beigeTheme));
815
+ UIManager.setLookAndFeel(new javax.swing.plaf.metal.MetalLookAndFeel());
816
+
817
+ UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
811818 //UIManager.setLookAndFeel("com.apple.laf.AquaLookAndFeel");
812819 //UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
813
- } catch (Exception e)
814
- {
820
+ //UIManager.put("nimbusBase", new Color(0,0,0));
821
+ }
822
+ catch (Exception e)
823
+ {
824
+ }
815825 }
826
+ else
827
+ {
828
+ try
829
+ {
830
+ MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
831
+ MetalLookAndFeel.setCurrentTheme(new Theme(Constants.yellowTheme));
832
+ UIManager.setLookAndFeel(new MetalLookAndFeel());
833
+ //UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
834
+ //UIManager.setLookAndFeel("com.apple.laf.AquaLookAndFeel");
835
+ //UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
836
+ } catch (Exception e)
837
+ {
838
+ }
839
+ }
840
+/**/
816841
842
+// javax.swing.ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false);
843
+
817844 //Monitor mon=MonitorFactory.start("myFirstMonitor");
818845 standAlone = true;
819846 grafreeD = new GrafreeD();
GroupEditor.java
....@@ -434,31 +434,24 @@
434434 oe.radioPanel.add(dummyButton);
435435 oe.buttonGroup.add(dummyButton);
436436 */
437
- aConstraints.gridy += 1;
438
-
439437 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
440
-
441
- oe.aConstraints.gridwidth = 1;
442
- oe.aConstraints.gridx = 0;
443438
444439 oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints);
445440 liveCB.setToolTipText("Enabled animation");
446441 liveCB.addItemListener(this);
447442
448
- oe.aConstraints.gridx += 1;
449443 oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK), oe.aConstraints);
450444 trackCB.setToolTipText("Enable tracking");
451445 trackCB.addItemListener(this);
452446
453
- oe.aConstraints.gridx += 1;
454
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
447
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
455448 screenfitButton.setToolTipText("Screen fit");
456449 screenfitButton.addActionListener(this);
457
- oe.aConstraints.gridx += 1;
450
+
458451 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
459452 // screenfitpointButton.addActionListener(this);
460453 // oe.aConstraints.gridx += 1;
461
- oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
454
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
462455 snapobjectButton.addActionListener(this);
463456 snapobjectButton.setToolTipText("Snap Object");
464457 oe.aConstraints.gridx += 1;
....@@ -468,39 +461,34 @@
468461 oe.aConstraints.weighty = 0;
469462 oe.aConstraints.gridwidth = 1;
470463
471
- oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
464
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
472465 flashSelectionButton.setToolTipText("Show selection");
473466 flashSelectionButton.addActionListener(this);
474467
475
- oe.toolbarPanel.add(new cButton(" ", false));
468
+ oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
476469
477
- oe.aConstraints.gridx += 1;
478
- oe.aConstraints.weighty = 0;
479
- oe.aConstraints.gridwidth = 1;
480
-
481
- //
482
- oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
470
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
483471 twoButton.setToolTipText("Show center view only");
484472 twoButton.addActionListener(this);
485
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
473
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
486474 fourButton.addActionListener(this);
487475 fourButton.setToolTipText("Show left panel only");
488
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
476
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
489477 sixButton.setToolTipText("2-column layout left");
490478 sixButton.addActionListener(this);
491
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
479
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
492480 threeButton.setToolTipText("2-column layout right");
493481 threeButton.addActionListener(this);
494
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
482
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
495483 sevenButton.setToolTipText("3-column layout");
496484 sevenButton.addActionListener(this);
497485 //
498486
499
- oe.toolbarPanel.add(rootButton = new cButton(" o o o ")); //, oe.aConstraints);
487
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
500488 rootButton.setToolTipText("Edit object in new tab");
501489 rootButton.addActionListener(this);
502490 oe.aConstraints.gridx += 1;
503
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
491
+ oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
504492 closeButton.setToolTipText("Close tab");
505493 closeButton.addActionListener(this);
506494 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
cButton.java
....@@ -12,9 +12,13 @@
1212 {
1313 super(name);
1414
15
+ setMargin(new java.awt.Insets(1, 1, 1, 1));
16
+
1517 if (border)
1618 setBorder(new javax.swing.border.EtchedBorder());
1719 else
18
- setBorder(new javax.swing.border.EmptyBorder(0,0,0,0));
20
+ {
21
+ //setBorder(null); //new javax.swing.border.EmptyBorder(0,0,0,0));
22
+ }
1923 }
2024 }