Class BasicAirspaceAttributes

    • Constructor Detail

      • BasicAirspaceAttributes

        public BasicAirspaceAttributes()
        Creates a new BasicAirspaceAttributes with the default attributes. The default attributes differ from BasicShapeAttributes, and are as follows:
        Default Attributes
        AttributeDefault Value
        unresolvedtrue
        drawInteriortrue
        drawOutlinefalse
        enableAntialiasingfalse
        enableLightingtrue
        interiorMaterialMaterial.WHITE
        outlineMaterialMaterial.BLACK
        interiorOpacity1.0
        outlineOpacity1.0
        outlineWidth1.0
        outlineStippleFactor0
        outlineStipplePattern0xF0F0
        imageSourcenull
        imageScale1.0
      • BasicAirspaceAttributes

        public BasicAirspaceAttributes​(Material material,
                                       double opacity)
        Creates a new BasicAirspaceAttributes with the specified interior material and interior opacity. All other attributes are set to the default values, which differ from BasicShapeAttributes, and are as follows:
        Default Attributes
        AttributeDefault Value
        unresolvedtrue
        drawInteriortrue
        drawOutlinefalse
        enableAntialiasingfalse
        enableLightingtrue
        interiorMaterialmaterial
        outlineMaterialMaterial.BLACK
        interiorOpacityopacity
        outlineOpacity1.0
        outlineWidth1.0
        outlineStippleFactor0
        outlineStipplePattern0xF0F0
        imageSourcenull
        imageScale1.0
        Parameters:
        material - Material to apply.
        opacity - the opacity to set.
      • BasicAirspaceAttributes

        public BasicAirspaceAttributes​(ShapeAttributes attributes)
        Creates a new BasicAirspaceAttributes configured with the specified ShapeAttributes.
        Parameters:
        attributes - the attributes to configure the new BasicAirspaceAttributes with.
        Throws:
        java.lang.IllegalArgumentException - if attributes is null.
      • BasicAirspaceAttributes

        public BasicAirspaceAttributes​(AirspaceAttributes attributes)
        Creates a new BasicAirspaceAttributes configured with the specified attributes.
        Parameters:
        attributes - the attributes to configure the new BasicAirspaceAttributes with.
        Throws:
        java.lang.IllegalArgumentException - if attributes is null.
    • Method Detail

      • copy

        public AirspaceAttributes copy()
        Returns a new ShapeAttributes instance of the same type as this ShapeAttributes who's properties are configured exactly as this ShapeAttributes.
        Specified by:
        copy in interface ShapeAttributes
        Overrides:
        copy in class BasicShapeAttributes
        Returns:
        a copy of this ShapeAttributes.
      • copy

        public void copy​(ShapeAttributes attributes)
        Copies the specified ShapeAttributes' properties into this object's properties. This does nothing if the specified attributes is null.
        Specified by:
        copy in interface ShapeAttributes
        Overrides:
        copy in class BasicShapeAttributes
        Parameters:
        attributes - the attributes to copy.
      • restoreState

        public void restoreState​(RestorableSupport rs,
                                 RestorableSupport.StateObject so)
        Restores the state of any attributes contained in the specified RestorableSupport. If the StateObject is not null it's searched for attribute state values, otherwise the RestorableSupport root is searched.
        Specified by:
        restoreState in interface ShapeAttributes
        Overrides:
        restoreState in class BasicShapeAttributes
        Parameters:
        rs - the RestorableSupport that contains the attributes' state.
        so - the StateObject to search for state values, if not null.
      • applyMaterial

        protected void applyMaterial​(DrawContext dc,
                                     Material material,
                                     double opacity,
                                     boolean enableMaterial)