Class BasicTreeAttributes

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      BasicTreeAttributes copy()
      Returns a new TreeAttributes instance of the same type as this TreeAttributes, who's properties are configured exactly as this TreeAttributes.
      void copy​(TreeAttributes attributes)
      Copies the specified TreeAttributes' properties into this object's properties.
      boolean equals​(java.lang.Object o)  
      java.awt.Color[] getCheckBoxColor()
      Get the color of filled checkboxes that indicate if nodes are selected.
      java.awt.Color getColor()
      Get the color of the text in the tree.
      java.awt.Font getDescriptionFont()
      Get the font used to render the node description.
      java.awt.Font getFont()
      Get the font used to render text.
      java.awt.Dimension getIconSize()
      Get the size of each icon in the tree.
      int getIconSpace()
      Get the amount of space, in pixels, to leave between an icon in the tree and surrounding text and shapes.
      int getRowSpacing()
      Get the space, in pixels, to leave between rows in the tree.
      int hashCode()  
      boolean isRootVisible()
      Should be root node be drawn?
      void setCheckBoxColor​(java.awt.Color color1, java.awt.Color color2)
      Set the color of filled checkboxes that indicate if a node is selected.
      void setColor​(java.awt.Color textColor)
      Set the color of the text in the tree.
      void setDescriptionFont​(java.awt.Font font)
      Set the font used to render the node descriptions.
      void setFont​(java.awt.Font font)
      Set the font used to render text.
      void setIconSize​(java.awt.Dimension iconSize)
      Set the size of each icon in the tree.
      void setIconSpace​(int iconSpace)
      Set the amount of space, in pixels, to leave between an icon in the tree and surrounding text and shapes.
      void setRootVisible​(boolean visible)
      Set the root node to visibile or not visible.
      void setRowSpacing​(int spacing)
      Set the space, in pixels, to leave between rows in the tree.
      • Methods inherited from class java.lang.Object

        clone, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • rootVisible

        protected boolean rootVisible
      • textColor

        protected java.awt.Color textColor
      • font

        protected java.awt.Font font
      • descriptionFont

        protected java.awt.Font descriptionFont
      • rowSpacing

        protected int rowSpacing
      • checkBoxColor1

        protected java.awt.Color checkBoxColor1
      • checkBoxColor2

        protected java.awt.Color checkBoxColor2
      • iconSize

        protected java.awt.Dimension iconSize
      • iconSpace

        protected int iconSpace
    • Constructor Detail

      • BasicTreeAttributes

        public BasicTreeAttributes()
      • BasicTreeAttributes

        public BasicTreeAttributes​(TreeAttributes attributes)
        Create a new attributes object with the same configuration as an existing attributes object.
        Parameters:
        attributes - Object to copy configuration from.
    • Method Detail

      • getDescriptionFont

        public java.awt.Font getDescriptionFont()
        Get the font used to render the node description.
        Specified by:
        getDescriptionFont in interface TreeAttributes
        Returns:
        Font for node description.
      • setDescriptionFont

        public void setDescriptionFont​(java.awt.Font font)
        Set the font used to render the node descriptions.
        Specified by:
        setDescriptionFont in interface TreeAttributes
        Parameters:
        font - New font for descriptions.
      • setIconSpace

        public void setIconSpace​(int iconSpace)
        Set the amount of space, in pixels, to leave between an icon in the tree and surrounding text and shapes.
        Specified by:
        setIconSpace in interface TreeAttributes
        Parameters:
        iconSpace - Icon space in pixels.
        See Also:
        TreeAttributes.getIconSpace()
      • getCheckBoxColor

        public java.awt.Color[] getCheckBoxColor()
        Get the color of filled checkboxes that indicate if nodes are selected. The checkboxes are drawn as a gradient of two colors.
        Specified by:
        getCheckBoxColor in interface TreeAttributes
        Returns:
        two element array of the colors that make up the checkbox gradient.
      • setCheckBoxColor

        public void setCheckBoxColor​(java.awt.Color color1,
                                     java.awt.Color color2)
        Set the color of filled checkboxes that indicate if a node is selected. The checkboxes are drawn as a gradient of two colors.
        Specified by:
        setCheckBoxColor in interface TreeAttributes
        Parameters:
        color1 - first color in the checkbox gradient.
        color2 - second color in the checkbox gradient.
      • copy

        public BasicTreeAttributes copy()
        Returns a new TreeAttributes instance of the same type as this TreeAttributes, who's properties are configured exactly as this TreeAttributes.
        Specified by:
        copy in interface TreeAttributes
        Returns:
        a copy of this TreeAttributes.
      • copy

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

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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