Example #1
0
 private void setHead() {
   headText = new Text();
   headText.setText(Integer.toString(speaker.userId));
   headText.xProperty().bind(speaker.headXProperty());
   headText.yProperty().bind(speaker.headYProperty());
   getChildren().add(headText);
 }
Example #2
0
  private void setJointLine() {
    setLineProperty(
        headLine,
        speaker.headXProperty(),
        speaker.headYProperty(),
        speaker.neckXProperty(),
        speaker.neckYProperty());

    setLineProperty(
        rightUpperArm,
        speaker.rightShoulderXProperty(),
        speaker.rightShoulderYProperty(),
        speaker.rightElbowXProperty(),
        speaker.rightElbowYProperty());

    setLineProperty(
        rightForearm,
        speaker.rightElbowXProperty(),
        speaker.rightElbowYProperty(),
        speaker.rightHandXProperty(),
        speaker.rightHandYProperty());

    setLineProperty(
        leftUpperArm,
        speaker.leftShoulderXProperty(),
        speaker.leftShoulderYProperty(),
        speaker.leftElbowXProperty(),
        speaker.leftElbowYProperty());

    setLineProperty(
        leftForearm,
        speaker.leftElbowXProperty(),
        speaker.leftElbowYProperty(),
        speaker.leftHandXProperty(),
        speaker.leftHandYProperty());

    setLineProperty(
        rightUpperThigh,
        speaker.rightHipXProperty(),
        speaker.rightHipYProperty(),
        speaker.rightKneeXProperty(),
        speaker.rightKneeYProperty());

    setLineProperty(
        rightLowerThigh,
        speaker.rightKneeXProperty(),
        speaker.rightKneeYProperty(),
        speaker.rightFootXProperty(),
        speaker.rightFootYProperty());

    setLineProperty(
        leftUpperThigh,
        speaker.leftHipXProperty(),
        speaker.leftHipYProperty(),
        speaker.leftKneeXProperty(),
        speaker.leftKneeYProperty());

    setLineProperty(
        leftLowerThigh,
        speaker.leftKneeXProperty(),
        speaker.leftKneeYProperty(),
        speaker.leftFootXProperty(),
        speaker.leftFootYProperty());

    getChildren()
        .addAll(
            rightUpperArm,
            rightForearm,
            leftUpperArm,
            leftForearm,
            leftUpperThigh,
            leftLowerThigh,
            rightUpperThigh,
            rightLowerThigh);
  }