### Build & Run Example App - Gradle Bash Source: https://github.com/luceresearchlab/jtamaro/blob/main/README.md Executes the Gradle task `:example:run` which builds all necessary modules (including the library) and then runs the main application in the `example` subproject. ```Bash ./gradlew :example:run ``` -------------------------------- ### Creating Graphics - Java (Static Import) Source: https://github.com/luceresearchlab/jtamaro/blob/main/README.md Illustrates the use of static imports for `Colors` and `Graphics` classes to shorten method calls when creating and combining graphics. Shows the same graphic creation as the explicit example but with a more concise syntax. ```Java import jtamaro.graphic.Graphic; import static jtamaro.graphic.Colors.*; import static jtamaro.graphic.Graphics.*; public class Example { public static void example() { Graphic h = rectangle(200, 60, WHITE); Graphic v = rectangle(60, 200, WHITE); Graphic cross = overlay(h, v); } } ``` -------------------------------- ### Building Interactive Application - Java Source: https://github.com/luceresearchlab/jtamaro/blob/main/README.md Shows how to create a basic interactive application using the `interact` method. Configures a key release handler to update a model based on UP/DOWN arrow keys and a renderer to display the model's value as text. ```Java import jtamaro.data.Pair; import jtamaro.graphic.Graphic; import static jtamaro.graphic.Colors.*; import static jtamaro.graphic.Fonts.*; import static jtamaro.graphic.Graphics.*; import static jtamaro.interaction.KeyboardKey.*; import static jtamaro.io.IO.*; public class Example { public static void example() { interact(0) .withKeyReleaseHandler((model, key) -> model + switch (key.keyCode()) { case UP -> 1; case DOWN -> -1; default -> 0; }) .withRenderer(model -> text(String.valueOf(model), MONOSPACED, 100, BLACK)) .run(); } } ``` -------------------------------- ### Generate Javadoc - Gradle Bash Source: https://github.com/luceresearchlab/jtamaro/blob/main/README.md Executes the Gradle task `:lib:javadoc` to generate API documentation for the JTamaro library module. The generated documentation will be placed in `lib/build/docs/javadoc/`. ```Bash ./gradlew :lib:javadoc ``` -------------------------------- ### Showing Graphic - Java IO Source: https://github.com/luceresearchlab/jtamaro/blob/main/README.md Illustrates how to use the `show` method from the `IO` class to display a graphic on the screen. This method performs the necessary side effects to render the pure graphic object. ```Java import static jtamaro.graphic.Colors.*; import static jtamaro.graphic.Graphics.*; import static jtamaro.io.IO.*; public class Example { public static void example() { show(rectangle(200, 100, RED)); } } ``` -------------------------------- ### Build Library JAR - Gradle Bash Source: https://github.com/luceresearchlab/jtamaro/blob/main/README.md Executes the Gradle task `:lib:jar` to build only the main JTamaro library module and produce its JAR file. The output JAR will be located in `lib/build/libs/`. ```Bash ./gradlew :lib:jar ``` -------------------------------- ### Creating Graphics - Java (Explicit) Source: https://github.com/luceresearchlab/jtamaro/blob/main/README.md Demonstrates how to create basic graphic shapes like rectangles and combine them using the `Graphics` class methods, referencing the class explicitly for each call. Shows creation of horizontal and vertical rectangles and overlaying them. ```Java import jtamaro.graphic.Graphic; import jtamaro.graphic.Colors; import jtamaro.graphic.Graphics; public class Example { public static void example() { Graphic h = Graphics.rectangle(200, 60, Colors.WHITE); Graphic v = Graphics.rectangle(60, 200, Colors.WHITE); Graphic cross = Graphics.overlay(h, v); } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.