/[svn]/jsampler/trunk/src/org/jsampler/view/fantasia/StandardBar.java
ViewVC logotype

Diff of /jsampler/trunk/src/org/jsampler/view/fantasia/StandardBar.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1863 by iliev, Tue Oct 7 00:07:14 2008 UTC revision 1864 by iliev, Sat Mar 14 20:44:58 2009 UTC
# Line 1  Line 1 
1  /*  /*
2   *   JSampler - a java front-end for LinuxSampler   *   JSampler - a java front-end for LinuxSampler
3   *   *
4   *   Copyright (C) 2005-2008 Grigor Iliev <grigor@grigoriliev.com>   *   Copyright (C) 2005-2009 Grigor Iliev <grigor@grigoriliev.com>
5   *   *
6   *   This file is part of JSampler.   *   This file is part of JSampler.
7   *   *
# Line 68  public class StandardBar extends JPanel Line 68  public class StandardBar extends JPanel
68          private final ToolbarButton btnPreferences = new ToolbarButton(a4n.editPreferences);          private final ToolbarButton btnPreferences = new ToolbarButton(a4n.editPreferences);
69                    
70          private final JLabel lLogo = new JLabel(Res.gfxFantasiaLogo);          private final JLabel lLogo = new JLabel(Res.gfxFantasiaLogo);
71    
72            private final Boolean screenMenuEnabled;
73                    
74          /** Creates a new instance of <code>StandardBar</code> */          /** Creates a new instance of <code>StandardBar</code> */
75          public          public
76          StandardBar() {          StandardBar() {
77                    screenMenuEnabled = CC.getViewConfig().isUsingScreenMenuBar();
78                  //super(Res.gfxToolBarBg);                  //super(Res.gfxToolBarBg);
79                  //setPixmapInsets(new Insets(0, 6, 6, 6));                  //setPixmapInsets(new Insets(0, 6, 6, 6));
80                                    
81                  setLayout(new BorderLayout());                  setLayout(new BorderLayout());
82                  setOpaque(false);                  setOpaque(false);
83                    
84                  Dimension d = new Dimension(60, 51);                  int h = screenMenuEnabled ? 56 : 51;
85                    Dimension d = new Dimension(60, h);
86                  setMinimumSize(d);                  setMinimumSize(d);
87                  setPreferredSize(d);                  setPreferredSize(d);
88                  d = new Dimension(Short.MAX_VALUE, 51);                  d = new Dimension(Short.MAX_VALUE, 51);
89                  setMaximumSize(d);                  setMaximumSize(d);
90                  setBorder(BorderFactory.createEmptyBorder(0, 5, 2, 5));                  int top = screenMenuEnabled ? 5 : 0;
91                    setBorder(BorderFactory.createEmptyBorder(top, 5, 2, 5));
92                                    
93                                    
94                  //mainPane = new PixmapPane(Res.gfxToolBar);                  //mainPane = new PixmapPane(Res.gfxToolBar);
# Line 145  public class StandardBar extends JPanel Line 150  public class StandardBar extends JPanel
150                  double w = getSize().getWidth();                  double w = getSize().getWidth();
151                                    
152                  FantasiaPainter.paintGradient(g2, 0.0, 0.0, w - 1, h - 1, FantasiaPainter.color5, midColor);                  FantasiaPainter.paintGradient(g2, 0.0, 0.0, w - 1, h - 1, FantasiaPainter.color5, midColor);
153                    
154                  FantasiaPainter.Border b = new FantasiaPainter.Border(false, true, false, true);                  boolean paintTop = screenMenuEnabled;
155                    FantasiaPainter.Border b = new FantasiaPainter.Border(paintTop, true, false, true);
156                  FantasiaPainter.paintBoldOuterBorder(g2, 0, 0, w - 1, h + 2, b);                  FantasiaPainter.paintBoldOuterBorder(g2, 0, 0, w - 1, h + 2, b);
157                                    
158                  g2.setPaint(oldPaint);                  g2.setPaint(oldPaint);

Legend:
Removed from v.1863  
changed lines
  Added in v.1864

  ViewVC Help
Powered by ViewVC