Class RenderingPlane


  • public class RenderingPlane
    extends java.lang.Object
    A class representing a rendering plane in the mapper. A rendering plane forms a part of the map that all information of one kind is drawn on completely and independantly of other planes. Planes are drawn on top of each according to their index, i.e. plane 1 is painted on top of plane 0, therefore higher indexed planes should contain less graphical content than lower ones to maintain visibility of the lower planes.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ACTIVE_OBJECT
      Indicates that the renderer will determine the regions itself.
      static int ACTIVE_OR_SELECTED
      Indicates that both active and selected regions should be painted.
      static int ACTIVE_REGION
      Indicates that the active region should be painted.
      static int ALWAYS_ONCE
      Indicates that the renderer does not depend on visible objects and should always be called.
      protected int regionTypes  
      static int SELECTED_REGIONS
      Indicates that only selected regions should be painted.
      static int TAGGED_REGIONS
      Indicates that regions with tags should be painted.
      static int VISIBLE_REGIONS
      Indicates that all visible (on screen) regions should be painted.
    • Constructor Summary

      Constructors 
      Constructor Description
      RenderingPlane​(int index, java.lang.String name)
      Creates a new RenderingPlane object representing the plane at the specified index and with the specified name.
      RenderingPlane​(int index, java.lang.String name, int regionTypes)
      Creates a new RenderingPlane object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getIndex()
      Retrieve the index of this rendering plane.
      java.lang.String getName()
      Returns the name of this plane.
      int getRegionTypes()
      Returns the region types this plane is interested in.
      MapCellRenderer getRenderer()
      Returns the renderer that is currently used to draw on this rendering plane.
      int hashCode()  
      void setName​(java.lang.String newName)
      Sets a new name for this rendering plane.
      void setRegionTypes​(int r)
      Sets the region types this plane is interested in.
      void setRenderer​(MapCellRenderer renderer)
      Sets the renderer to be used to paint this rendering plane.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • VISIBLE_REGIONS

        public static final int VISIBLE_REGIONS
        Indicates that all visible (on screen) regions should be painted. If set together with the following only visible selected regions etc. should be painted.
        See Also:
        Constant Field Values
      • SELECTED_REGIONS

        public static final int SELECTED_REGIONS
        Indicates that only selected regions should be painted.
        See Also:
        Constant Field Values
      • ACTIVE_REGION

        public static final int ACTIVE_REGION
        Indicates that the active region should be painted.
        See Also:
        Constant Field Values
      • ACTIVE_OR_SELECTED

        public static final int ACTIVE_OR_SELECTED
        Indicates that both active and selected regions should be painted.
        See Also:
        Constant Field Values
      • TAGGED_REGIONS

        public static final int TAGGED_REGIONS
        Indicates that regions with tags should be painted.
        See Also:
        Constant Field Values
      • ACTIVE_OBJECT

        public static final int ACTIVE_OBJECT
        Indicates that the renderer will determine the regions itself.
        See Also:
        Constant Field Values
      • ALWAYS_ONCE

        public static final int ALWAYS_ONCE
        Indicates that the renderer does not depend on visible objects and should always be called.
        See Also:
        Constant Field Values
      • regionTypes

        protected int regionTypes
    • Constructor Detail

      • RenderingPlane

        public RenderingPlane​(int index,
                              java.lang.String name)
        Creates a new RenderingPlane object representing the plane at the specified index and with the specified name.
      • RenderingPlane

        public RenderingPlane​(int index,
                              java.lang.String name,
                              int regionTypes)
        Creates a new RenderingPlane object.
    • Method Detail

      • getIndex

        public int getIndex()
        Retrieve the index of this rendering plane.
      • getName

        public java.lang.String getName()
        Returns the name of this plane.
      • setName

        public void setName​(java.lang.String newName)
        Sets a new name for this rendering plane.
      • getRenderer

        public MapCellRenderer getRenderer()
        Returns the renderer that is currently used to draw on this rendering plane.
      • setRenderer

        public void setRenderer​(MapCellRenderer renderer)
        Sets the renderer to be used to paint this rendering plane. Since renderers have a default rendering plane, a warning is issued if the default rendering plane of the specified renderer differs from the index of this rendering plane.
      • getRegionTypes

        public int getRegionTypes()
        Returns the region types this plane is interested in.
      • setRegionTypes

        public void setRegionTypes​(int r)
        Sets the region types this plane is interested in.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object