{"id":16130217,"url":"https://github.com/lambdacasserole/bach","last_synced_at":"2025-08-15T15:08:47.763Z","repository":{"id":75385605,"uuid":"175058948","full_name":"lambdacasserole/bach","owner":"lambdacasserole","description":"Compose components using a generic designer.","archived":false,"fork":false,"pushed_at":"2019-10-02T18:22:23.000Z","size":308,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-12T20:19:34.705Z","etag":null,"topics":["designer","drag-and-drop","gui","visualization"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lambdacasserole.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-11T18:19:26.000Z","updated_at":"2019-10-02T18:22:25.000Z","dependencies_parsed_at":"2023-06-06T08:45:31.488Z","dependency_job_id":null,"html_url":"https://github.com/lambdacasserole/bach","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdacasserole%2Fbach","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdacasserole%2Fbach/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdacasserole%2Fbach/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdacasserole%2Fbach/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lambdacasserole","download_url":"https://codeload.github.com/lambdacasserole/bach/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247492546,"owners_count":20947545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["designer","drag-and-drop","gui","visualization"],"created_at":"2024-10-09T22:15:00.731Z","updated_at":"2025-04-06T14:16:34.431Z","avatar_url":"https://github.com/lambdacasserole.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bach\nCompose components using a generic designer.\n\n![Logo](logo/logo.svg)\n\n## Overview\nSometimes you need a relatively simple, low-level, generic designer library that's open to extension. Bach is designed to enable you to build interconnected diagrams of *bricks* (some sort of image representing an attached object) with a simple mechanism for defining rules about which sorts of brick can connect to which other sorts etc. This code was extracted from the [Denobo](https://github.com/lambdacasserole/Denobo) network designer utility and made as generic as possible.\n\n![Preview](preview.gif)\n\n## Prerequisites\nBach is written in Java, and makes use of Swing. Batteries are definitely not included whatsoever, it's entirely up to you to define your own bricks (by subclassing the abstract `Brick` class), handle image loading, and define your object model. Context menus are supported, but once again you'll have to define your own. Images are not included, those used in the preview are from the [Tango Icon Library](http://tango.freedesktop.org/Tango_Icon_Library).\n\n## Use Case\nThe library is designed to be very general-purpose. If you need a starting point for simply modelling the relationships between objects, with some constraints, Bach might be for you.\n\n## Installation\nYou can pull this package into your Maven project straight from here using JitPack. Add JitPack as a repository first:\n\n```\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003ejitpack.io\u003c/id\u003e\n        \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n```\n\nThen add a dependency on Bach:\n\n```\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.github.lambdacasserole\u003c/groupId\u003e\n        \u003cartifactId\u003ebach\u003c/artifactId\u003e\n        \u003cversion\u003ev1.0\u003c/version\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n## Quickstart\nSee below for some code that'll get you started quite quickly. Remember you have to define `MyCustomBrick1` and `MyCustomBrick2` yourself by subclassing `Brick`.\n\n```java\nimport javax.swing.*;\nimport com.sauljohnson.bach.*;\n\npublic class QuickBachTest {\n\n    /**\n     * The application entry point.\n     *\n     * @param args the command-line arguments to the application\n     */\n    public static void main(String[] args) {\n        JFrame mainFrame = new JFrame();\n        Designer designer = new Designer(null); // New designer, no context menu.\n\n        // Add designer to form.\n        mainFrame.add(designer);\n        mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n        mainFrame.show();\n\n        // Initialise a new brick (you have to define this yourself by subclassing Brick).\n        MyCustomBrick1 b1 = new MyCustomBrick1(null, 0, 0);\n\n        // Initialise a new brick of a different type.\n        MyCustomBrick2 b2 = new MyCustomBrick2(null, 0, 0);\n\n        // Add bricks to designer.\n        designer.addBrick(b1);\n        designer.addBrick(b2);\n    }\n}\n```\n\n## Acknowledgements\nCredit to my original co-creators of [Denobo](https://github.com/lambdacasserole/Denobo), [Alex Mullen](https://github.com/alexmullen) and [Lee Oliver](https://github.com/Lee34723) for their part in building the original software.\n\nThe [Tango Icon Library](http://tango.freedesktop.org/Tango_Icon_Library) (used in the preview GIF) is an excellent free icon pack that I recommend checking out.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdacasserole%2Fbach","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flambdacasserole%2Fbach","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdacasserole%2Fbach/lists"}