示例#1
0
 /** {@inheritDoc} */
 public void copy(ShapeAttributes attributes)
 {
     if (attributes != null)
     {
         this.drawInterior          = attributes.isDrawInterior();
         this.drawOutline           = attributes.isDrawOutline();
         this.enableAntialiasing    = attributes.isEnableAntialiasing();
         this.enableLighting        = attributes.isEnableLighting();
         this.interiorMaterial      = attributes.getInteriorMaterial();
         this.outlineMaterial       = attributes.getOutlineMaterial();
         this.interiorOpacity       = attributes.getInteriorOpacity();
         this.outlineOpacity        = attributes.getOutlineOpacity();
         this.outlineWidth          = attributes.getOutlineWidth();
         this.outlineStippleFactor  = attributes.getOutlineStippleFactor();
         this.outlineStipplePattern = attributes.getOutlineStipplePattern();
         this.imageSource           = attributes.getImageSource();
         this.imageScale            = attributes.getImageScale();
     }
 }
示例#2
0
        /**
         * Creates a new <code>BasicShapeAttributes</code> configured with the specified <code>attributes</code>.
         *
         * @param attributes the attributes to configure the new <code>BasicShapeAttributes</code> with.
         *
         * @throws ArgumentException if <code>attributes</code> is <code>null</code>.
         */
        public BasicShapeAttributes(ShapeAttributes attributes)
        {
            if (attributes == null)
            {
                String message = Logging.getMessage("nullValue.AttributesIsNull");
                Logging.logger().severe(message);
                throw new ArgumentException(message);
            }

            this.drawInterior          = attributes.isDrawInterior();
            this.drawOutline           = attributes.isDrawOutline();
            this.enableAntialiasing    = attributes.isEnableAntialiasing();
            this.enableLighting        = attributes.isEnableLighting();
            this.interiorMaterial      = attributes.getInteriorMaterial();
            this.outlineMaterial       = attributes.getOutlineMaterial();
            this.interiorOpacity       = attributes.getInteriorOpacity();
            this.outlineOpacity        = attributes.getOutlineOpacity();
            this.outlineWidth          = attributes.getOutlineWidth();
            this.outlineStippleFactor  = attributes.getOutlineStippleFactor();
            this.outlineStipplePattern = attributes.getOutlineStipplePattern();
            this.imageSource           = attributes.getImageSource();
            this.imageScale            = attributes.getImageScale();
        }