-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from UCSDOalads/develop
Release v0.3
- Loading branch information
Showing
117 changed files
with
6,702 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
*.class | ||
/bin/ | ||
.DS_Store | ||
.settings | ||
.settings/* |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
language: java | ||
jdk: | ||
- oraclejdk8 | ||
|
||
before_script: | ||
- "export DISPLAY=:99.0" | ||
- "sh -e /etc/init.d/xvfb start" | ||
- sleep 3 # give xvfb some time to start | ||
|
||
notifications: | ||
email: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
1. File Save/Close Operations | ||
2. Edit Undo/Redo Operations | ||
//3. More usable SelectTools | ||
//4. Remove Functinoality | ||
//5. Zooming and Scrolling and Moving Function | ||
6. Data Point Connection Types | ||
7. Available Class Search | ||
8. Auto-Update Display Box Affected by Recent Changes | ||
9. Debug Undo Function | ||
10. Type Cast try (String) catch | ||
|
||
|
||
|
||
1. File Save | ||
2. ClassSearch | ||
11. Display history | ||
12. | ||
13. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<project name="JavaSketchPad" default="run" basedir="."> | ||
<property name="build.dir" location="ant_build" /> | ||
<property name="src.dir" location="src" /> | ||
|
||
<target name="init" description="Creating directory"> | ||
<mkdir dir="${build.dir}" /> | ||
</target> | ||
|
||
<target name="compile" depends="init" description="Compiling Sources"> | ||
<javac srcdir="${src.dir}" destdir="${build.dir}" includeantruntime="false"> | ||
<classpath refid="classpath.test" /> | ||
</javac> | ||
</target> | ||
|
||
<target name="run" depends="compile" description="Running the program"> | ||
</target> | ||
|
||
<target name="clean"> | ||
<delete dir="${build.dir}" /> | ||
</target> | ||
|
||
|
||
<path id="classpath.test"> | ||
<pathelement location="lib/junit-4.12.jar" /> | ||
<pathelement location="lib/hamcrest-core-1.3.jar" /> | ||
<pathelement location="${build.dir}" /> | ||
</path> | ||
|
||
|
||
<target name="test" depends="compile"> | ||
<junit printsummary="on" haltonfailure="yes" fork="true"> | ||
<classpath> | ||
<path refid="classpath.test" /> | ||
<pathelement location="${test.build.dir}" /> | ||
</classpath> | ||
<formatter type="brief" usefile="false" /> | ||
<batchtest> | ||
<fileset dir="${src.dir}" includes="**/*Test.java" /> | ||
</batchtest> | ||
</junit> | ||
</target> | ||
</project> |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package actions; | ||
|
||
import java.util.ArrayList; | ||
|
||
import javax.swing.JOptionPane; | ||
|
||
import actions.menu.ActionsMenuBarTitles; | ||
import actions.singleinstanceoperations.SingleInstanceOperation; | ||
import paintcomponents.PaintComponent; | ||
import paintcomponents.annotations.TextAnnotation; | ||
import paintcomponents.data.DataTextPaintComponent; | ||
import ui.PaintPanel; | ||
|
||
/** | ||
* add the annotation to a component | ||
* | ||
* @author muchi | ||
* | ||
*/ | ||
public class AddAnnotationAction extends SingleInstanceOperation<PaintComponent>{ | ||
|
||
/** | ||
* ctor | ||
* @param panel the panel | ||
*/ | ||
public AddAnnotationAction(PaintPanel panel) { | ||
super(panel); | ||
} | ||
|
||
/** | ||
* @return the location of the button | ||
*/ | ||
@Override | ||
public String locationString() { | ||
return ActionsMenuBarTitles.Data().Annotations().Add().toString(); | ||
} | ||
|
||
@Override | ||
protected void performActionOnInstance(PaintComponent instance) { | ||
// TODO Auto-generated method stub | ||
String annotations = JOptionPane | ||
.showInputDialog("Please specify the annotation of the component"); | ||
new TextAnnotation(instance, annotations); | ||
|
||
} | ||
|
||
@Override | ||
protected Class<PaintComponent> getGenericClassType() { | ||
return PaintComponent.class; | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package actions; | ||
|
||
import javax.swing.JOptionPane; | ||
|
||
import actions.menu.ActionsMenuBarTitles; | ||
import paintcomponents.haskell.HaskellExpressionPaintComponent; | ||
import ui.PaintPanel; | ||
|
||
public class AddHaskellComponent extends PaintAction { | ||
|
||
public AddHaskellComponent(PaintPanel panel) { | ||
super(panel); | ||
} | ||
|
||
@Override | ||
public boolean canPerformAction() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public void performAction() { | ||
String expr = JOptionPane | ||
.showInputDialog("Please enter the haskell expression"); | ||
panel.addPaintComponent(new HaskellExpressionPaintComponent( | ||
expr, panel.getWidth() / 2, panel.getHeight() / 2)); | ||
|
||
panel.repaint(); | ||
|
||
} | ||
|
||
@Override | ||
public String locationString() { | ||
return ActionsMenuBarTitles.Developer("Haskell/Add Haskell Expression") | ||
.toString(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package actions; | ||
|
||
import actions.menu.ActionsMenuBarTitles; | ||
import paintcomponents.haskell.EvaluateHaskellPaintComponent; | ||
import ui.PaintPanel; | ||
|
||
public class AddHaskellEvaluatorComponentAction extends PaintAction { | ||
|
||
public AddHaskellEvaluatorComponentAction(PaintPanel panel) { | ||
super(panel); | ||
} | ||
|
||
@Override | ||
public boolean canPerformAction() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public void performAction() { | ||
EvaluateHaskellPaintComponent comp = new EvaluateHaskellPaintComponent("Use Data Display/Update to compute expression result", panel.getWidth() /2, panel.getHeight()/2); | ||
panel.addPaintComponent(comp); | ||
panel.repaint(); | ||
} | ||
|
||
@Override | ||
public String locationString() { | ||
return ActionsMenuBarTitles.Developer("Haskell/Add Evaluator").toString(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
package actions; | ||
|
||
import ui.PaintPanel; | ||
|
||
import java.lang.reflect.Method; | ||
|
||
import javax.swing.JOptionPane; | ||
|
||
import actions.menu.ActionsMenuBarTitles; | ||
import paintcomponents.java.lazy.ClassPaintComponent; | ||
import paintcomponents.java.interactive.InstanceOperationComponent; | ||
import paintcomponents.java.lazy.MethodPaintComponent; | ||
|
||
public class AddInstanceMethodAction extends PaintAction { | ||
|
||
public AddInstanceMethodAction(PaintPanel panel) { | ||
super(panel); | ||
} | ||
|
||
@Override | ||
public boolean canPerformAction() { | ||
if (panel.getSelectTool().getSelectedComponents().size() != 1) { | ||
return false; | ||
} | ||
if (panel.getSelectTool().getSelectedComponents() | ||
.get(0) instanceof InstanceOperationComponent) { | ||
return true; | ||
} | ||
return false; | ||
} | ||
|
||
@Override | ||
public void performAction() { | ||
InstanceOperationComponent insComp = | ||
(InstanceOperationComponent)panel.getSelectTool(). | ||
getSelectedComponents().get(0); | ||
Method[] methods = insComp.getDisplayingClass().getMethods(); | ||
|
||
int desiaredConstructorIndex = Integer | ||
.parseInt(JOptionPane.showInputDialog( | ||
"Please enter the index of the constructor you would like to use: \n\n\n" | ||
+ getMethodsSelectionUI(methods))); | ||
insComp.addMethodPaintComponent(methods[desiaredConstructorIndex], panel); | ||
panel.repaint(); | ||
} | ||
|
||
@Override | ||
public String locationString() { | ||
// TODO Auto-generated method stub | ||
return ActionsMenuBarTitles.Lazy().Add().Add_Instance_Method().toString(); | ||
} | ||
|
||
public String getMethodsSelectionUI(Method[] methods) { | ||
StringBuilder builder = new StringBuilder(); | ||
for (int i = 0; i < methods.length; i++) { | ||
Method constructor = methods[i]; | ||
builder.append(i + " : " + constructor.toString() + "\n"); | ||
} | ||
return builder.toString(); | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.