Skip to content

Processing Code API for Java. A Library that allows Processing Methods to be used in standard Java Programming

License

Notifications You must be signed in to change notification settings

KevinLiuxy/JProcessing

Repository files navigation

JProcessing

JProcessing is a Processing Code API for Java. It Enables Processing Code to be Programmed and Run directly in Java IDE.

Introduction

Processing is a programming language focused mainly on visual arts and animations in GUI programming. It provides a variety of simple and efficient methods for 2D graphics rendering, image/font displaying, as well as file operations. If you are unfamiliar with Processing language, please refer to Processing's official website for more information.

Jprocessing allows you to program and run Processing code in any Java IDE without using the official Processing IDE. It enables you to write Processing code in Java integrated development environment(IDE) you prefer, as mainstream Java IDEs usually offer more functionalities.

Note: There is also an official way to run Processing code in Java using PApplet. Jprocessing is a similar approach to it. With the difference being JProcessing only implements the most frequent-used methods from processing. Methods like 3D rendering, matrix operations, reading PDFs, etc. are not included. Therefore, it performs just like a simplified (lite) version of PApplet that only contains essential features, which takes less resources and space.

What is JProcessing

JProcessing is a .jar library. It is a Java API designed to implement Processing methods and functionality to Java programming environment. JProcessing contains methods of Processing in areas of 2D rendering, input/output, Math, PFont, PImage, and PVector. The main class JProcessing.Processing is the Processing GUI window (a subclass of JFrame), and contains Processing methods void setup(),void draw() and other input and event methods such as mousePressed(),keyReleased() etc.

After including JProcessing in your Java project, you can then program and run Processing code in Java normally. Most of the JProcessing methods perform the same functionality as of within Processing IDE, with a few exceptions. You can copy Processing code and paste them directly into Java IDE with JProcessing, and then run it. Most of them will run just fine (after a few small modifications that is).

How to use JProcessing

To implement Processing features in Java, first you need to include JProcessing jar library in your Java project. Then, you need to create a subclass of JProcessing.Processing. Your Processing codes can then be put inside it. Override void setup(),void draw() and other methods whenever they're needed. Finally, initialize a new object from your JProcessing.Processing subclass to start your GUI, and everything should work properly after that according to your code.

The templates of JProcessing implementation are included in the files (setup as IntelliJ projects), together with Javadocs providing the information that will help you better use and understand JProcessing library. The known issues and debugging guides are also included. The PDF version of the documentation is named "Template Manual.pdf". In the case of if anything goes wrong while using JProcessing, the issue and its solution might be already documented in the manual. So please have a look at it when any issue occurs.

If you are confused about certain method(s), you can check out the full documentation of Processing methods on the Processing website. Alternatively, the Javadoc of JProcessing is also included in the folder. It contains documentation for all JProcessing classes and fields, and the difference between how Processing IDE and JProcessing works. To my apologies, most of the methods of JProcessing are not documented in its Javadoc (since it's truly time-consuming). You can just Google: "Method_Name" + "Processing", which will lead you to the documentation page of any Processing method on its official website.

About Development

Yes, the source code is included and you are free to use, share and edit them. You are more than welcomed to contribute as well. Note that the source code for the official Processing IDE is also on the GitHub. I would say those are also worthy of checking out if you are interested in developing Processing (links here). Note that JProcessing does not referred or related to code from Processing IDE by any means. It is a stand-along project started completely from scratch.

I personally positioning JProcessing as a simple add-on in java that allows the basic function of Processing to be used in Java programming. The main goal is to make it simple (single jar file), small (only includes essential and frequently used functions), and convenient to use. Since otherwise, it might be better of working directly on Processing IDE for adding advanced and complex features.

Update is not guaranteed in the future. Please contact me if you find any bugs or have any other concerns, and I will try to resolve them as soon as possible.
Have Fun!

About

Processing Code API for Java. A Library that allows Processing Methods to be used in standard Java Programming

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages