Class View3DWithLightSettings

    • Constructor Detail

      • View3DWithLightSettings

        public View3DWithLightSettings()
        Create the view, with a default LightSettings object.
    • Method Detail

      • setLightSettings

        public void setLightSettings(LightSettings lightSettings)
        Sets the current light settings for this view. Note that calling this method does not automatically force a redraw; it simply replaces the current light settings in the view. If setAnaglyphLightSettings(LightSettings) or setNonAnaglyphLightSettings(LightSettings) has been called, then this only affects the light settings for the current view style; otherwise, the new light settings replaces the light settings that are used for all view styles.
        lightSettings - the new light settings; if this is null, the current light settings are not changed.
      • getLightingEnabled

        public boolean getLightingEnabled()
        Check whether lighting is currently enabled.
        See Also:
      • setLightingEnabled

        public void setLightingEnabled(boolean lightingEnabled)
        Set whether lighting is currently enabled. When lighting is enabled, surface colors are computed based on intrinsic color plus illumination. When it is disabled, surface patches are drawn using intrinsic color only (leading to a completely flat appearance). The default value is true.
        lightingEnabled -
      • getSettingsCommands

        public ActionList getSettingsCommands()
        Adds a checkbox for setting the lighting and dragAsSurface commands to any settings contributed by the superclass.
        getSettingsCommands in class View3D
        See Also:
      • addExtraXML

        public void addExtraXML(Document containingDocument,               Element viewElement)
        Overridden to add light settings info.
        addExtraXML in class View3D
        containingDocument - The overall XML document that contains the view Element that is being created. This parameter is necessary because it is needed to create any nested subelements that are to be added to the view element.
        viewElement - The XML element that is being constructed. This element already exists; the purpose of this method to add any extra information that would be needed to reconstruct this view object from the XML represenation.
        See Also:
      • readExtraXML

        public void readExtraXML(Element viewInfo)                  throws IOException
        Overridden to read back the light settings info.
        readExtraXML in class View3D
        viewInfo - The <view> element from the XML file that contains the information about this view. Some methods from the SaveAndRestore class might be useful for getting the data.
        IOException - If an error is found, an exception of type IOException should be thrown. This will abort the whole processing of the XML file.

SCaVis 2.2 © jWork.ORG