From c463db0138d052ed3d4d9ef5eb0f573e837f0baa Mon Sep 17 00:00:00 2001
From: Skylar
Date: Wed, 23 Sep 2015 18:02:16 -0600
Subject: [PATCH] Add JavaDoc comments to everything
---
nbproject/project.properties | 4 +-
src/fi/iki/elonen/NanoHTTPD.java | 29 +-
.../symat/BadInputException.java | 7 +
.../apocalypselabs/symat/CodeCompleter.java | 4 +
src/net/apocalypselabs/symat/CodeExport.java | 6 +
src/net/apocalypselabs/symat/CodeRunner.java | 46 +++
src/net/apocalypselabs/symat/Debug.java | 6 +-
src/net/apocalypselabs/symat/Editor.java | 22 +-
src/net/apocalypselabs/symat/FileUtils.java | 14 +
src/net/apocalypselabs/symat/FontOptions.java | 12 +
src/net/apocalypselabs/symat/Functions.java | 268 +++++++++++++++++-
src/net/apocalypselabs/symat/Graph.java | 32 +++
.../apocalypselabs/symat/InstallPlugin.java | 4 +
src/net/apocalypselabs/symat/Interpreter.java | 3 +
.../apocalypselabs/symat/KeyValListItem.java | 12 +
src/net/apocalypselabs/symat/License.java | 8 +
src/net/apocalypselabs/symat/Main.java | 82 ++++++
.../apocalypselabs/symat/PackagePlugin.java | 5 +
src/net/apocalypselabs/symat/Pads.java | 9 +-
src/net/apocalypselabs/symat/PrefStorage.java | 29 ++
.../apocalypselabs/symat/PrettifyToHtml.java | 9 +
.../symat/SingleInstanceClient.java | 4 +
.../symat/SingleInstanceServer.java | 3 +
src/net/apocalypselabs/symat/Tasks.java | 4 +
src/net/apocalypselabs/symat/TasksExport.java | 4 +
src/net/apocalypselabs/symat/Theme.java | 28 ++
src/net/apocalypselabs/symat/WebBrowser.java | 54 ++++
.../symat/codesamples/graph.java.txt | 3 +
.../symat/codesamples/helloworld.java.txt | 7 +
.../apocalypselabs/symat/components/Task.java | 20 ++
.../symat/components/TaskList.java | 19 ++
.../symat/components/TaskMenu.java | 8 +
.../symat/components/TextBox.java | 15 +
.../symat/plugin/LoadPlugin.java | 30 ++
.../apocalypselabs/symat/plugin/Plugin.java | 14 +
.../symat/sync/BackgroundSync.java | 3 +
src/net/apocalypselabs/symat/sync/Start.java | 1 +
.../apocalypselabs/symat/sync/UserLogin.java | 15 +
.../etherpad_lite_client/EPLiteClient.java | 80 +++---
39 files changed, 848 insertions(+), 75 deletions(-)
create mode 100644 src/net/apocalypselabs/symat/codesamples/graph.java.txt
create mode 100644 src/net/apocalypselabs/symat/codesamples/helloworld.java.txt
diff --git a/nbproject/project.properties b/nbproject/project.properties
index 1169d13..1269492 100644
--- a/nbproject/project.properties
+++ b/nbproject/project.properties
@@ -3,9 +3,9 @@ annotation.processing.enabled.in.editor=false
annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
-application.desc=Math and Programming for People
+application.desc=Math and programming in style.
application.homepage=https://symatapp.com/
-application.splash=C:\\Users\\Skylar\\Documents\\Apocalypse Labs\\appmedia\\SyMAT\\splashscreen.png
+application.splash=C:\\Users\\Skylar\\Documents\\Projects\\Assets\\SyMAT\\splashscreen.png
application.title=SyMAT
application.vendor=Netsyms Technologies
auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml
diff --git a/src/fi/iki/elonen/NanoHTTPD.java b/src/fi/iki/elonen/NanoHTTPD.java
index bb241e3..4a159a7 100644
--- a/src/fi/iki/elonen/NanoHTTPD.java
+++ b/src/fi/iki/elonen/NanoHTTPD.java
@@ -26,17 +26,12 @@ import java.util.TimeZone;
/**
* A simple, tiny, nicely embeddable HTTP server in Java
- *
- *
* NanoHTTPD
*
*
Copyright (c) 2012-2013 by Paul S. Hawke, 2001,2005-2013 by Jarno Elonen,
* 2010 by Konstantinos Togias
- *
- *
* Features + limitations:
*
- *
* - Only one Java file
* - Java 5 compatible
* - Released as open source, Modified BSD licence
@@ -61,17 +56,11 @@ import java.util.TimeZone;
* - Contains a built-in list of most common mime types
* - All header names are converted lowercase so they don't vary between
* browsers/clients
- *
*
- *
- *
* How to use:
*
- *
* - Subclass and implement serve() and embed to your own program
- *
*
- *
* See the separate "LICENSE.md" file for the distribution license (Modified BSD
* licence)
*/
@@ -263,8 +252,8 @@ public abstract class NanoHTTPD {
/**
* Override this to customize the server.
- *
- *
+ *
+ *
* (By default, this delegates to serveFile() and allows directory listing.)
*
* @param uri Percent-decoded URI without parameters, for example
@@ -283,8 +272,8 @@ public abstract class NanoHTTPD {
/**
* Override this to customize the server.
- *
- *
+ *
+ *
* (By default, this delegates to serveFile() and allows directory listing.)
*
* @param session The HTTP session
@@ -432,7 +421,6 @@ public abstract class NanoHTTPD {
// ------------------------------------------------------------------------------- //
/**
* Temp file manager.
- *
*
* Temp file managers are created 1-to-1 with incoming requests, to create
* and cleanup temporary files created as a result of handling the
@@ -447,7 +435,6 @@ public abstract class NanoHTTPD {
/**
* A temp file.
- *
*
* Temp files are responsible for managing the actual temporary storage and
* cleaning themselves up when no longer needed.
@@ -463,7 +450,6 @@ public abstract class NanoHTTPD {
/**
* Default threading strategy for NanoHttpd.
- *
*
* By default, the server spawns a new Thread for every incoming request.
* These are set to daemon status, and named according to the request
@@ -485,9 +471,7 @@ public abstract class NanoHTTPD {
/**
* Default strategy for creating and cleaning up temporary files.
- *
- *
- *
This class stores its files in the standard location (that is,
+ * This class stores its files in the standard location (that is,
* wherever java.io.tmpdir
points to). Files are added to an
* internal list, and deleted when no longer needed (that is, when
* clear()
is invoked at the end of processing a request).
@@ -523,7 +507,6 @@ public abstract class NanoHTTPD {
/**
* Default strategy for creating and cleaning up temporary files.
- *
*
*
[>By default, files are created by
* File.createTempFile()
in the directory specified.
@@ -855,7 +838,7 @@ public abstract class NanoHTTPD {
/**
* Adds the files in the request body to the files map.
*
- * @arg files - map to modify
+ * @param files - map to modify
*/
void parseBody(Map files) throws IOException, ResponseException;
}
diff --git a/src/net/apocalypselabs/symat/BadInputException.java b/src/net/apocalypselabs/symat/BadInputException.java
index bd99889..58d804b 100644
--- a/src/net/apocalypselabs/symat/BadInputException.java
+++ b/src/net/apocalypselabs/symat/BadInputException.java
@@ -63,10 +63,17 @@ package net.apocalypselabs.symat;
*/
public class BadInputException extends Exception {
+ /**
+ *
+ */
public BadInputException() {
super();
}
+ /**
+ *
+ * @param msg
+ */
public BadInputException(String msg) {
super(msg);
}
diff --git a/src/net/apocalypselabs/symat/CodeCompleter.java b/src/net/apocalypselabs/symat/CodeCompleter.java
index 997fa5a..d805918 100644
--- a/src/net/apocalypselabs/symat/CodeCompleter.java
+++ b/src/net/apocalypselabs/symat/CodeCompleter.java
@@ -81,6 +81,10 @@ public class CodeCompleter {
provider = makeCompletions();
}
+ /**
+ *
+ * @return
+ */
public CompletionProvider getProvider() {
return provider;
}
diff --git a/src/net/apocalypselabs/symat/CodeExport.java b/src/net/apocalypselabs/symat/CodeExport.java
index eb46054..c8da163 100644
--- a/src/net/apocalypselabs/symat/CodeExport.java
+++ b/src/net/apocalypselabs/symat/CodeExport.java
@@ -124,6 +124,12 @@ public class CodeExport extends javax.swing.JInternalFrame {
codeLang = lang;
}
+ /**
+ *
+ * @param code
+ * @param lang
+ * @param out
+ */
public CodeExport(String code, String lang, String out) {
this(code, lang);
outputTxt = out;
diff --git a/src/net/apocalypselabs/symat/CodeRunner.java b/src/net/apocalypselabs/symat/CodeRunner.java
index bd1058d..c98a3c3 100644
--- a/src/net/apocalypselabs/symat/CodeRunner.java
+++ b/src/net/apocalypselabs/symat/CodeRunner.java
@@ -87,14 +87,25 @@ public class CodeRunner {
// What codez are we speaking?
private String scriptLang = "";
+ /**
+ *
+ */
public CodeRunner() {
this("javascript");
}
+ /**
+ *
+ * @param lang
+ */
public CodeRunner(int lang) {
this(lang == 0 ? "js" : (lang == 2 ? "ja" : "py"));
}
+ /**
+ *
+ * @param lang
+ */
public CodeRunner(String lang) {
scriptLang = lang;
switch (lang) {
@@ -162,6 +173,13 @@ public class CodeRunner {
}
}
+ /**
+ *
+ * @param name
+ * @param classLoader
+ * @return
+ * @throws IOException
+ */
public static List loadResources(final String name,
final ClassLoader classLoader) throws IOException {
final List list = new ArrayList();
@@ -205,6 +223,12 @@ public class CodeRunner {
return out;
}
+ /**
+ *
+ * @param lang
+ * @param shell
+ * @deprecated
+ */
@Deprecated
public CodeRunner(String lang, boolean shell) {
this(lang);
@@ -227,14 +251,26 @@ public class CodeRunner {
}
}
+ /**
+ *
+ * @return
+ */
public StringWriter getStringWriter() {
return sw;
}
+ /**
+ *
+ * @return
+ */
public PrintWriter getPrintWriter() {
return pw;
}
+ /**
+ *
+ * @return
+ */
public String getBufferDump() {
String dump = sw.toString();
sw.getBuffer().setLength(0);
@@ -308,10 +344,20 @@ public class CodeRunner {
return eval;
}
+ /**
+ *
+ * @param var
+ * @param val
+ */
public void setVar(String var, Object val) {
se.put(var, val);
}
+ /**
+ *
+ * @param var
+ * @return
+ */
public Object getVar(String var) {
return se.get(var);
}
diff --git a/src/net/apocalypselabs/symat/Debug.java b/src/net/apocalypselabs/symat/Debug.java
index ea87e8e..64e8371 100644
--- a/src/net/apocalypselabs/symat/Debug.java
+++ b/src/net/apocalypselabs/symat/Debug.java
@@ -63,7 +63,11 @@ package net.apocalypselabs.symat;
public class Debug {
// If output should be on or off
- public static boolean debug = true;
+
+ /**
+ *
+ */
+ public static boolean debug = true;
/**
* Turn debug output on and off.
diff --git a/src/net/apocalypselabs/symat/Editor.java b/src/net/apocalypselabs/symat/Editor.java
index 3c36c4e..b31c5d2 100644
--- a/src/net/apocalypselabs/symat/Editor.java
+++ b/src/net/apocalypselabs/symat/Editor.java
@@ -96,8 +96,19 @@ public class Editor extends javax.swing.JInternalFrame {
private AutoCompletion jsac = new AutoCompletion(jscomp);
private AutoCompletion pyac = new AutoCompletion(pycomp);
+ /**
+ * The JavaScript language.
+ */
public static final int JAVASCRIPT = 1;
+
+ /**
+ * The Python language.
+ */
public static final int PYTHON = 2;
+
+ /**
+ * The Javs language.
+ */
public static final int JAVA = 3;
private File filedata;
@@ -217,6 +228,9 @@ public class Editor extends javax.swing.JInternalFrame {
}
}
+ /**
+ *
+ */
public Editor() {
this(false);
}
@@ -1026,7 +1040,9 @@ public class Editor extends javax.swing.JInternalFrame {
*/
private void openSample(String name) {
String ext = "js";
- if (!javascriptOption.isSelected()) {
+ if (javaOption.isSelected()) {
+ ext = "java.txt";
+ } else if (pythonOption.isSelected()) {
ext = "py";
}
String text = "";
@@ -1042,10 +1058,10 @@ public class Editor extends javax.swing.JInternalFrame {
}
} catch (Exception e) {
text = "Error: Could not open embedded sample file.";
- if (ext.equals("js")) {
+ if (ext.startsWith("j")) {
text = "/* " + text + " */";
} else {
- text = "# " + text;
+ text = "## " + text;
}
}
openString(text, name + "." + ext, false);
diff --git a/src/net/apocalypselabs/symat/FileUtils.java b/src/net/apocalypselabs/symat/FileUtils.java
index 4ec2ee2..4ab22b4 100644
--- a/src/net/apocalypselabs/symat/FileUtils.java
+++ b/src/net/apocalypselabs/symat/FileUtils.java
@@ -113,6 +113,13 @@ public class FileUtils {
return file;
}
+ /**
+ *
+ * @param content
+ * @param path
+ * @param addToRecent
+ * @throws IOException
+ */
public static void saveFile(String content, String path, boolean addToRecent)
throws IOException {
try (PrintStream out = new PrintStream(new FileOutputStream(path))) {
@@ -146,6 +153,13 @@ public class FileUtils {
return null;
}
+ /**
+ *
+ * @param url
+ * @return
+ * @throws MalformedURLException
+ * @throws IOException
+ */
public static String getUrl(String url) throws MalformedURLException, IOException {
String out;
try (Scanner sc = new Scanner(new URL(url).openStream(), "UTF-8")) {
diff --git a/src/net/apocalypselabs/symat/FontOptions.java b/src/net/apocalypselabs/symat/FontOptions.java
index b5aeb0b..d04108d 100644
--- a/src/net/apocalypselabs/symat/FontOptions.java
+++ b/src/net/apocalypselabs/symat/FontOptions.java
@@ -70,6 +70,10 @@ public class FontOptions extends javax.swing.JPanel {
initComponents();
}
+ /**
+ *
+ * @param size
+ */
public FontOptions(int size) {
this();
jSpinner1.setValue(size);
@@ -130,10 +134,18 @@ public class FontOptions extends javax.swing.JPanel {
modified = true;
}//GEN-LAST:event_jSpinner1StateChanged
+ /**
+ *
+ * @return
+ */
public int getResult() {
return (int) jSpinner1.getValue();
}
+ /**
+ *
+ * @return
+ */
public boolean isModified() {
return modified;
}
diff --git a/src/net/apocalypselabs/symat/Functions.java b/src/net/apocalypselabs/symat/Functions.java
index 19f3e03..8bb5593 100644
--- a/src/net/apocalypselabs/symat/Functions.java
+++ b/src/net/apocalypselabs/symat/Functions.java
@@ -95,6 +95,9 @@ import org.python.core.PyList;
*/
public class Functions {
+ /**
+ *
+ */
public static final HashMap GLOBALS = new HashMap<>();
private final EvalUtilities util = new EvalUtilities(true, true);
@@ -151,7 +154,7 @@ public class Functions {
}
/**
- * @see pause()
+ * @see pause(long millis)
* @param millis
*/
public void sleep(long millis) {
@@ -222,6 +225,12 @@ public class Functions {
return in.modPow(new BigInteger(b), new BigInteger(m)).toString();
}
+ /**
+ *
+ * @param a
+ * @param b
+ * @return
+ */
public long gcd(long a, long b) {
if (b == 0) {
return a;
@@ -229,6 +238,12 @@ public class Functions {
return gcd(b, a % b);
}
+ /**
+ *
+ * @param a
+ * @param b
+ * @return
+ */
public String gcd(String a, String b) {
return (new BigInteger(a).gcd(new BigInteger(b)).toString());
}
@@ -255,11 +270,25 @@ public class Functions {
return diff(function, "x");
}
+ /**
+ *
+ * @param function
+ * @param idv
+ * @return
+ * @deprecated
+ */
@Deprecated
public String D(String function, String idv) {
return diff(function, idv);
}
+ /**
+ *
+ * @param function
+ * @param idv
+ * @param eq
+ * @return
+ */
public double[] solve(String function, String idv, int eq) {
String res = $("Solve[" + function + "==" + eq + ", " + idv + "]");
res = res.substring(1, res.length() - 1);
@@ -287,10 +316,21 @@ public class Functions {
return out;
}
+ /**
+ *
+ * @param function
+ * @param idv
+ * @return
+ */
public double[] solve(String function, String idv) {
return solve(function, idv, 0);
}
+ /**
+ *
+ * @param function
+ * @return
+ */
public double[] solve(String function) {
return solve(function, "x");
}
@@ -322,6 +362,11 @@ public class Functions {
return out;
}
+ /**
+ *
+ * @param o
+ * @return
+ */
public String printa(Object o) {
String out = "[";
if (o instanceof int[]) {
@@ -401,6 +446,11 @@ public class Functions {
return integrate(function, "x");
}
+ /**
+ *
+ * @param function
+ * @return
+ */
public String factor(String function) {
return sym("Factor(" + function + ")");
}
@@ -415,6 +465,11 @@ public class Functions {
return sym("Simplify(" + expr + ")");
}
+ /**
+ *
+ * @param expr
+ * @return
+ */
public Object vpa(String expr) {
IExpr ans = util.evaluate("N(" + expr + ")");
if (ans.isNumber()) {
@@ -423,6 +478,11 @@ public class Functions {
return ans.toString();
}
+ /**
+ *
+ * @param in
+ * @return
+ */
public int[] primes(int in) {
boolean[] prime = new boolean[in];
for (int i = 0; i < prime.length; i++) {
@@ -450,50 +510,110 @@ public class Functions {
return out;
}
+ /**
+ *
+ * @param d
+ * @return
+ */
public double sec(double d) {
return 1.0 / Math.cos(d);
}
+ /**
+ *
+ * @param d
+ * @return
+ */
public double csc(double d) {
return 1.0 / Math.sin(d);
}
+ /**
+ *
+ * @param d
+ * @return
+ */
public double cot(double d) {
return 1.0 / Math.tan(d);
}
+ /**
+ *
+ * @param d
+ * @return
+ */
public double asec(double d) {
return Math.acos(1.0 / d);
}
+ /**
+ *
+ * @param d
+ * @return
+ */
public double acsc(double d) {
return Math.asin(1.0 / d);
}
+ /**
+ *
+ * @param d
+ * @return
+ */
public double acot(double d) {
return Math.atan(1.0 / d);
}
+ /**
+ *
+ * @param d
+ * @return
+ */
public double sinh(double d) {
return Math.sinh(d);
}
+ /**
+ *
+ * @param d
+ * @return
+ */
public double cosh(double d) {
return Math.cosh(d);
}
+ /**
+ *
+ * @param d
+ * @return
+ */
public double tanh(double d) {
return Math.tanh(d);
}
+ /**
+ *
+ * @param d
+ * @return
+ */
public double sech(double d) {
return pow(Math.cosh(d), -1);
}
+ /**
+ *
+ * @param d
+ * @return
+ */
public double csch(double d) {
return pow(Math.sinh(d), -1);
}
+ /**
+ *
+ * @param d
+ * @return
+ */
public double coth(double d) {
return Math.cosh(d) / Math.sinh(d);
}
@@ -610,6 +730,7 @@ public class Functions {
* Add the given numbers together.
*
* @param a numbers. Calculates first + second + third, etc.
+ * @param b
* @return The sum of the numbers or the value of input if there is only one
* input.
*/
@@ -640,6 +761,7 @@ public class Functions {
* Subtract the given numbers.
*
* @param a numbers. Calculates (first - second) - third, etc.
+ * @param b
* @return The difference of the numbers or the value of input if there is
* only one input.
*/
@@ -649,6 +771,11 @@ public class Functions {
return ans.toString();
}
+ /**
+ *
+ * @param a
+ * @return
+ */
public double[][] minvert(double a[][]) {
int n = a.length;
double x[][] = new double[n][n];
@@ -762,6 +889,11 @@ public class Functions {
return a;
}
+ /**
+ *
+ * @param n
+ * @return
+ */
public boolean isprime(long n) {
int i = 2;
while (i <= sqrt(n)) {
@@ -773,6 +905,11 @@ public class Functions {
return true;
}
+ /**
+ *
+ * @param nn
+ * @return
+ */
public boolean isprime(String nn) {
BigInteger n = new BigInteger(nn);
BigInteger i = new BigInteger("2");
@@ -902,7 +1039,7 @@ public class Functions {
* Multiply the given matrix by itself b times.
*
* @param a Square matrix
- * @param b Power ( >= 0 )
+ * @param b Power ( >= 0 )
* @return The matrix result
* @throws BadInputException if the matrix is not square or power is less
* than 0
@@ -947,6 +1084,11 @@ public class Functions {
return radians * (180 / PI);
}
+ /**
+ *
+ * @param input
+ * @return
+ */
public String sym(String input) {
return util.evaluate(input).toString();
}
@@ -976,7 +1118,7 @@ public class Functions {
/**
* Substitute newvar for variable in function and attempt to calculate a
* numerical answer.
- *
Example: subs('32*x','x',2) = 64.0
+ *
Example: subs('32*x','x',2) = 64.0
*
* @param function Function
* @param variable Variable to substitute
@@ -1004,10 +1146,21 @@ public class Functions {
/*
Graphing interfaces
*/
+
+ /**
+ *
+ * @param xmin
+ * @param xmax
+ */
+
public void xlim(double xmin, double xmax) {
graphwin.setRange(xmin, xmax);
}
+ /**
+ *
+ * @param function
+ */
public void plot(String function) {
showGraph();
if (!function.equals("")) {
@@ -1015,35 +1168,75 @@ public class Functions {
}
}
+ /**
+ *
+ * @param x
+ * @param y
+ */
public void plot(double[] x, double[] y) {
graphwin.plotPoints(x, y);
}
+ /**
+ *
+ * @param x
+ * @param y
+ * @param name
+ */
public void plot(double[] x, double[] y, String name) {
graphwin.plotPoints(x, y, name);
}
+ /**
+ *
+ * @param function
+ * @param xmin
+ * @param xmax
+ */
public void plot(String function, double xmin, double xmax) {
graphwin.setRange(xmin, xmax);
plot(function);
}
+ /**
+ *
+ * @param f
+ */
public void ezplot(String f) {
plot(f);
}
+ /**
+ *
+ * @param function
+ * @param xmin
+ * @param xmax
+ */
public void ezplot(String function, double xmin, double xmax) {
plot(function, xmin, xmax);
}
+ /**
+ *
+ * @param f
+ */
public void graph(String f) {
plot(f);
}
+ /**
+ *
+ * @return
+ */
public String plotname() {
return graphwin.getTitle();
}
+ /**
+ *
+ * @param t
+ * @return
+ */
public String plotname(String t) {
if (t.equals("symatpythonnullplotname")) {
return graphwin.getTitle();
@@ -1054,31 +1247,60 @@ public class Functions {
}
}
+ /**
+ *
+ */
public void plot() {
showGraph();
}
+ /**
+ *
+ */
public void plotclr() {
graphwin.clearDraw();
}
+ /**
+ *
+ */
public void clearplot() {
plotclr();
}
+ /**
+ *
+ */
public void plotclear() {
plotclr();
}
+ /**
+ *
+ * @param x
+ * @param y
+ */
public void drawdot(double x, double y) {
showGraph();
graphwin.drawDot(x, y);
}
+ /**
+ *
+ * @param path
+ * @return
+ * @throws IOException
+ */
public String readfile(String path) throws IOException {
return FileUtils.readFile(path);
}
+ /**
+ *
+ * @param content
+ * @param path
+ * @throws IOException
+ */
public void savefile(String content, String path) throws IOException {
FileUtils.saveFile(content, path, false);
}
@@ -1098,10 +1320,20 @@ public class Functions {
return "";
}
+ /**
+ *
+ * @param data
+ * @return
+ */
public String md5sum(String data) {
return FileUtils.MD5(data);
}
+ /**
+ *
+ * @param key
+ * @param val
+ */
public void save(String key, String val) {
Preferences prefs = Preferences.userNodeForPackage(Functions.class);
prefs.put(key, val);
@@ -1112,6 +1344,11 @@ public class Functions {
}
}
+ /**
+ *
+ * @param key
+ * @return
+ */
public String load(String key) {
Preferences prefs = Preferences.userNodeForPackage(Functions.class);
return prefs.get(key, "");
@@ -1120,6 +1357,12 @@ public class Functions {
/*
Other
*/
+
+ /**
+ *
+ * @return
+ */
+
public String sysinfo() {
String info = "==Java Information==\n";
info += "Java version: " + System.getProperty("java.version");
@@ -1145,6 +1388,10 @@ public class Functions {
}
}
+ /**
+ *
+ * @return
+ */
public String license() {
String expires = "Error";
if (PrefStorage.getSetting("licensetype").equals("demo")) {
@@ -1191,10 +1438,18 @@ public class Functions {
graphwin.toFront();
}
+ /**
+ *
+ * @return
+ */
public TextBox textbox() {
return new TextBox();
}
+ /**
+ *
+ * @return
+ */
public WebBrowser browser() {
return new WebBrowser();
}
@@ -1202,10 +1457,17 @@ public class Functions {
Constructor.
*/
+ /**
+ *
+ */
public Functions() {
Main.loadFrame(graphwin, false);
}
+ /**
+ *
+ * @param l
+ */
public void setLang(String l) {
lang = l;
}
diff --git a/src/net/apocalypselabs/symat/Graph.java b/src/net/apocalypselabs/symat/Graph.java
index 58893ef..58abff2 100644
--- a/src/net/apocalypselabs/symat/Graph.java
+++ b/src/net/apocalypselabs/symat/Graph.java
@@ -99,6 +99,10 @@ public class Graph extends javax.swing.JInternalFrame {
init();
}
+ /**
+ *
+ * @param isInternal
+ */
public Graph(boolean isInternal) {
init();
standalone = !isInternal;
@@ -125,6 +129,9 @@ public class Graph extends javax.swing.JInternalFrame {
}
}
+ /**
+ *
+ */
public void forceClose() {
dispose();
}
@@ -379,10 +386,21 @@ public class Graph extends javax.swing.JInternalFrame {
private void formComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentShown
}//GEN-LAST:event_formComponentShown
+ /**
+ *
+ * @param x
+ * @param y
+ */
public void plotPoints(double[] x, double[] y) {
plotPoints(x, y, "Points");
}
+ /**
+ *
+ * @param x
+ * @param y
+ * @param name
+ */
public void plotPoints(double[] x, double[] y, String name) {
plot.addLinePlot(name, x, y);
}
@@ -398,6 +416,11 @@ public class Graph extends javax.swing.JInternalFrame {
return 15.0;
}
+ /**
+ *
+ * @param x
+ * @param y
+ */
public void drawDot(double x, double y) {
double[] xpt = {x};
double[] ypt = {y};
@@ -455,6 +478,11 @@ public class Graph extends javax.swing.JInternalFrame {
return range;
}
+ /**
+ *
+ * @param min
+ * @param max
+ */
public void setRange(double min, double max) {
xmin = min;
xmax = max;
@@ -486,6 +514,10 @@ public class Graph extends javax.swing.JInternalFrame {
plotBtnActionPerformed(null);
}
+ /**
+ *
+ * @param label
+ */
public void setLabel(String label) {
lbl.setText(label);
}
diff --git a/src/net/apocalypselabs/symat/InstallPlugin.java b/src/net/apocalypselabs/symat/InstallPlugin.java
index 81b5b44..28a90c4 100644
--- a/src/net/apocalypselabs/symat/InstallPlugin.java
+++ b/src/net/apocalypselabs/symat/InstallPlugin.java
@@ -84,6 +84,10 @@ public class InstallPlugin extends javax.swing.JInternalFrame {
initComponents();
}
+ /**
+ *
+ * @param f
+ */
public InstallPlugin(File f) {
this();
openPlugin(f);
diff --git a/src/net/apocalypselabs/symat/Interpreter.java b/src/net/apocalypselabs/symat/Interpreter.java
index d0d15e7..3d658b1 100644
--- a/src/net/apocalypselabs/symat/Interpreter.java
+++ b/src/net/apocalypselabs/symat/Interpreter.java
@@ -145,6 +145,9 @@ public class Interpreter extends javax.swing.JInternalFrame {
inputBox.requestFocus();
}
+ /**
+ *
+ */
public Interpreter() {
this("default");
}
diff --git a/src/net/apocalypselabs/symat/KeyValListItem.java b/src/net/apocalypselabs/symat/KeyValListItem.java
index 4fc3a17..94a7f9e 100644
--- a/src/net/apocalypselabs/symat/KeyValListItem.java
+++ b/src/net/apocalypselabs/symat/KeyValListItem.java
@@ -67,14 +67,26 @@ public class KeyValListItem {
private String VAL = "";
private String KEY = "";
+ /**
+ *
+ */
public KeyValListItem() {
}
+ /**
+ *
+ * @param key
+ */
public KeyValListItem(String key) {
KEY = key;
}
+ /**
+ *
+ * @param key
+ * @param val
+ */
public KeyValListItem(String key, String val) {
KEY = key;
VAL = val;
diff --git a/src/net/apocalypselabs/symat/License.java b/src/net/apocalypselabs/symat/License.java
index 2fe891a..96afd3a 100644
--- a/src/net/apocalypselabs/symat/License.java
+++ b/src/net/apocalypselabs/symat/License.java
@@ -314,11 +314,19 @@ public class License extends javax.swing.JInternalFrame {
}
}
+ /**
+ *
+ * @param email
+ * @return
+ */
public static boolean checkEmail(String email) {
String regex = "^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]+$";
return (email.matches(regex));
}
+ /**
+ *
+ */
public void exit() {
dispose();
}
diff --git a/src/net/apocalypselabs/symat/Main.java b/src/net/apocalypselabs/symat/Main.java
index d705c32..4f87778 100644
--- a/src/net/apocalypselabs/symat/Main.java
+++ b/src/net/apocalypselabs/symat/Main.java
@@ -134,13 +134,32 @@ public class Main extends JRibbonFrame {
* Becomes default sans-serif if something bad happens.
*/
public static Font ubuntuRegular;
+
+ /**
+ *
+ */
public static boolean skipPython = false; // Skip python init on start?
+
+ /**
+ *
+ */
public static boolean skipEditor = false; // Skip editor init on start?
private static boolean recentItemsMinimized = false;
+ /**
+ *
+ */
public static boolean updateAvailable = false; // Update available?
+
+ /**
+ *
+ */
public static String updateString = "";
+
+ /**
+ *
+ */
public static boolean licValid = false; // License valid?
/**
@@ -153,8 +172,14 @@ public class Main extends JRibbonFrame {
*/
public static SingleInstanceServer sisrv;
+ /**
+ *
+ */
public static Main maingui;
+ /**
+ *
+ */
public JRibbonBand pluginband;
/**
@@ -440,12 +465,22 @@ public class Main extends JRibbonFrame {
ribbon.addTask(plugintask);
}
+ /**
+ *
+ * @param name
+ * @return
+ */
public static ResizableIcon getRibbonIcon(String name) {
return ImageWrapperResizableIcon.getIcon(
Main.class.getResource("images/" + name + ".png"),
new Dimension(100, 76));
}
+ /**
+ *
+ * @param name
+ * @return
+ */
public static ResizableIcon getTinyRibbonIcon(String name) {
int d = 32;
return ImageWrapperResizableIcon.getIcon(
@@ -453,6 +488,10 @@ public class Main extends JRibbonFrame {
new Dimension(d, d));
}
+ /**
+ *
+ * @param restricted
+ */
public static void licenseRestrict(boolean restricted) {
graphbtn.setEnabled(!restricted);
padsbtn.setEnabled(!restricted);
@@ -474,6 +513,10 @@ public class Main extends JRibbonFrame {
mainPane.getWidth(), mainPane.getHeight());
}
+ /**
+ *
+ * @param recent
+ */
public static void loadRibbonMenu(RibbonApplicationMenuEntrySecondary[] recent) {
RibbonApplicationMenuEntryPrimary helpbtn
= new RibbonApplicationMenuEntryPrimary(
@@ -1074,24 +1117,63 @@ public class Main extends JRibbonFrame {
});
}
+ /**
+ *
+ */
public static JCommandButton shellbtn
= new JCommandButton("Shell", getRibbonIcon("shell"));
+
+ /**
+ *
+ */
public static JCommandButton editorbtn
= new JCommandButton("Editor", getRibbonIcon("editor"));
+
+ /**
+ *
+ */
public static JCommandButton graphbtn
= new JCommandButton("Graph", getRibbonIcon("graph"));
+
+ /**
+ *
+ */
public static JCommandButton notepadbtn
= new JCommandButton("Notepad", getRibbonIcon("notepad"));
+
+ /**
+ *
+ */
public static JCommandButton wikibtn
= new JCommandButton("Wiki", getRibbonIcon("wiki"));
+
+ /**
+ *
+ */
public static JCommandButton forumbtn
= new JCommandButton("Forum", getRibbonIcon("forum"));
+
+ /**
+ *
+ */
public static JCommandButton padsbtn
= new JCommandButton("Pads", getRibbonIcon("pads"));
+
+ /**
+ *
+ */
public static JCommandButton tasksbtn
= new JCommandButton("Tasks", getRibbonIcon("tasks"));
+
+ /**
+ *
+ */
public static JCommandButton installpluginbtn
= new JCommandButton("Install", getRibbonIcon("installplugin"));
+
+ /**
+ *
+ */
public static RibbonApplicationMenuEntryPrimary openbtn;
// Variables declaration - do not modify//GEN-BEGIN:variables
diff --git a/src/net/apocalypselabs/symat/PackagePlugin.java b/src/net/apocalypselabs/symat/PackagePlugin.java
index 0f9692d..9af576f 100644
--- a/src/net/apocalypselabs/symat/PackagePlugin.java
+++ b/src/net/apocalypselabs/symat/PackagePlugin.java
@@ -75,6 +75,11 @@ public class PackagePlugin extends javax.swing.JInternalFrame {
private final JFileChooser fcexp = new JFileChooser();
private ImageIcon icon;
+ /**
+ *
+ * @param code
+ * @param lang
+ */
public PackagePlugin(String code, int lang) {
this();
try {
diff --git a/src/net/apocalypselabs/symat/Pads.java b/src/net/apocalypselabs/symat/Pads.java
index 002d524..f2ae5ef 100644
--- a/src/net/apocalypselabs/symat/Pads.java
+++ b/src/net/apocalypselabs/symat/Pads.java
@@ -69,6 +69,9 @@ import org.etherpad_lite_client.EPLiteException;
*/
public class Pads extends javax.swing.JInternalFrame {
+ /**
+ * URL of the pad server.
+ */
public static final String PADS_URL = "http://pad.symatapp.com";
/**
@@ -113,7 +116,7 @@ public class Pads extends javax.swing.JInternalFrame {
/**
* Delete the pad with the given ID from local memory.
- *
It will still exist online.
+ *
It will still exist online.
*
* @param id the pad ID.
*/
@@ -179,8 +182,8 @@ public class Pads extends javax.swing.JInternalFrame {
/**
* Generate a random pad ID with length 15.
- *
There are about 1.217 x 10^26 possibilities (121 septillion).
- *
If this starts giving out used IDs, I'll be too rich to care.
+ *
There are about 1.217 x 10^26 possibilities (121 septillion).
+ *
If this starts giving out used IDs, I'll be too rich to care.
*
* @return the ID.
*/
diff --git a/src/net/apocalypselabs/symat/PrefStorage.java b/src/net/apocalypselabs/symat/PrefStorage.java
index da9a489..9123d9c 100644
--- a/src/net/apocalypselabs/symat/PrefStorage.java
+++ b/src/net/apocalypselabs/symat/PrefStorage.java
@@ -70,14 +70,28 @@ public class PrefStorage {
private static final Preferences prefs = Preferences.userNodeForPackage(PrefStorage.class);
+ /**
+ *
+ * @param key
+ * @param value
+ */
public static void saveSetting(String key, String value) {
prefs.put(key, value);
}
+ /**
+ *
+ * @param key
+ * @return
+ */
public static boolean isset(String key) {
return !getSetting(key, "NULL").equals("NULL");
}
+ /**
+ *
+ * @param key
+ */
public static void unset(String key) {
saveSetting(key, "");
save();
@@ -85,14 +99,29 @@ public class PrefStorage {
save();
}
+ /**
+ *
+ * @param key
+ * @return
+ */
public static String getSetting(String key) {
return prefs.get(key, "");
}
+ /**
+ *
+ * @param key
+ * @param emptyResponse
+ * @return
+ */
public static String getSetting(String key, String emptyResponse) {
return prefs.get(key, emptyResponse);
}
+ /**
+ *
+ * @return
+ */
public static boolean save() {
try {
prefs.flush();
diff --git a/src/net/apocalypselabs/symat/PrettifyToHtml.java b/src/net/apocalypselabs/symat/PrettifyToHtml.java
index 44d042c..9b2801e 100644
--- a/src/net/apocalypselabs/symat/PrettifyToHtml.java
+++ b/src/net/apocalypselabs/symat/PrettifyToHtml.java
@@ -24,6 +24,10 @@ import syntaxhighlight.ParseResult;
import syntaxhighlight.Style;
import syntaxhighlight.Theme;
+/**
+ *
+ * @author Skylar
+ */
public class PrettifyToHtml {
private static final String MAIN_CLASS = "prettyprint";
@@ -58,6 +62,11 @@ public class PrettifyToHtml {
return sb.toString();
}
+ /**
+ *
+ * @param theme
+ * @return
+ */
public static String toCss(Theme theme) {
StringBuilder sb = new StringBuilder();
sb.append("." + MAIN_CLASS + " {");
diff --git a/src/net/apocalypselabs/symat/SingleInstanceClient.java b/src/net/apocalypselabs/symat/SingleInstanceClient.java
index d992d19..0147bb8 100644
--- a/src/net/apocalypselabs/symat/SingleInstanceClient.java
+++ b/src/net/apocalypselabs/symat/SingleInstanceClient.java
@@ -68,6 +68,10 @@ import java.net.URL;
*/
public class SingleInstanceClient {
+ /**
+ *
+ * @param arg
+ */
public SingleInstanceClient(String arg) {
String response = "";
String args = (arg.equals("") ? "" : "?arg=" + arg);
diff --git a/src/net/apocalypselabs/symat/SingleInstanceServer.java b/src/net/apocalypselabs/symat/SingleInstanceServer.java
index f8c50f1..3b4ba30 100644
--- a/src/net/apocalypselabs/symat/SingleInstanceServer.java
+++ b/src/net/apocalypselabs/symat/SingleInstanceServer.java
@@ -65,6 +65,9 @@ import java.util.Map;
*/
public class SingleInstanceServer extends NanoHTTPD {
+ /**
+ *
+ */
public SingleInstanceServer() {
super(26879);
}
diff --git a/src/net/apocalypselabs/symat/Tasks.java b/src/net/apocalypselabs/symat/Tasks.java
index 4bdcb86..ff2f043 100644
--- a/src/net/apocalypselabs/symat/Tasks.java
+++ b/src/net/apocalypselabs/symat/Tasks.java
@@ -91,6 +91,10 @@ public class Tasks extends javax.swing.JInternalFrame {
initComponents();
}
+ /**
+ *
+ * @param f
+ */
public Tasks(File f) {
this();
try {
diff --git a/src/net/apocalypselabs/symat/TasksExport.java b/src/net/apocalypselabs/symat/TasksExport.java
index f89457a..91c5271 100644
--- a/src/net/apocalypselabs/symat/TasksExport.java
+++ b/src/net/apocalypselabs/symat/TasksExport.java
@@ -149,6 +149,10 @@ public class TasksExport extends javax.swing.JInternalFrame {
});
}
+ /**
+ *
+ * @param content
+ */
public void loadString(final String content) {
Platform.runLater(new Runnable() {
@Override
diff --git a/src/net/apocalypselabs/symat/Theme.java b/src/net/apocalypselabs/symat/Theme.java
index 9cc3009..99f6a0f 100644
--- a/src/net/apocalypselabs/symat/Theme.java
+++ b/src/net/apocalypselabs/symat/Theme.java
@@ -131,6 +131,10 @@ public class Theme {
}
}
+ /**
+ *
+ * @return
+ */
public static String getTheme() {
switch (currentTheme) {
case THEME_DARK:
@@ -143,6 +147,10 @@ public class Theme {
}
}
+ /**
+ *
+ * @return
+ */
public static Color textColor() {
if (currentTheme == THEME_NEO) {
return Color.GREEN;
@@ -150,22 +158,42 @@ public class Theme {
return (currentTheme == THEME_LIGHT) ? BLACK : WHITE;
}
+ /**
+ *
+ * @return
+ */
public static Color boxColor() {
return (currentTheme == THEME_LIGHT) ? WHITE : DBACK;
}
+ /**
+ *
+ * @return
+ */
public static Color notepadColor() {
return (currentTheme == THEME_LIGHT) ? NTPAD : DBACK;
}
+ /**
+ *
+ * @return
+ */
public static Color windowColor() {
return (currentTheme == THEME_LIGHT) ? LGRAY : DGRAY;
}
+ /**
+ *
+ * @return
+ */
public static Color tabColor() {
return (currentTheme == THEME_LIGHT) ? LBACK : DBACK;
}
+ /**
+ *
+ * @return
+ */
public static String editorTheme() {
if (currentTheme == THEME_NEO) {
return "neo";
diff --git a/src/net/apocalypselabs/symat/WebBrowser.java b/src/net/apocalypselabs/symat/WebBrowser.java
index 8653842..09d8fdb 100644
--- a/src/net/apocalypselabs/symat/WebBrowser.java
+++ b/src/net/apocalypselabs/symat/WebBrowser.java
@@ -91,9 +91,24 @@ public class WebBrowser extends javax.swing.JInternalFrame {
private Group root;
private Scene scene;
+ /**
+ *
+ */
public static final int DEFAULT_LOGO = 0;
+
+ /**
+ *
+ */
public static final int WIKI_LOGO = 1;
+
+ /**
+ *
+ */
public static final int FORUM_LOGO = 2;
+
+ /**
+ *
+ */
public static final int PAD_LOGO = 3;
private JInternalFrame thisFrame;
@@ -165,12 +180,20 @@ public class WebBrowser extends javax.swing.JInternalFrame {
browserBox.add(jfxPanel, BorderLayout.CENTER);
}
+ /**
+ *
+ * @param title
+ */
public WebBrowser(String title) {
this();
setTitle(title);
loadURL("http://wiki.symatapp.com/");
}
+ /**
+ *
+ * @return
+ */
public String homepage() {
try {
String text = "";
@@ -188,12 +211,23 @@ public class WebBrowser extends javax.swing.JInternalFrame {
}
}
+ /**
+ *
+ * @param title
+ * @param url
+ */
public WebBrowser(String title, String url) {
this();
setTitle(title);
loadURL(url);
}
+ /**
+ *
+ * @param title
+ * @param url
+ * @param icon
+ */
public WebBrowser(String title, String url, int icon) {
this(title, url);
switch (icon) {
@@ -215,17 +249,30 @@ public class WebBrowser extends javax.swing.JInternalFrame {
}
+ /**
+ *
+ * @param url
+ * @param isurl
+ */
public WebBrowser(String url, boolean isurl) {
this();
loadURL(url);
}
+ /**
+ *
+ * @param yesno
+ */
public void showNavbar(boolean yesno) {
navBar.setVisible(yesno);
goBtn.setEnabled(yesno);
backBtn.setEnabled(yesno);
}
+ /**
+ *
+ * @param url
+ */
public void loadURL(final String url) {
Platform.runLater(new Runnable() {
@Override
@@ -237,10 +284,17 @@ public class WebBrowser extends javax.swing.JInternalFrame {
urlBox.setText(url);
}
+ /**
+ *
+ */
public void open() {
Main.loadFrame(this, true);
}
+ /**
+ *
+ * @param content
+ */
public void loadString(final String content) {
Platform.runLater(new Runnable() {
@Override
diff --git a/src/net/apocalypselabs/symat/codesamples/graph.java.txt b/src/net/apocalypselabs/symat/codesamples/graph.java.txt
new file mode 100644
index 0000000..c97dbf2
--- /dev/null
+++ b/src/net/apocalypselabs/symat/codesamples/graph.java.txt
@@ -0,0 +1,3 @@
+String formula = ask("Enter formula:");
+plot(formula);
+plotname("Cool graph!");
\ No newline at end of file
diff --git a/src/net/apocalypselabs/symat/codesamples/helloworld.java.txt b/src/net/apocalypselabs/symat/codesamples/helloworld.java.txt
new file mode 100644
index 0000000..9a92bb9
--- /dev/null
+++ b/src/net/apocalypselabs/symat/codesamples/helloworld.java.txt
@@ -0,0 +1,7 @@
+public class HelloWorld {
+ public static void main(String[] args) {
+ print("Hello world");
+ }
+}
+
+HelloWorld.main(null);
\ No newline at end of file
diff --git a/src/net/apocalypselabs/symat/components/Task.java b/src/net/apocalypselabs/symat/components/Task.java
index 3f3264a..7cc37bb 100644
--- a/src/net/apocalypselabs/symat/components/Task.java
+++ b/src/net/apocalypselabs/symat/components/Task.java
@@ -67,10 +67,22 @@ public class Task extends javax.swing.JPanel {
private int percent = 0;
+ /**
+ *
+ * @param complete
+ * @param name
+ * @param desc
+ */
public Task(boolean complete, String name, String desc) {
this((complete ? 100 : 0), name, desc);
}
+ /**
+ *
+ * @param complete
+ * @param name
+ * @param desc
+ */
public Task(int complete, String name, String desc) {
this();
percent = complete;
@@ -92,10 +104,18 @@ public class Task extends javax.swing.JPanel {
return taskName.getText();
}
+ /**
+ *
+ * @return
+ */
public String getDesc() {
return taskDesc.getText();
}
+ /**
+ *
+ * @return
+ */
public int getComplete() {
return percent;
}
diff --git a/src/net/apocalypselabs/symat/components/TaskList.java b/src/net/apocalypselabs/symat/components/TaskList.java
index 58d2e35..dd8f9b2 100644
--- a/src/net/apocalypselabs/symat/components/TaskList.java
+++ b/src/net/apocalypselabs/symat/components/TaskList.java
@@ -70,6 +70,10 @@ public class TaskList implements Serializable {
private final ArrayList tasks = new ArrayList<>();
private String title = "Untitled";
+ /**
+ *
+ * @param t
+ */
public void addTask(Task t) {
SingleTask st = new SingleTask();
st.name = t.toString();
@@ -78,6 +82,10 @@ public class TaskList implements Serializable {
tasks.add(st);
}
+ /**
+ *
+ * @return
+ */
public Task[] getTasks() {
Task[] a = new Task[tasks.size()];
for (int i = 0; i < tasks.size(); i++) {
@@ -89,14 +97,25 @@ public class TaskList implements Serializable {
return a;
}
+ /**
+ *
+ * @param t
+ */
public void setTitle(String t) {
title = t;
}
+ /**
+ *
+ * @return
+ */
public String getTitle() {
return title;
}
+ /**
+ *
+ */
public TaskList() {
}
diff --git a/src/net/apocalypselabs/symat/components/TaskMenu.java b/src/net/apocalypselabs/symat/components/TaskMenu.java
index 254ab01..fd6059f 100644
--- a/src/net/apocalypselabs/symat/components/TaskMenu.java
+++ b/src/net/apocalypselabs/symat/components/TaskMenu.java
@@ -92,10 +92,18 @@ public class TaskMenu extends javax.swing.JPanel {
loadTheme();
}
+ /**
+ *
+ * @return
+ */
public int getPercent() {
return percentSlider.getValue();
}
+ /**
+ *
+ * @return
+ */
public boolean deleteMe() {
return delCheck.isSelected();
}
diff --git a/src/net/apocalypselabs/symat/components/TextBox.java b/src/net/apocalypselabs/symat/components/TextBox.java
index ec15db6..95e701b 100644
--- a/src/net/apocalypselabs/symat/components/TextBox.java
+++ b/src/net/apocalypselabs/symat/components/TextBox.java
@@ -77,18 +77,33 @@ public class TextBox extends javax.swing.JInternalFrame {
textBox.setFont(Main.ubuntuRegular.deriveFont((float) font_size));
}
+ /**
+ *
+ * @param txt
+ */
public void set(String txt) {
textBox.setText(txt);
}
+ /**
+ *
+ * @return
+ */
public String get() {
return textBox.getText();
}
+ /**
+ *
+ * @param is
+ */
public void edit(boolean is) {
textBox.setEditable(is);
}
+ /**
+ *
+ */
public void open() {
Main.loadFrame(this, true);
}
diff --git a/src/net/apocalypselabs/symat/plugin/LoadPlugin.java b/src/net/apocalypselabs/symat/plugin/LoadPlugin.java
index 264f4a1..ca1a4ca 100644
--- a/src/net/apocalypselabs/symat/plugin/LoadPlugin.java
+++ b/src/net/apocalypselabs/symat/plugin/LoadPlugin.java
@@ -81,6 +81,14 @@ public class LoadPlugin {
private Plugin p;
+ /**
+ *
+ * @param f
+ * @throws FileNotFoundException
+ * @throws IOException
+ * @throws ClassNotFoundException
+ * @throws InvalidClassException
+ */
public LoadPlugin(File f) throws FileNotFoundException, IOException, ClassNotFoundException, InvalidClassException {
FileInputStream fin = new FileInputStream(f);
ObjectInputStream ois = new ObjectInputStream(fin);
@@ -88,6 +96,13 @@ public class LoadPlugin {
ois.close();
}
+ /**
+ *
+ * @param path
+ * @throws FileNotFoundException
+ * @throws IOException
+ * @throws ClassNotFoundException
+ */
public LoadPlugin(String path) throws FileNotFoundException, IOException, ClassNotFoundException {
this(new File(path));
}
@@ -103,6 +118,10 @@ public class LoadPlugin {
}
}
+ /**
+ *
+ * @return
+ */
public JCommandButton getRibbonBtn() {
JCommandButton b = new JCommandButton((p.getTitle().equals("") ? "Untitled" : p.getTitle()), getRibbonIcon());
if (!p.getLongTitle().equals("")) {
@@ -119,6 +138,10 @@ public class LoadPlugin {
return b;
}
+ /**
+ *
+ * @return
+ */
public JCommandToggleButton getGalleryBtn() {
JCommandToggleButton b = new JCommandToggleButton((p.getTitle().equals("") ? "Untitled" : p.getTitle()), getRibbonIcon());
if (!p.getLongTitle().equals("")) {
@@ -134,11 +157,18 @@ public class LoadPlugin {
return b;
}
+ /**
+ *
+ */
public void exec() {
CodeRunner cr = new CodeRunner(p.getLang());
cr.evalString(p.getScript());
}
+ /**
+ *
+ * @return
+ */
public Plugin getPlugin() {
return p;
}
diff --git a/src/net/apocalypselabs/symat/plugin/Plugin.java b/src/net/apocalypselabs/symat/plugin/Plugin.java
index 6bd222b..ac77107 100644
--- a/src/net/apocalypselabs/symat/plugin/Plugin.java
+++ b/src/net/apocalypselabs/symat/plugin/Plugin.java
@@ -65,8 +65,19 @@ public class Plugin implements Serializable {
private static final long serialVersionUID = 13371L;
+ /**
+ *
+ */
public final int LANG_JS = 0;
+
+ /**
+ *
+ */
public final int LANG_PY = 1;
+
+ /**
+ *
+ */
public final int LANG_JAVA = 2;
private ImageIcon icon;
@@ -81,6 +92,9 @@ public class Plugin implements Serializable {
private String version = "";
private int lang = LANG_JS;
+ /**
+ *
+ */
public Plugin() {
}
diff --git a/src/net/apocalypselabs/symat/sync/BackgroundSync.java b/src/net/apocalypselabs/symat/sync/BackgroundSync.java
index b23246e..08831bc 100644
--- a/src/net/apocalypselabs/symat/sync/BackgroundSync.java
+++ b/src/net/apocalypselabs/symat/sync/BackgroundSync.java
@@ -87,6 +87,9 @@ public class BackgroundSync extends Thread {
}
}
+ /**
+ *
+ */
public BackgroundSync() {
}
diff --git a/src/net/apocalypselabs/symat/sync/Start.java b/src/net/apocalypselabs/symat/sync/Start.java
index e5f4354..6220f79 100644
--- a/src/net/apocalypselabs/symat/sync/Start.java
+++ b/src/net/apocalypselabs/symat/sync/Start.java
@@ -78,6 +78,7 @@ public class Start extends javax.swing.JPanel {
/**
* Creates new form Start
+ * @param parent
*/
public Start(JInternalFrame parent) {
parentComponent = parent;
diff --git a/src/net/apocalypselabs/symat/sync/UserLogin.java b/src/net/apocalypselabs/symat/sync/UserLogin.java
index b823521..a7b9bc4 100644
--- a/src/net/apocalypselabs/symat/sync/UserLogin.java
+++ b/src/net/apocalypselabs/symat/sync/UserLogin.java
@@ -63,7 +63,14 @@ package net.apocalypselabs.symat.sync;
public class UserLogin extends javax.swing.JPanel {
+ /**
+ *
+ */
public static final int LOGIN_MODE = 0;
+
+ /**
+ *
+ */
public static final int SIGNUP_MODE = 1;
private static final String signup_help = "Sign up for a Sync acount.";
/**
@@ -77,10 +84,18 @@ public class UserLogin extends javax.swing.JPanel {
}
}
+ /**
+ *
+ * @return
+ */
public String getEmail() {
return emailBox.getText();
}
+ /**
+ *
+ * @return
+ */
public String getPassword() {
return new String(passwdBox.getPassword());
}
diff --git a/src/org/etherpad_lite_client/EPLiteClient.java b/src/org/etherpad_lite_client/EPLiteClient.java
index e941f1f..aa302bf 100644
--- a/src/org/etherpad_lite_client/EPLiteClient.java
+++ b/src/org/etherpad_lite_client/EPLiteClient.java
@@ -4,13 +4,13 @@ import java.util.Date;
import java.util.HashMap;
/**
- * A client for talking to Etherpad Lite's HTTP JSON API.
- *
- * Example:
- *
+ * A client for talking to Etherpad Lite's HTTP JSON API.
+ *
+ * Example:
+ *
*
- * EPLiteClient api = new EPLiteClient("http://etherpad.mysite.com", "FJ7jksalksdfj83jsdflkj");
- * HashMap pad = api.getText("my_pad");
+ * EPLiteClient api = new EPLiteClient("http://etherpad.mysite.com", "FJ7jksalksdfj83jsdflkj");
+ * HashMap pad = api.getText("my_pad");
* String pad = pad.get("text").toString();
*
*/
@@ -217,15 +217,15 @@ public class EPLiteClient {
/**
* Create a new session for the given author in the given group, valid until the given UNIX time.
- * The session id will be returned in "sessionID".
- *
- * Example:
- *
+ * The session id will be returned in "sessionID".
+ *
+ * Example:
+ *
*
- * import java.util.Date;
- * ...
- * Date now = new Date();
- * long in1Hour = (now.getTime() + (60L * 60L * 1000L) / 1000L);
+ * import java.util.Date;
+ * ...
+ * Date now = new Date();
+ * long in1Hour = (now.getTime() + (60L * 60L * 1000L) / 1000L);
* String sessID1 = api.createSession(groupID, authorID, in1Hour).get("sessionID").toString();
*
*
@@ -244,18 +244,18 @@ public class EPLiteClient {
/**
* Create a new session for the given author in the given group valid for the given number of hours.
- * The session id will be returned in "sessionID".
- *
- * Example:
- *
+ * The session id will be returned in "sessionID".
+ *
+ * Example:
+ *
*
- * // in 2 hours
+ * // in 2 hours
* String sessID1 = api.createSession(groupID, authorID, 2).get("sessionID").toString();
*
*
* @param groupID string
* @param authorID string
- * @param validUntil int length of session in hours
+ * @param length int length of session in hours
* @return HashMap
*/
public HashMap createSession(String groupID, String authorID, int length) {
@@ -265,19 +265,19 @@ public class EPLiteClient {
/**
* Create a new session for the given author in the given group, valid until the given datetime.
- * The session id will be returned in "sessionID".
- *
- * Example:
- *
+ * The session id will be returned in "sessionID".
+ *
+ * Example:
+ *
*
- * import java.util.Date;
- * import java.text.DateFormat;
- * import java.text.SimpleDateFormat;
- * import java.util.TimeZone;
- * ...
- * DateFormat dfm = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- * dfm.setTimeZone(TimeZone.getTimeZone("GMT-5"));
- * Date longTime = dfm.parse("2056-01-15 20:15:00");
+ * import java.util.Date;
+ * import java.text.DateFormat;
+ * import java.text.SimpleDateFormat;
+ * import java.util.TimeZone;
+ * ...
+ * DateFormat dfm = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ * dfm.setTimeZone(TimeZone.getTimeZone("GMT-5"));
+ * Date longTime = dfm.parse("2056-01-15 20:15:00");
* String sessID = api.createSession(groupID, authorID, longTime).get("sessionID").toString();
*
*
@@ -562,10 +562,10 @@ public class EPLiteClient {
/**
* Gets the pad's public status. The boolean is in "publicStatus".
- * This is only applicable to group pads.
- *
- * Example:
- *
+ * This is only applicable to group pads.
+ *
+ * Example:
+ *
*
* Boolean is_public = (Boolean)api.getPublicStatus("g.kjsdfj7ask$foo").get("publicStatus");
*
@@ -594,10 +594,10 @@ public class EPLiteClient {
/**
* Checks whether the pad is password-protected or not. The boolean is in "isPasswordProtected".
- * This is only applicable to group pads.
- *
- * Example:
- *
+ * This is only applicable to group pads.
+ *
+ * Example:
+ *
*
* Boolean pass = (Boolean)api.isPasswordProtected("g.kjsdfj7ask$foo").get("isPasswordProtected");
*