Package jsynoptic.installer

Source Code of jsynoptic.installer.LicensePanel

/*
* Created on 7 mai 2004
*
* To change the template for this generated file go to
* Window - Preferences - Java - Code Generation - Code and Comments
*/
package jsynoptic.installer;

import java.awt.GridLayout;
import java.io.IOException;
import java.net.URL;

import javax.swing.BorderFactory;
import javax.swing.JEditorPane;
import javax.swing.JScrollPane;

import jsynoptic.installer.resources.InstallerResources;


class LicensePanel extends InstallerPanel {

  protected JEditorPane editorPane;
 
  public LicensePanel(Installer installer) {
    super(installer);
   
        editorPane = new JEditorPane();
        editorPane.setEditable(false);
    editorPane.setAutoscrolls(true);
    setLayout(new GridLayout());
    add(new JScrollPane(editorPane));
  }
 
 
  public void update() {
    // lang may have changed => reload page
        try {
          URL url = InstallerResources.class.getResource(Installer.resources.getString("licenseFile"));
      editorPane.setPage(url);
    } catch (IOException e) {
      e.printStackTrace();
    }
    installer.next.setText(Installer.resources.getString("accept"));
    installer.cancel.setText(Installer.resources.getString("cancel"));
    setBorder(BorderFactory.createTitledBorder(Installer.resources.getString("pleaseReadLicense")));
  }
}

TOP

Related Classes of jsynoptic.installer.LicensePanel

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.