< prev index next >

modules/graphics/src/test/java/test/javafx/scene/StructureTest.java

Print this page




 645 //        println("c = {c}");
 646 //        println("p1.clip = {p1.clip}");
 647 //        println("p2.clip = {p2.clip}");
 648 //        println("c.clipParent = {c.getClipParent()}");
 649 //    }
 650 
 651     ////////////////////
 652     // Helper Classes //
 653     ////////////////////
 654 
 655     //
 656     // * A stub node that contains as little functionality as possible.
 657     // *
 658     public static final class StubNode extends Node {
 659         static {
 660             StubNodeHelper.setStubNodeAccessor(new StubNodeHelper.StubNodeAccessor() {
 661                 @Override
 662                 public NGNode doCreatePeer(Node node) {
 663                     return ((StubNode) node).doCreatePeer();
 664                 }













 665             });
 666         }
 667 




 668         public StubNode() {
 669             super();
 670             StubNodeHelper.initHelper(this);
 671         }
 672 
 673         // * Returning null causes crashes so return a NGGroup.
 674         private NGNode doCreatePeer() {
 675             return new NGGroup();
 676         }
 677 
 678         @Override
 679         public BaseBounds impl_computeGeomBounds(BaseBounds bounds, BaseTransform tx) {
 680             return bounds;
 681         }
 682 
 683         @Override
 684         public boolean impl_computeContains(double localX, double localY) {


 685             // TODO: Missing code.
 686             return false;
 687         }
 688 
 689         @Override
 690         public Object impl_processMXNode(MXNodeAlgorithm alg, MXNodeAlgorithmContext ctx) {


 691             return null;
 692         }
 693     }
 694 
 695     public static final class StubParent extends Parent {
 696         static {
 697             StubParentHelper.setStubParentAccessor(new StubParentHelper.StubParentAccessor() {
 698                 @Override
 699                 public NGNode doCreatePeer(Node node) {
 700                     return ((StubParent) node).doCreatePeer();
 701                 }











 702             });
 703         }
 704 




 705         public StubParent() {
 706             super();
 707             StubParentHelper.initHelper(this);
 708         }
 709 
 710         // * Returning null causes crashes so return a PGGroup.
 711         private NGNode doCreatePeer() {
 712             return new NGGroup();
 713         }
 714 
 715         @Override
 716         public BaseBounds impl_computeGeomBounds(BaseBounds bounds, BaseTransform tx) {
 717             return bounds;
 718         }
 719 
 720         @Override
 721         public boolean impl_computeContains(double localX, double localY) {


 722             // TODO: Missing code.
 723             return false;
 724         }
 725     }
 726 
 727 }


 645 //        println("c = {c}");
 646 //        println("p1.clip = {p1.clip}");
 647 //        println("p2.clip = {p2.clip}");
 648 //        println("c.clipParent = {c.getClipParent()}");
 649 //    }
 650 
 651     ////////////////////
 652     // Helper Classes //
 653     ////////////////////
 654 
 655     //
 656     // * A stub node that contains as little functionality as possible.
 657     // *
 658     public static final class StubNode extends Node {
 659         static {
 660             StubNodeHelper.setStubNodeAccessor(new StubNodeHelper.StubNodeAccessor() {
 661                 @Override
 662                 public NGNode doCreatePeer(Node node) {
 663                     return ((StubNode) node).doCreatePeer();
 664                 }
 665                 @Override
 666                 public BaseBounds doComputeGeomBounds(Node node,
 667                 BaseBounds bounds, BaseTransform tx) {
 668                     return ((StubNode) node).doComputeGeomBounds(bounds, tx);
 669                 }
 670                 @Override
 671                 public boolean doComputeContains(Node node, double localX, double localY) {
 672                     return ((StubNode) node).doComputeContains(localX, localY);
 673                 }
 674                 @Override
 675                 public Object doProcessMXNode(Node node, MXNodeAlgorithm alg, MXNodeAlgorithmContext ctx) {
 676                     return ((StubNode) node).doProcessMXNode(alg, ctx);
 677                 }
 678             });
 679         }
 680 
 681         {
 682             // To initialize the class helper at the begining each constructor of this class
 683             StubNodeHelper.initHelper(this);
 684         }
 685         public StubNode() {
 686             super();

 687         }
 688 
 689         // * Returning null causes crashes so return a NGGroup.
 690         private NGNode doCreatePeer() {
 691             return new NGGroup();
 692         }
 693 
 694         private BaseBounds doComputeGeomBounds(BaseBounds bounds, BaseTransform tx) {

 695             return bounds;
 696         }
 697 
 698         /*
 699          * Note: This method MUST only be called via its accessor method.
 700          */
 701         private boolean doComputeContains(double localX, double localY) {
 702             // TODO: Missing code.
 703             return false;
 704         }
 705 
 706         /*
 707          * Note: This method MUST only be called via its accessor method.
 708          */
 709         private Object doProcessMXNode(MXNodeAlgorithm alg, MXNodeAlgorithmContext ctx) {
 710             return null;
 711         }
 712     }
 713 
 714     public static final class StubParent extends Parent {
 715         static {
 716             StubParentHelper.setStubParentAccessor(new StubParentHelper.StubParentAccessor() {
 717                 @Override
 718                 public NGNode doCreatePeer(Node node) {
 719                     return ((StubParent) node).doCreatePeer();
 720                 }
 721 
 722                 @Override
 723                 public BaseBounds doComputeGeomBounds(Node node,
 724                 BaseBounds bounds, BaseTransform tx) {
 725                     return ((StubParent) node).doComputeGeomBounds(bounds, tx);
 726                 }
 727 
 728                 @Override
 729                 public boolean doComputeContains(Node node, double localX, double localY) {
 730                     return ((StubParent) node).doComputeContains(localX, localY);
 731                 }
 732             });
 733         }
 734 
 735         {
 736             // To initialize the class helper at the begining each constructor of this class
 737             StubParentHelper.initHelper(this);
 738         }
 739         public StubParent() {
 740             super();

 741         }
 742 
 743         // * Returning null causes crashes so return a PGGroup.
 744         private NGNode doCreatePeer() {
 745             return new NGGroup();
 746         }
 747 
 748         private BaseBounds doComputeGeomBounds(BaseBounds bounds, BaseTransform tx) {

 749             return bounds;
 750         }
 751 
 752         /*
 753          * Note: This method MUST only be called via its accessor method.
 754          */
 755         private boolean doComputeContains(double localX, double localY) {
 756             // TODO: Missing code.
 757             return false;
 758         }
 759     }
 760 
 761 }
< prev index next >