{"id":19015410,"url":"https://github.com/hansolo/observablematrix","last_synced_at":"2025-06-16T22:07:01.286Z","repository":{"id":145344410,"uuid":"168712961","full_name":"HanSolo/observablematrix","owner":"HanSolo","description":"An array based matrix that is observable implemented in Java","archived":false,"fork":false,"pushed_at":"2022-03-10T09:23:59.000Z","size":35,"stargazers_count":10,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-23T01:51:23.538Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HanSolo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","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-02-01T14:53:56.000Z","updated_at":"2022-09-10T03:08:28.000Z","dependencies_parsed_at":"2023-07-03T20:46:47.170Z","dependency_job_id":null,"html_url":"https://github.com/HanSolo/observablematrix","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HanSolo/observablematrix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HanSolo%2Fobservablematrix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HanSolo%2Fobservablematrix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HanSolo%2Fobservablematrix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HanSolo%2Fobservablematrix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HanSolo","download_url":"https://codeload.github.com/HanSolo/observablematrix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HanSolo%2Fobservablematrix/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260249965,"owners_count":22980765,"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":[],"created_at":"2024-11-08T19:37:13.009Z","updated_at":"2025-06-16T22:07:01.260Z","avatar_url":"https://github.com/HanSolo.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Observable Matrix\n\n\n\n\nATTENTION: THIS PROJECT CONTINUES TO LIVE IN THE FOLLOWING PROJECT: [Toolbox](https://github.com/HanSolo/toolbox)\n\n\n\n\n\nAn array based observable matrix implemented in Java.\n\nIt will fire the following events:\n- MColumnEvent (COLUMN_ADDED, COLUMN_REMOVED)\n- MRowEvent (ROW_ADDED, ROW_REMOVED)\n- MItemEvent (ITEM_ADDED, ITEM_REMOVED, ITEM_CHANGED)\n- MColumnsEvent (NO_OF_COLUMNS_CHANGED)\n- MRowsEvent (NO_OF_ROWS_CHANGED)\n\nAll events are extending MEvent and so you could either \nsubscribe to specific events e.g.\n```Java\nmatrix.setOnItemChanged(e -\u003e { ... })\n\nmatrix.setOnMEvent(MItemEvent.ITEM_CHANGED, event -\u003e { ... });\n```\nor you could subscribe to a group of event e.g.\n```Java\nmatrix.setOnMEvent(MItemEvent.ANY, event -\u003e { ... });\n```\n\nThe matrix can hold objects of any type, initialize it \nas follows\n```Java\n// Matrix with Integer objects\nObservableMatrix\u003cInteger\u003e integerMatrix = new ObservableMatrix\u003c\u003e(Integer.class, 3, 2);\n\n// Matrix with JavaFX Label objects\nObservableMatrix\u003cLabel\u003e labelMatrix = new ObservableMatrix\u003c\u003e(Label.class, 5, 5);\n\n```\n\nThe matrix supports methods for the following operations:\n- getItemAt(int x, int y) \n- setItemAt(int x, int y, T item) {\n- removeItemAt(int x, int y) {\n- removeItem(T item) {\n- contains(T item) {\n- getIndicesOf(T item) {\n- getMatrix() { return matrix; }\n- getAllItems() { return stream().filter(Objects::nonNull).collect(Collectors.toList()); }\n- stream()\n- reset()\n- getCol(int col)\n- getRow(int row)\n- isColEmpty(int col)\n- isRowEmpty(int row)\n- getNoOfCols()\n- setCols(int cols)\n- addCol(int at, Supplier\u003cT\u003e itemSupplier)\n- addCol(int at, List\u003cT\u003e items)\n- addNullCol(int at)\n- removeCol(int at)\n- addRow(int at, Supplier\u003cT\u003e itemSupplier)\n- addRow(int at, List\u003cT\u003e items)\n- addNullRow(int at)\n- removeRow(int at)\n- getNoOfRows()\n- setRows(int rows)\n- getAllColumns()\n- getAllEmptyColumns()\n- getAllRows()\n- getAllEmptyRows()\n- getResizeMatrixWhenInnerRowOrColIsRemoved()\n- setResizeMatrixWhenInnerRowOrColIsRemoved(boolean resize)\n \n \n Please find a little example in the Demo class.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhansolo%2Fobservablematrix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhansolo%2Fobservablematrix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhansolo%2Fobservablematrix/lists"}