📄 splashscreen.java
字号:
" 1 and 2 above on a medium customarily used for software interchange; or,\n" +
"\n" +
" b) Accompany it with a written offer, valid for at least three\n" +
" years, to give any third party, for a charge no more than your\n" +
" cost of physically performing source distribution, a complete\n" +
" machine-readable copy of the corresponding source code, to be\n" +
" distributed under the terms of Sections 1 and 2 above on a medium\n" +
" customarily used for software interchange; or,\n" +
"\n" +
" c) Accompany it with the information you received as to the offer\n" +
" to distribute corresponding source code. (This alternative is\n" +
" allowed only for noncommercial distribution and only if you\n" +
" received the program in object code or executable form with such\n" +
" an offer, in accord with Subsection b above.)\n" +
"\n" +
"The source code for a work means the preferred form of the work for\n" +
"making modifications to it. For an executable work, complete source\n" +
"code means all the source code for all modules it contains, plus any\n" +
"associated interface definition files, plus the scripts used to\n" +
"control compilation and installation of the executable. However, as a\n" +
"special exception, the source code distributed need not include\n" +
"anything that is normally distributed (in either source or binary\n" +
"form) with the major components (compiler, kernel, and so on) of the\n" +
"operating system on which the executable runs, unless that component\n" +
"itself accompanies the executable.\n" +
"\n" +
"If distribution of executable or object code is made by offering\n" +
"access to copy from a designated place, then offering equivalent\n" +
"access to copy the source code from the same place counts as\n" +
"distribution of the source code, even though third parties are not\n" +
"compelled to copy the source along with the object code.\n" +
"\f\n" +
" 4. You may not copy, modify, sublicense, or distribute the Program\n" +
"except as expressly provided under this License. Any attempt\n" +
"otherwise to copy, modify, sublicense or distribute the Program is\n" +
"void, and will automatically terminate your rights under this License.\n" +
"However, parties who have received copies, or rights, from you under\n" +
"this License will not have their licenses terminated so long as such\n" +
"parties remain in full compliance.\n" +
"\n" +
" 5. You are not required to accept this License, since you have not\n" +
"signed it. However, nothing else grants you permission to modify or\n" +
"distribute the Program or its derivative works. These actions are\n" +
"prohibited by law if you do not accept this License. Therefore, by\n" +
"modifying or distributing the Program (or any work based on the\n" +
"Program), you indicate your acceptance of this License to do so, and\n" +
"all its terms and conditions for copying, distributing or modifying\n" +
"the Program or works based on it.\n" +
"\n" +
" 6. Each time you redistribute the Program (or any work based on the\n" +
"Program), the recipient automatically receives a license from the\n" +
"original licensor to copy, distribute or modify the Program subject to\n" +
"these terms and conditions. You may not impose any further\n" +
"restrictions on the recipients' exercise of the rights granted herein.\n" +
"You are not responsible for enforcing compliance by third parties to\n" +
"this License.\n" +
"\n" +
" 7. If, as a consequence of a court judgment or allegation of patent\n" +
"infringement or for any other reason (not limited to patent issues),\n" +
"conditions are imposed on you (whether by court order, agreement or\n" +
"otherwise) that contradict the conditions of this License, they do not\n" +
"excuse you from the conditions of this License. If you cannot\n" +
"distribute so as to satisfy simultaneously your obligations under this\n" +
"License and any other pertinent obligations, then as a consequence you\n" +
"may not distribute the Program at all. For example, if a patent\n" +
"license would not permit royalty-free redistribution of the Program by\n" +
"all those who receive copies directly or indirectly through you, then\n" +
"the only way you could satisfy both it and this License would be to\n" +
"refrain entirely from distribution of the Program.\n" +
"\n" +
"If any portion of this section is held invalid or unenforceable under\n" +
"any particular circumstance, the balance of the section is intended to\n" +
"apply and the section as a whole is intended to apply in other\n" +
"circumstances.\n" +
"\n" +
"It is not the purpose of this section to induce you to infringe any\n" +
"patents or other property right claims or to contest validity of any\n" +
"such claims; this section has the sole purpose of protecting the\n" +
"integrity of the free software distribution system, which is\n" +
"implemented by public license practices. Many people have made\n" +
"generous contributions to the wide range of software distributed\n" +
"through that system in reliance on consistent application of that\n" +
"system; it is up to the author/donor to decide if he or she is willing\n" +
"to distribute software through any other system and a licensee cannot\n" +
"impose that choice.\n" +
"\n" +
"This section is intended to make thoroughly clear what is believed to\n" +
"be a consequence of the rest of this License.\n" +
"\f\n" +
" 8. If the distribution and/or use of the Program is restricted in\n" +
"certain countries either by patents or by copyrighted interfaces, the\n" +
"original copyright holder who places the Program under this License\n" +
"may add an explicit geographical distribution limitation excluding\n" +
"those countries, so that distribution is permitted only in or among\n" +
"countries not thus excluded. In such case, this License incorporates\n" +
"the limitation as if written in the body of this License.\n" +
"\n" +
" 9. The Free Software Foundation may publish revised and/or new versions\n" +
"of the General Public License from time to time. Such new versions will\n" +
"be similar in spirit to the present version, but may differ in detail to\n" +
"address new problems or concerns.\n" +
"\n" +
"Each version is given a distinguishing version number. If the Program\n" +
"specifies a version number of this License which applies to it and \"any\n" +
"later version\", you have the option of following the terms and conditions\n" +
"either of that version or of any later version published by the Free\n" +
"Software Foundation. If the Program does not specify a version number of\n" +
"this License, you may choose any version ever published by the Free Software\n" +
"Foundation.\n" +
"\n" +
" 10. If you wish to incorporate parts of the Program into other free\n" +
"programs whose distribution conditions are different, write to the author\n" +
"to ask for permission. For software which is copyrighted by the Free\n" +
"Software Foundation, write to the Free Software Foundation; we sometimes\n" +
"make exceptions for this. Our decision will be guided by the two goals\n" +
"of preserving the free status of all derivatives of our free software and\n" +
"of promoting the sharing and reuse of software generally.\n" +
"\n" +
"\t\t\t NO WARRANTY\n" +
"\n" +
" 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\n" +
"FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN\n" +
"OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\n" +
"PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\n" +
"OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n" +
"MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS\n" +
"TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE\n" +
"PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\n" +
"REPAIR OR CORRECTION.\n" +
"\n" +
" 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\n" +
"WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\n" +
"REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\n" +
"INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\n" +
"OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\n" +
"TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\n" +
"YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\n" +
"PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\n" +
"POSSIBILITY OF SUCH DAMAGES.\n" +
"\n" +
"\t\t END OF TERMS AND CONDITIONS\n" +
"\n" +
"\n" +
"CONTACT:\n" +
" Mathias Lux\n" +
" mathias@juggle.at\n" +
" http://www.juggle.at\n" +
"\n" +
" Know-Center\n" +
" Competence Center for Knowledge Based Application and Systems R&D GmbH\n" +
" Inffeldgasse 21a\n" +
" 8010 Graz\n" +
" AUSTRIA\n" +
" phone: +43 (316) 873-9274";
public SplashScreen(JFrame owner) {
super(owner, "License agreement", true);
init();
}
private void init() {
this.setSize(640, 480);
Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
this.setLocation((d.width-getWidth())/2, (d.height-getHeight())/2);
text = new JTextArea(license);
JPanel flow = new JPanel(new FlowLayout());
okay = new JButton("Okay");
okay.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
closeDialog();
}
});
cancel = new JButton("Cancel");
cancel.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.exit(0);
}
});
accept = new JCheckBox("I accept the terms of the license agreement");
flow.add(accept);
flow.add(okay);
flow.add(cancel);
this.getContentPane().add(new JScrollPane(text), BorderLayout.CENTER);
this.getContentPane().add(flow, BorderLayout.SOUTH);
}
private void closeDialog() {
if (accept.isSelected()) {
Properties props = new Properties();
props.setProperty("license.accepted", "true");
try {
props.store(new FileOutputStream(new File(LICENSE_ACCEPTED_FILENAME)), "This file is used to store information about whether a user has accepted the license to allow the hiding of the splash scrren next time.");
} catch (IOException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
this.setVisible(false);
} else System.exit(0);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -