Ejemplo n.º 1
0
  private void testShapesTool() {
    window.toggleButton("Shapes Tool Button").click();
    randomAltClick();

    setupEffectsDialog();
    boolean stokeSettingsSetup = false;

    for (ShapeType shapeType : ShapeType.values()) {
      window.comboBox("shapeTypeCB").selectItem(shapeType.toString());
      for (ShapesAction shapesAction : ShapesAction.values()) {
        window.comboBox("actionCB").selectItem(shapesAction.toString());
        window.pressAndReleaseKeys(KeyEvent.VK_R);

        if (shapesAction == ShapesAction.STROKE) { // stroke settings will be enabled here
          if (!stokeSettingsSetup) {
            setupStrokeSettingsDialog();
            stokeSettingsSetup = true;
          }
        }

        moveRandom();
        dragRandom();

        if (shapesAction == ShapesAction.SELECTION
            || shapesAction == ShapesAction.SELECTION_FROM_STROKE) {
          keyboardDeselect();
        }
      }
    }

    keyboardUndoRedo();
    keyboardUndo();
  }
Ejemplo n.º 2
0
  private void testBrushStrokes() {
    randomAltClick();

    for (BrushType brushType : BrushType.values()) {
      window.comboBox("brushTypeSelector").selectItem(brushType.toString());
      for (Symmetry symmetry : Symmetry.values()) {
        window.comboBox("symmetrySelector").selectItem(symmetry.toString());
        window.pressAndReleaseKeys(KeyEvent.VK_R);
        moveRandom();
        dragRandom();
      }
    }
    keyboardUndoRedo();
  }