Skip to content

Commit

Permalink
更新readme
Browse files Browse the repository at this point in the history
  • Loading branch information
icelinker committed Apr 14, 2016
1 parent 4f6bfef commit cf8ad4a
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 91 deletions.
10 changes: 5 additions & 5 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="con" path="com.google.appengine.eclipse.core.GAE_CONTAINER"/>
<classpathentry exported="true" kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.8.0_77">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v8.0">
<attributes>
<attribute name="owner.project.facets" value="jst.web"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.8.0_77">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="war/WEB-INF/classes"/>
</classpath>
2 changes: 1 addition & 1 deletion .settings/com.google.gwt.eclipse.core.prefs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
eclipse.preferences.version=1
entryPointModules=
filesCopiedToWebInfLib=gwt-servlet.jar
gwtCompileSettings=PGd3dC1jb21waWxlLXNldHRpbmdzPjxsb2ctbGV2ZWw+SU5GTzwvbG9nLWxldmVsPjxvdXRwdXQtc3R5bGU+REVUQUlMRUQ8L291dHB1dC1zdHlsZT48ZXh0cmEtYXJncz48IVtDREFUQVtdXT48L2V4dHJhLWFyZ3M+PHZtLWFyZ3M+PCFbQ0RBVEFbLVhteDUxMm1dXT48L3ZtLWFyZ3M+PGVudHJ5LXBvaW50LW1vZHVsZT5jb20ubHVzaHByb2plY3RzLmNpcmN1aXRqczEuY2lyY3VpdGpzMTwvZW50cnktcG9pbnQtbW9kdWxlPjwvZ3d0LWNvbXBpbGUtc2V0dGluZ3M+
gwtCompileSettings=PGd3dC1jb21waWxlLXNldHRpbmdzPjxsb2ctbGV2ZWw+SU5GTzwvbG9nLWxldmVsPjxvdXRwdXQtc3R5bGU+UFJFVFRZPC9vdXRwdXQtc3R5bGU+PGV4dHJhLWFyZ3M+PCFbQ0RBVEFbXV0+PC9leHRyYS1hcmdzPjx2bS1hcmdzPjwhW0NEQVRBWy1YbXg1MTJtXV0+PC92bS1hcmdzPjxlbnRyeS1wb2ludC1tb2R1bGU+Y29tLmx1c2hwcm9qZWN0cy5jaXJjdWl0anMxLmNpcmN1aXRqczE8L2VudHJ5LXBvaW50LW1vZHVsZT48L2d3dC1jb21waWxlLXNldHRpbmdzPg\=\=
2 changes: 2 additions & 0 deletions .settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
eclipse.preferences.version=1
encoding//src/com/lushprojects/circuitjs1/client/AboutBox.java=UTF-8
encoding//war/circuitjs.html=UTF-8
encoding//war/iframe.html=UTF-8
encoding/<project>=UTF-8
6 changes: 3 additions & 3 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.compiler.source=1.6
2 changes: 1 addition & 1 deletion .settings/org.eclipse.wst.common.project.facet.core.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<runtime name="Apache Tomcat v8.0"/>
<secondary-runtime name="Google App Engine (1.9.34)"/>
<fixed facet="wst.jsdt.web"/>
<installed facet="java" version="1.8"/>
<installed facet="jst.web" version="2.4"/>
<installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="java" version="1.6"/>
</faceted-project>
73 changes: 7 additions & 66 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,77 +1,18 @@
#CircuitJS1
#CircuitJS_CN

##Introduction

CircuitJS1 is an electronic circuit simulator that runs in the browser. It was originally written by Paul Falstad as a Java Applet. It was adapted by Iain Sharp to run in the browser using GWT.
CircuitJS 是一个可在浏览器中运行的电路仿真程序. 基于 Paul Falstad 提供的 Java Applet并由 Iain Sharp 使用GWT进行了改进.

For a hosted version of the application see:

* Paul's Page: [http://www.falstad.com/circuit/](http://www.falstad.com/circuit/)
* Iain's Page: [http://lushprojects.com/circuitjs/](http://lushprojects.com/circuitjs/)

Thanks to Edward Calver for 15 new components and other improvements. Thanks to Rodrigo Hausen for file import/export and many other UI improvements. Thanks to J. Mike Rollins for the Zener diode code. Thanks to Julius Schmidt for the spark gap code and some examples. Thanks to Dustin Soodak for help with the user interface improvements. Thanks to Jacob Calvert for the T Flip Flop.

##Building the application
汉化版程序适配sina app engine.工程可采用eclipse构建。
依赖:google web toolkit

The tools you will need to build the project are:

* Eclipse - I am using the Kepler version.
* Google plugin for Eclipse to provide GWT.

This archive is a project folder for your Eclipse project space. Once you have a local copy you can then build and run in development mode or build for deployment. Running in development mode is done using the normal Eclipse run button or "Run As..." and choosing "Web Application (Super Dev Mode)" and then picking "Circuitjs1.html" as the initial page. Building for deployment is done using the Google button on the Eclipse taskbar and choosing "GWT Compile Project...".

GWT will build it's output in to the "war" directory. In the "war" directory the file "iframe.html" is loaded as an iFrame in to the spare space at the bottom of the right hand pannel. It can be used for branding etc.

##Deployment

* "GWT Compile Project..." as explained above. This will put the outputs in to the "war" directory in the Eclipse project folder. You then need to copy everything in the "war" directory, except the "WEB-INF" directory, on to your web server.
* Customize the header of the file "circuitjs1.html" to include your tracking, favicon etc.
* Customize the "iframe.html" file to include any branding you want in the right hand panel of the application


The link for the full-page version of the application is now:
`http://<your host>/<your path>/circuitjs1.html`
(you can rename the "circuitjs1.html" file if you want too).

Just for reference the files should look like this

```
-+ Directory containing the front page (eg "circuitjs")
+- circuitjs.html - full page version of application
+- iframe.html - see notes above
++ circuitjs1 (directory)
+- various files built by GWT
+- circuits (directory, containing example circuits)
+- setuplist.txt (index in to example circuit directory)
```

## Embedding

You can link to the full page version of the application using the link shown above.

If you want to embed the application in another page then use an iframe with the src being the full-page version.

You can add query parameters to link to the full page version to change it's startup behaviour. The following are supported:
```
.../circuitjs1.html?cct=<string> // Load the circuit from the URL (like the # in the Java version)
.../circuitjs1.html?startCircuit=<filename> // Loads the circuit named "filename" from the "Circuits" directory
.../circuitjs1.html?euroResistors=<true|false>
.../circuitjs1.html?whiteBackground=<true|false>
.../circuitjs1.html?conventionalCurrent=<true|false>
```

## License

This program 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.

This program 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 this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Todo:
近期目标:界面汉化,按照模拟电路、数字电路、和混合电路方式重新组织页面。
远期目标:添加新器件封装定制功能,卡诺图分析功能,电路设计直接转化为verilog语言代码的功能。
14 changes: 2 additions & 12 deletions src/com/lushprojects/circuitjs1/client/AboutBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,8 @@ public class AboutBox extends PopupPanel {
setWidget(vp);
vp.setWidth("400px");
vp.add(new HTML("<p>电路在线仿真汉化版 版本 "+version+".</p>"+
"<p>Original by Paul Falstad.<br><a href=\"http://www.falstad.com/\" target=\"_blank\">http://www.falstad.com/</a></p>"+
"<p>JavaScript conversion by Iain Sharp.<br><a href=\"http://lushprojects.com/\" target=\"_blank\">http://lushprojects.com/</a></p>"+
"<p style=\"font-size:9px\">This program 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.</p>"+
"<p style=\"font-size:9px\">This program 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.</p>"+
"<p style=\"font-size:9px\">For details of licensing see <A href=\"http://www.gnu.org/licenses/\" target=\"_blank\">http://www.gnu.org/licenses/</A>.</p>"+
"<p style=\"font-size:9px\">Source code:<A href=\"https://github.com/sharpie7/circuitjs1\" target=\"_blank\">https://github.com/sharpie7/circuitjs1</A></p>"));
"<p>本网站基于 Paul Falstad与Iain Sharp所提供的开源代码.</p>"+
"<p style=\"font-size:9px\">本网站源代码遵循GPL协议.</p>"));
vp.add(okButton = new Button("OK"));
okButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public ExportAsLocalFileDialog(String data) {
String url;
vp=new VerticalPanel();
setWidget(vp);
setText("Export as Local File");
setText("导出本地文件");
vp.add(new Label("Click on the link below to save your circuit"));
url=getBlobUrl(data);
a=new Anchor("my circuit.txt", url);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Generated by Maven Integration for Eclipse
#Mon Apr 11 15:03:47 CST 2016
#Thu Apr 14 22:59:45 CST 2016
version=0.0.1-SNAPSHOT
groupId=circuitjs
m2e.projectName=circuitjs
Expand Down
7 changes: 6 additions & 1 deletion war/iframe.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<meta charset="UTF-8">
<title>www.tju.edu.cn</title>
</head>
<body>
<H1><img src="http://www.tju.edu.cn/images/logo.png" /></H1>
<div >
<h3>联系方式:</h3>
<p>[email protected]</p>
<p>[email protected]</p>
</div>
</body>
</html>

0 comments on commit cf8ad4a

Please sign in to comment.