-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathLicenseDialog.patch
58 lines (58 loc) · 1.87 KB
/
LicenseDialog.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
--- /dev/null
+++ src/main/java/com/lushprojects/circuitjs1/client/LicenseDialog.java
@@ -0,0 +1,55 @@
+/*
+ Copyright (C) Paul Falstad and Usevalad Khatkevich
+
+ This file is part of CircuitJS1.
+
+ CircuitJS1 is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ CircuitJS1 is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CircuitJS1. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+package com.lushprojects.circuitjs1.client;
+
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.user.client.ui.DialogBox;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.Button;
+import com.lushprojects.circuitjs1.client.util.Locale;
+
+public class LicenseDialog extends DialogBox {
+
+ VerticalPanel vp;
+ Button okButton;
+
+ LicenseDialog() {
+ super();
+ vp = new VerticalPanel();
+ setWidget(vp);
+ setText(Locale.LS("License"));
+ vp.setWidth("500px");
+ vp.add(new HTML("<iframe style=\"border:0;\" src=\"help/license.html\" width=\"500\" height=\"400\" scrolling=\"auto\" frameborder=\"1\"></iframe>"));
+ vp.add(okButton = new Button("OK"));
+ okButton.addClickHandler(new ClickHandler() {
+ public void onClick(ClickEvent event) {
+ closeDialog();
+ }
+ });
+ center();
+ show();
+ }
+
+ protected void closeDialog() {
+ hide();
+ }
+}