/[svn]/jsampler/trunk/src/org/jsampler/view/classic/HelpAboutDlg.java
ViewVC logotype

Diff of /jsampler/trunk/src/org/jsampler/view/classic/HelpAboutDlg.java

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

revision 841 by iliev, Mon Oct 10 16:03:12 2005 UTC revision 842 by iliev, Thu Mar 16 18:08:34 2006 UTC
# Line 57  import static org.jsampler.view.classic. Line 57  import static org.jsampler.view.classic.
57   * @author grish   * @author grish
58   */   */
59  public class HelpAboutDlg extends InformationDialog {  public class HelpAboutDlg extends InformationDialog {
         private final static JPanel pane = new JPanel();  
           
60          private JLabel lProductName =          private JLabel lProductName =
61                  new JLabel("<html>\n<font size=+1>JS Classic (version 0.1a)</font>");                  new JLabel("<html>\n<font size=+1>JS Classic (version 0.2a)</font>");
62                    
63          private JLabel lAuthor = new JLabel(i18n.getLabel("HelpAboutDlg.lAuthor"));          private JLabel lAuthor = new JLabel(i18n.getLabel("HelpAboutDlg.lAuthor"));
64          private JTextField tfAuthor = new JTextField(i18n.getLabel("HelpAboutDlg.tfAuthor"));          private JTextField tfAuthor = new JTextField(i18n.getLabel("HelpAboutDlg.tfAuthor"));
# Line 84  public class HelpAboutDlg extends Inform Line 82  public class HelpAboutDlg extends Inform
82                    
83          /** Creates a new instance of HelpAboutDlg */          /** Creates a new instance of HelpAboutDlg */
84          public HelpAboutDlg(Frame owner) {          public HelpAboutDlg(Frame owner) {
85                  super(owner, i18n.getLabel("HelpAboutDlg.title"), pane);                  super(owner, i18n.getLabel("HelpAboutDlg.title"));
86                                    
87                  GridBagLayout gridbag = new GridBagLayout();                  GridBagLayout gridbag = new GridBagLayout();
88                  GridBagConstraints c = new GridBagConstraints();                  GridBagConstraints c = new GridBagConstraints();
# Line 187  public class HelpAboutDlg extends Inform Line 185  public class HelpAboutDlg extends Inform
185                  lCopyright.setAlignmentX(LEFT_ALIGNMENT);                  lCopyright.setAlignmentX(LEFT_ALIGNMENT);
186                  mainPane.add(lCopyright);                  mainPane.add(lCopyright);
187                                    
                 pane.getParent().remove(pane);  
188                  setMainPane(mainPane);                  setMainPane(mainPane);
189                                    
190                  pack();                  pack();
# Line 305  class WebButton extends LinkButton { Line 302  class WebButton extends LinkButton {
302  enum License { GPL, LGPL }  enum License { GPL, LGPL }
303    
304  class LicenseDlg extends InformationDialog {  class LicenseDlg extends InformationDialog {
         private static JPanel pane = new JPanel();  
           
305          LicenseDlg(Dialog owner, License license) {          LicenseDlg(Dialog owner, License license) {
306                  super(owner, pane);                  super(owner);
307                                    
308                  switch(license) {                  switch(license) {
309                          case GPL: setTitle("GNU General Public License"); break;                          case GPL: setTitle("GNU General Public License"); break;
# Line 318  class LicenseDlg extends InformationDial Line 313  class LicenseDlg extends InformationDial
313                  JScrollPane sp = new JScrollPane(new LicensePane(license));                  JScrollPane sp = new JScrollPane(new LicensePane(license));
314                  sp.setPreferredSize(new Dimension(800, 400));                  sp.setPreferredSize(new Dimension(800, 400));
315                                    
                 pane.getParent().remove(pane);  
316                  setMainPane(sp);                  setMainPane(sp);
317          }          }
318                    
# Line 342  class LicenseDlg extends InformationDial Line 336  class LicenseDlg extends InformationDial
336                          } catch(Exception x) {                          } catch(Exception x) {
337                                  x.printStackTrace();                                  x.printStackTrace();
338                          }                          }
339                            
340                            setEditable(false);
341                  }                  }
342          }          }
343  }  }
344    
345  class LibraryInfoDlg extends InformationDialog {  class LibraryInfoDlg extends InformationDialog {
         private final static JPanel pane = new JPanel();  
           
346          private JLabel lAuthor = new JLabel(i18n.getLabel("LibraryInfoDlg.lAuthor"));          private JLabel lAuthor = new JLabel(i18n.getLabel("LibraryInfoDlg.lAuthor"));
347          private JTextField tfAuthor = new JTextField(i18n.getLabel("LibraryInfoDlg.tfAuthor"));          private JTextField tfAuthor = new JTextField(i18n.getLabel("LibraryInfoDlg.tfAuthor"));
348                    
# Line 365  class LibraryInfoDlg extends Information Line 359  class LibraryInfoDlg extends Information
359                  String website,                  String website,
360                  final License license                  final License license
361          ) {          ) {
362                  super(owner, libName,  pane);                  super(owner, libName);
363                                    
364                  switch(license) {                  switch(license) {
365                          case GPL: btnLicense.setText("GNU General Public License"); break;                          case GPL: btnLicense.setText("GNU General Public License"); break;
# Line 374  class LibraryInfoDlg extends Information Line 368  class LibraryInfoDlg extends Information
368                                    
369                  btnWebsite.setText(website);                  btnWebsite.setText(website);
370                                    
                 pane.getParent().remove(pane);  
371                  setMainPane(new LibraryInfoPane(libName, libVersion, license));                  setMainPane(new LibraryInfoPane(libName, libVersion, license));
372                                    
373                  btnLicense.addActionListener(new ActionListener() {                  btnLicense.addActionListener(new ActionListener() {

Legend:
Removed from v.841  
changed lines
  Added in v.842

  ViewVC Help
Powered by ViewVC