Skip to content

Instantly share code, notes, and snippets.

@netopyr
netopyr / dummy2.java
Last active December 15, 2015 12:09
Attaching visual elements to the dummy
// Definition of head
final Bone head = new Bone(30, 90);
head.getContent().add(new Ellipse(20, 15));
// Definition of torso
final Bone torso = new Bone(80, 0);
torso.getContent().add(new Ellipse(40, 0, 50, 20));
head.getChildren().add(torso);
final Bone[] upperArm = new Bone[2];
@netopyr
netopyr / connecting_bones.java
Created March 27, 2013 21:36
Adding bone b2 to the children of bone b1
// Adding bone b2 to the children of bone b1
b1.getChildren().add(b2);
@netopyr
netopyr / single_bone.java
Last active December 15, 2015 12:09
Creating a single bone
// Creating a single bone
final Bone bone = new Bone(110, 90);
@netopyr
netopyr / visual_bone.java
Last active December 15, 2015 12:09
Attaching visual elements to a bone
// Attaching visual elements to a bone
final Bone bone = new Bone(50, 30);
bone.getContent().addAll(
new Circle(20),
new Ellipse(45, 0, 25, 15),
new Circle(80, 0, 10)
);
@netopyr
netopyr / caj_examples.java
Created October 7, 2015 19:54
Examples of Čaj library
expect(yourTests).to.be("simple");
expect(javasAge).to.be.within(15, 25);
expect(collection).to.include(aSpecificValue);
expect(java).to.have.a.property("age").which.is.at.least(20);