GithubHelp home page GithubHelp logo

dabiaoluo / mosaic-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from myteer/mosaic

0.0 2.0 0.0 3.37 MB

The Ultimate JavaFX, Multi-split, Drag-n-Drop Layout Manager

License: Apache License 2.0

Java 100.00%

mosaic-1's Introduction

Mosaic Logo

Mosaic

The Ultimate JavaFX, Multi-split, Drag-n-Drop Layout Manager

htm.java awesomeness


On YouTube (CLICK!)

Hi I'm an engineer for Cortical.io, working on machine intelligence in the form of language intelligence - it's my dream situation and I have very little time other than that to forward the progress of this, but it is too substanstial to keep to myself! I'm hoping (with a lot of guidance from myself) that some enterprising Java engineer can take this and run with it! Please Please contact me if you're that person! [email protected]...

Demo

Mosaic is an amazing new layout manager which allows you to split your screen however you want with no nesting; Drag dividers in ANY direction; and Drag-N-Drop contents anywhere, and the layout will intelligently morph into a new configuration while snapping to suggested locations!

OH YEAH...

Using Any Java Windowing Toolkit! (i.e. JavaFX, Swing, Apache Pivot etc.)

Discerning Developer: "Sounds cool... How does it do that!!!?"

Mosaic is an engine that furnishes dimensions and locations for objects it is given. So...

Step 1: Load it with objects in the same container (Could be string keys or some other mapping to your objects.) Mosaic doesn't operate on (i.e. resize or call any methods on) your objects. As a matter of fact it could be run on the server side!
Step 2: Attach mouse listener to your container (albeit JavaFX Node, Swing or Apach Pivot Container); inside of which; forward events to the Mosaic Engine
Step 3: Add a listener to Mosaic. Inside listener, apply location and dimension instructions to the object it tells you to... It will give you the object or mapping you furnished it with, plus a description of where to move or how to resize that object.

For examples for how this is done, see the MosaicPane reference classes in the "javafx", and "pivot" packages. (could be done the same way for Swing).

Easy peasy!


To use Demos: (in the "src/test/java" source tree)

Runs on JavaFX and Apache Pivot (and anything else if you implement it yourself)

  1. Fork or clone repo
  2. Setup in the IDE of your choice
  3. Run the:
  • ai.cogmission.mosaic.refimpl.javafx.MosaicPaneRefImpl.java
  • ai.cogmission.mosaic.refimpl.javafx.SimpleTester.java
  • -- or --
  • ai.cogmission.mosaic.refimpl.pivot.MosaicPaneRefImpl.java
  • ai.cogmission.mosaic.refimpl.pivot.SimpleTester.java
  1. All Dependencies are in "libs" directory.

To Implement yourself: (in the "src/main/java" source tree)

Take a look at the ai.cogmission.mosaic.refimpl.javafx.MosaicPane.java or ai.cogmission.mosaic.refimpl.pivot.MosaicPane.java file for reference on how to implement your own container that can be managed by the Mosaic Engine.

Better instructions are on the way... (we need your help!)


To Contribute: (This is open source and free after all)

Contact me at: [email protected]

mosaic-1's People

Contributors

cogmission avatar

Watchers

James Cloos avatar dabiaoluo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.