use of edu.mit.csail.sdg.alloy4.OurCombobox in project org.alloytools.alloy by AlloyTools.
the class SimpleGUI method doLicense.
/**
* This method displays the license box.
*/
private Runner doLicense() {
if (wrap)
return wrapMe();
final String JAR = Util.jarPrefix();
String alloytxt;
try {
alloytxt = Util.readAll(JAR + "LICENSES" + File.separator + "Alloy.txt");
} catch (IOException ex) {
return null;
}
final JTextArea text = OurUtil.textarea(alloytxt, 15, 85, false, false, new EmptyBorder(2, 2, 2, 2), new Font("Monospaced", Font.PLAIN, 12));
final JScrollPane scroll = OurUtil.scrollpane(text, new LineBorder(Color.DARK_GRAY, 1));
final JComboBox combo = new OurCombobox(new String[] { "Alloy", "Kodkod", "JavaCup", "SAT4J", "ZChaff", "MiniSat" }) {
private static final long serialVersionUID = 0;
@Override
public void do_changed(Object value) {
if (value instanceof String) {
try {
String content = Util.readAll(JAR + "LICENSES" + File.separator + value + ".txt");
text.setText(content);
} catch (IOException ex) {
text.setText("Sorry: an error has occurred in displaying the license file.");
}
}
text.setCaretPosition(0);
}
};
OurDialog.showmsg("Copyright Notices", "The source code for the Alloy Analyzer is available under the MIT license.", " ", "The Alloy Analyzer utilizes several third-party packages whose code may", "be distributed under a different license. We are extremely grateful to", "the authors of these packages for making their source code freely available.", " ", OurUtil.makeH(null, "See the copyright notice for: ", combo, null), " ", scroll);
return null;
}
Aggregations