Esempio n. 1
0
  /**
   * shows the options to edit the selected shape
   *
   * @param selectedShape the shape currently selected
   */
  public void shapeSelected(ReactiveShape selectedShape) {
    shape = selectedShape;

    switch (shape.getShapeType()) {
      case ReactiveShape.RECTANGLE:
        type.setValue(TYPE_RECTANGLE);
        break;
      case ReactiveShape.CIRCLE:
        type.setValue(TYPE_CIRCLE);
        break;
      case ReactiveShape.TRIANGLE:
        type.setValue(TYPE_TRIANGLE);
        break;
    }

    backgroundPane.setVisible(false);
    shapePane.setVisible(true);

    color.setValue(shape.getColor());
    filled.setSelected(shape.isFilled());
    borderThickness.setText("" + shape.getBorderThickness());
    borderColor.setValue(shape.getBorderColor());
    width.setText("" + (int) shape.getWidth());
    height.setText("" + (int) shape.getHeight());
  }
Esempio n. 2
0
 /** shows the options to edit the background */
 public void backgroundSelected() {
   backgroundPane.setVisible(true);
   shapePane.setVisible(false);
 }