1 /*
   2  * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation. Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  */
  24 package test.scenegraph.lcd;
  25 
  26 
  27 import javafx.scene.effect.*;
  28 import javafx.scene.paint.Color;
  29 import test.scenegraph.lcd.actions.EffectTestAction;
  30 import test.scenegraph.lcd.actions.RotateTestAction;
  31 import test.scenegraph.lcd.actions.SizeScaleTestAction;
  32 
  33 /**
  34  *
  35  * @author Alexander Petrov
  36  */
  37 public enum TestCollections {
  38 
  39     Size(SizeScaleTestAction.generateSizes(new double[]{
  40         8, 16, 38.3, 64, 80, 128, 64, 12.5
  41     })),
  42     SizeScale(SizeScaleTestAction.generate(new double[]{
  43         8, 16, 12.5
  44     }, new double[]{
  45         2, 4, 3.3
  46     }, SizeScaleTestAction.ScaleAxis.All)),
  47     ScaleX(SizeScaleTestAction.generateScales(new double[]{
  48         2, 2.5, 4, 6, 3.3
  49     }, SizeScaleTestAction.ScaleAxis.X)),
  50     ScaleY(SizeScaleTestAction.generateScales(new double[]{
  51         2, 2.5, 4, 8, 3.3
  52     }, SizeScaleTestAction.ScaleAxis.Y)),
  53     ScaleAll(SizeScaleTestAction.generateScales(new double[]{
  54         2, 2.5, 4, 8, 3.3
  55     }, SizeScaleTestAction.ScaleAxis.All)),
  56     Rotate(RotateTestAction.generate(new double[]{
  57         0, 45, 90, 180, 250, 360, 370
  58     })),
  59     Bloom(EffectTestAction.generate(new Bloom(), true)),
  60     BoxBlur(EffectTestAction.generate(new BoxBlur(), true)),
  61     ColorAdjust(EffectTestAction.generate(new ColorAdjust(), true)),
  62     //ColorInput(EffectTestAction.generate(new ColorInput(50, 50, 100, 100, Color.GREEN), false))
  63     DisplacementMap(EffectTestAction.generate(new DisplacementMap(), true)),
  64     DropShadow(EffectTestAction.generate(new DropShadow(BlurType.THREE_PASS_BOX, Color.BLACK, 10.0, 0.0, 0.0, 0.0), true)),
  65     GaussianBlur(EffectTestAction.generate(new GaussianBlur(), true)),
  66     Glow(EffectTestAction.generate(new Glow(), true)),
  67     InnerShadow(EffectTestAction.generate(new InnerShadow(), true)),
  68     Lighting(EffectTestAction.generate(new Lighting(), true)),
  69     MotionBlur(EffectTestAction.generate(new MotionBlur(), true)),
  70     PerspectiveTransform(EffectTestAction.generate(
  71             PerspectiveTransformBuilder.create()
  72             .ulx(10.0)
  73             .uly(10.0)
  74             .urx(100.0)
  75             .ury(40.0)
  76             .lrx(100.0)
  77             .lry(60.0)
  78             .llx(10.0)
  79             .lly(90.0)
  80             .build(), false)),
  81     Reflection(EffectTestAction.generate(new Reflection(), true)),
  82     SepiaTone(EffectTestAction.generate(new SepiaTone(), true)),
  83     Shadow(EffectTestAction.generate(new Shadow(), true))
  84     ;
  85 
  86     private TestAction[] actions;
  87 
  88     private TestCollections(TestAction[] actions) {
  89         this.actions = actions;
  90     }
  91 
  92     public TestAction[] getActions() {
  93         return actions;
  94     }
  95 }