Skip to content

Commit

Permalink
Moved the entire package structure from net.nodebox to nodebox.
Browse files Browse the repository at this point in the history
This change was done to make Python code in NodeBox use shorter imports.
It makes more sense in Python to do "from nodebox import graphics" than
"from net.nodebox import graphics". Since we'll be writing more Python than
Java code, this change is justified.
  • Loading branch information
Frederik De Bleser committed Jun 9, 2009
1 parent 84366c7 commit 14374a9
Show file tree
Hide file tree
Showing 177 changed files with 381 additions and 759 deletions.
23 changes: 0 additions & 23 deletions Nodebox-java.iml

This file was deleted.

6 changes: 4 additions & 2 deletions build.xml
Expand Up @@ -5,7 +5,7 @@
<target name="properties">
<property name="src" value="src"/>
<property name="res" value="res"/>
<property name="test" value="test/java"/>
<property name="test" value="test"/>
<property name="lib" value="lib"/>
<property name="libraries" value="libraries"/>
<property name="examples" value="examples"/>
Expand Down Expand Up @@ -121,12 +121,14 @@
<include name="*.py"/>
<include name="*.properties"/>
</fileset>
<!-- Currently there are no files in platform.lib.
<fileset dir="${platform.lib}">
<include name="*.jar"/>
<include name="*.zip"/>
<include name="*.py"/>
<include name="*.properties"/>
</fileset>
-->
</copy>
<!-- Copy resources-->
<copy todir="${mac.application.res}">
Expand Down Expand Up @@ -159,7 +161,7 @@
</target>

<target name="run" depends="compile">
<java classname="net.nodebox.client.Application" fork="true">
<java classname="nodebox.client.Application" fork="true">
<classpath refid="project.classpath"/>
</java>
</target>
Expand Down
8 changes: 4 additions & 4 deletions libraries/corevector/corevector.ndbx
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<ndbx type="file" formatVersion="0.9">
<node name="ellipse" prototype="builtins.root" x="300.16632836146215" y="41.0" type="net.nodebox.graphics.Grob">
<node name="ellipse" prototype="builtins.root" x="300.16632836146215" y="41.0" type="nodebox.graphics.Grob">
<description>Creates ellipses.</description>
<param name="_image">
<value>ellipse.png</value>
</param>
<param name="_code">
<value type="python"><![CDATA[from net.nodebox.graphics import BezierPath
<value type="python"><![CDATA[from nodebox.graphics import BezierPath
def cook(self):
p = BezierPath()
Expand Down Expand Up @@ -51,13 +51,13 @@ def cook(self):
</param>
</node>
<node name="rect" prototype="builtins.root" x="65.99058103241903" y="49.11378030429748" rendered="true"
type="net.nodebox.graphics.Grob">
type="nodebox.graphics.Grob">
<description>Creates rectangles and rounded rectangles.</description>
<param name="_image">
<value>rect.png</value>
</param>
<param name="_code">
<value type="python"><![CDATA[from net.nodebox.graphics import BezierPath
<value type="python"><![CDATA[from nodebox.graphics import BezierPath
def cook(self):
p = BezierPath()
Expand Down
355 changes: 0 additions & 355 deletions nodebox-java.ipr

This file was deleted.

2 changes: 1 addition & 1 deletion platform/mac/res/Info.plist
Expand Up @@ -44,7 +44,7 @@
<key>JVMVersion</key>
<string>1.5+</string>
<key>MainClass</key>
<string>net.nodebox.client.Application</string>
<string>nodebox.client.Application</string>
<key>Properties</key>
<dict>
<key>com.apple.mrj.application.live-resize</key>
Expand Down
2 changes: 1 addition & 1 deletion src/net/nodebox/Icons.java → src/nodebox/Icons.java
@@ -1,4 +1,4 @@
package net.nodebox;
package nodebox;

import javax.swing.*;
import java.awt.*;
Expand Down
@@ -1,6 +1,6 @@
package net.nodebox.client;
package nodebox.client;

import net.nodebox.node.Node;
import nodebox.node.Node;

import javax.imageio.ImageIO;
import javax.swing.*;
Expand Down
Expand Up @@ -16,11 +16,11 @@
* You should have received a copy of the GNU General Public License
* along with NodeBox. If not, see <http://www.gnu.org/licenses/>.
*/
package net.nodebox.client;
package nodebox.client;

import net.nodebox.node.NodeLibrary;
import net.nodebox.node.NodeLibraryManager;
import net.nodebox.util.PythonUtils;
import nodebox.node.NodeLibrary;
import nodebox.node.NodeLibraryManager;
import nodebox.util.PythonUtils;

import javax.swing.*;
import java.awt.*;
Expand All @@ -43,7 +43,7 @@ public static Application getInstance() {
private ProgressDialog startupDialog;

public static final String NAME = "NodeBox 2";
private static Logger logger = Logger.getLogger("net.nodebox.client.Application");
private static Logger logger = Logger.getLogger("nodebox.client.Application");


private Application() {
Expand Down
@@ -1,6 +1,6 @@
package net.nodebox.client;
package nodebox.client;

import net.nodebox.util.StringUtils;
import nodebox.util.StringUtils;

import javax.swing.*;
import javax.swing.border.BevelBorder;
Expand Down
@@ -1,4 +1,4 @@
package net.nodebox.client;
package nodebox.client;

import javax.swing.*;
import javax.swing.event.ChangeEvent;
Expand Down
@@ -1,6 +1,6 @@
package net.nodebox.client;
package nodebox.client;

import net.nodebox.graphics.Color;
import nodebox.graphics.Color;

import javax.swing.*;
import javax.swing.event.ChangeEvent;
Expand Down
@@ -1,9 +1,9 @@
package net.nodebox.client;
package nodebox.client;

import edu.umd.cs.piccolo.PLayer;
import edu.umd.cs.piccolo.util.PPaintContext;
import net.nodebox.node.Connection;
import net.nodebox.node.Node;
import nodebox.node.Connection;
import nodebox.node.Node;

import java.awt.*;
import java.awt.geom.GeneralPath;
Expand Down
@@ -1,6 +1,6 @@
package net.nodebox.client;
package nodebox.client;

import net.nodebox.node.Parameter;
import nodebox.node.Parameter;
import org.python.util.PythonInterpreter;

import javax.swing.*;
Expand All @@ -16,7 +16,7 @@
public class Console extends JTextPane {

private Pane pane;
private static Logger logger = Logger.getLogger("net.nodebox.client.Console");
private static Logger logger = Logger.getLogger("nodebox.client.Console");
private PythonInterpreter interpreter;
public static final String PROMPT = ">>> ";
private ArrayList<String> inputHistory = new ArrayList<String>();
Expand Down
@@ -1,4 +1,4 @@
package net.nodebox.client;
package nodebox.client;

import javax.swing.*;
import java.awt.*;
Expand Down
@@ -1,4 +1,4 @@
package net.nodebox.client;
package nodebox.client;

import javax.imageio.ImageIO;
import javax.swing.*;
Expand Down
@@ -1,6 +1,6 @@
package net.nodebox.client;
package nodebox.client;

import net.nodebox.node.Node;
import nodebox.node.Node;

import java.util.EventListener;

Expand Down
@@ -1,4 +1,4 @@
package net.nodebox.client;
package nodebox.client;

import javax.imageio.ImageIO;
import javax.swing.*;
Expand Down
@@ -1,4 +1,4 @@
package net.nodebox.client;
package nodebox.client;

import org.python.core.Py;
import org.python.core.PyString;
Expand Down
@@ -1,7 +1,7 @@
package net.nodebox.client;
package nodebox.client;

import net.nodebox.graphics.GraphicsContext;
import net.nodebox.graphics.Text;
import nodebox.graphics.GraphicsContext;
import nodebox.graphics.Text;
import org.python.util.PythonInterpreter;

import javax.swing.*;
Expand All @@ -18,7 +18,7 @@

public class EditorDocument extends JFrame {
private final static String WINDOW_MODIFIED = "windowModified";
private static Logger logger = Logger.getLogger("net.nodebox.client.EditorDocument");
private static Logger logger = Logger.getLogger("nodebox.client.EditorDocument");

private GraphicsContext context;
private PythonInterpreter interpreter;
Expand Down Expand Up @@ -112,19 +112,19 @@ public void actionPerformed(ActionEvent actionEvent) {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
ByteArrayOutputStream errorStream = new ByteArrayOutputStream();
interpreter.set("g", context);
interpreter.set("BezierPath", net.nodebox.graphics.BezierPath.class);
interpreter.set("Canvas", net.nodebox.graphics.Canvas.class);
interpreter.set("Color", net.nodebox.graphics.Color.class);
interpreter.set("GraphicsContext", net.nodebox.graphics.GraphicsContext.class);
interpreter.set("Grob", net.nodebox.graphics.Grob.class);
interpreter.set("Group", net.nodebox.graphics.Group.class);
interpreter.set("Image", net.nodebox.graphics.Image.class);
interpreter.set("NodeBoxError", net.nodebox.graphics.NodeBoxError.class);
interpreter.set("PathElement", net.nodebox.graphics.PathElement.class);
interpreter.set("Point", net.nodebox.graphics.Point.class);
interpreter.set("Rect", net.nodebox.graphics.Rect.class);
interpreter.set("Text", net.nodebox.graphics.Text.class);
interpreter.set("Transform", net.nodebox.graphics.Transform.class);
interpreter.set("BezierPath", nodebox.graphics.BezierPath.class);
interpreter.set("Canvas", nodebox.graphics.Canvas.class);
interpreter.set("Color", nodebox.graphics.Color.class);
interpreter.set("GraphicsContext", nodebox.graphics.GraphicsContext.class);
interpreter.set("Grob", nodebox.graphics.Grob.class);
interpreter.set("Group", nodebox.graphics.Group.class);
interpreter.set("Image", nodebox.graphics.Image.class);
interpreter.set("NodeBoxError", nodebox.graphics.NodeBoxError.class);
interpreter.set("PathElement", nodebox.graphics.PathElement.class);
interpreter.set("Point", nodebox.graphics.Point.class);
interpreter.set("Rect", nodebox.graphics.Rect.class);
interpreter.set("Text", nodebox.graphics.Text.class);
interpreter.set("Transform", nodebox.graphics.Transform.class);
interpreter.set("LEFT", Text.Align.LEFT);
interpreter.set("RIGHT", Text.Align.RIGHT);
interpreter.set("CENTER", Text.Align.CENTER);
Expand Down
@@ -1,7 +1,7 @@
package net.nodebox.client;
package nodebox.client;

import net.nodebox.client.editor.SimpleEditor;
import net.nodebox.node.*;
import nodebox.client.editor.SimpleEditor;
import nodebox.node.*;

import javax.swing.*;
import javax.swing.event.CaretEvent;
Expand Down
@@ -1,4 +1,4 @@
package net.nodebox.client;
package nodebox.client;

import javax.imageio.ImageIO;
import javax.swing.*;
Expand Down
@@ -1,4 +1,4 @@
package net.nodebox.client;
package nodebox.client;

import javax.swing.*;
import java.awt.*;
Expand Down
@@ -1,4 +1,4 @@
package net.nodebox.client;
package nodebox.client;

import javax.swing.filechooser.FileFilter;
import java.awt.*;
Expand Down
@@ -1,4 +1,4 @@
package net.nodebox.client;
package nodebox.client;

import javax.swing.*;

Expand Down
@@ -1,7 +1,7 @@
package net.nodebox.client;
package nodebox.client;

import net.nodebox.node.DirtyListener;
import net.nodebox.node.Node;
import nodebox.node.DirtyListener;
import nodebox.node.Node;

import javax.swing.*;
import java.awt.*;
Expand Down
@@ -1,9 +1,9 @@
package net.nodebox.client;
package nodebox.client;

import net.nodebox.Icons;
import net.nodebox.node.Connection;
import net.nodebox.node.Node;
import net.nodebox.node.Port;
import nodebox.Icons;
import nodebox.node.Connection;
import nodebox.node.Node;
import nodebox.node.Port;

import javax.swing.*;
import javax.swing.event.ListDataListener;
Expand Down
@@ -1,4 +1,4 @@
package net.nodebox.client;
package nodebox.client;

import javax.imageio.ImageIO;
import javax.swing.*;
Expand Down
@@ -1,6 +1,6 @@
package net.nodebox.client;
package nodebox.client;

import net.nodebox.node.Node;
import nodebox.node.Node;

import java.awt.*;
import java.beans.PropertyChangeEvent;
Expand Down
@@ -1,4 +1,4 @@
package net.nodebox.client;
package nodebox.client;

import edu.umd.cs.piccolo.PCanvas;
import edu.umd.cs.piccolo.PNode;
Expand All @@ -8,7 +8,7 @@
import edu.umd.cs.piccolo.event.PPanEventHandler;
import edu.umd.cs.piccolo.util.PBounds;
import edu.umd.cs.piccolo.util.PPaintContext;
import net.nodebox.node.*;
import nodebox.node.*;

import javax.swing.*;
import java.awt.*;
Expand Down Expand Up @@ -314,7 +314,7 @@ public void showNodeSelectionDialog() {
Node n = getNode().create(dialog.getSelectedNode());
boolean success = smartConnect(getPane().getDocument().getActiveNode(), n);
if (!success)
n.setPosition(new net.nodebox.graphics.Point(pt));
n.setPosition(new nodebox.graphics.Point(pt));
n.setRendered();
doc.setActiveNode(n);
}
Expand Down

0 comments on commit 14374a9

Please sign in to comment.