Package mgui.util

Class Colour4f

java.lang.Object
mgui.util.Colour
mgui.util.Colour4f
All Implemented Interfaces:
XMLObject

public class Colour4f
extends Colour
  • Constructor Details

    • Colour4f

      public Colour4f()
    • Colour4f

      public Colour4f​(float r, float g, float b, float a)
    • Colour4f

      public Colour4f​(java.awt.Color c)
  • Method Details

    • getDims

      public int getDims()
      Overrides:
      getDims in class Colour
    • getColour

      public org.jogamp.vecmath.Color4f getColour()
    • setColour

      public void setColour​(org.jogamp.vecmath.Color4f c)
    • set

      public void set​(java.awt.Color c)
      Overrides:
      set in class Colour
    • getColor

      public java.awt.Color getColor()
      Overrides:
      getColor in class Colour
    • getAlpha

      public float getAlpha()
      Overrides:
      getAlpha in class Colour
    • getBlue

      public float getBlue()
      Overrides:
      getBlue in class Colour
    • getGreen

      public float getGreen()
      Overrides:
      getGreen in class Colour
    • getIntensity

      public float getIntensity()
      Overrides:
      getIntensity in class Colour
    • getRed

      public float getRed()
      Overrides:
      getRed in class Colour
    • setAlpha

      public void setAlpha​(float a)
      Overrides:
      setAlpha in class Colour
    • setBlue

      public void setBlue​(float b)
      Overrides:
      setBlue in class Colour
    • setGreen

      public void setGreen​(float g)
      Overrides:
      setGreen in class Colour
    • setIntensity

      public void setIntensity​(float i)
      Overrides:
      setIntensity in class Colour
    • setRed

      public void setRed​(float r)
      Overrides:
      setRed in class Colour
    • getDim

      public float getDim​(int i)
      Overrides:
      getDim in class Colour
    • setDim

      public void setDim​(int i, float val)
      Overrides:
      setDim in class Colour
    • getColor4f

      public org.jogamp.vecmath.Color4f getColor4f()
      Overrides:
      getColor4f in class Colour
    • getColor3f

      public org.jogamp.vecmath.Color3f getColor3f()
      Overrides:
      getColor3f in class Colour
    • toString

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

      public java.lang.String getXML​(int tab)
      Description copied from interface: XMLObject
      Returns this object's XML representation as a single string. NOTE: this is not feasible for larger objects and containers, thus may not be implemented for these objects. Use the XMLObject.writeXML(int,java.io.Writer,mgui.io.standard.xml.XMLOutputOptions,mgui.interfaces.ProgressUpdater) functions to write larger objects to file.
      Specified by:
      getXML in interface XMLObject
      Overrides:
      getXML in class Colour
      Parameters:
      tab - The number of tabs to place before the opening XML wrapper
      Returns:
    • getShortXML

      public java.lang.String getShortXML​(int tab)
      Description copied from interface: XMLObject
      Returns a short XML representation of this object.
      Specified by:
      getShortXML in interface XMLObject
      Overrides:
      getShortXML in class Colour
      Returns:
    • handleXMLElementStart

      public void handleXMLElementStart​(java.lang.String localName, org.xml.sax.Attributes attributes, XMLObject.XMLType type)
      Description copied from interface: XMLObject
      Handles the start of an XML element.
      Specified by:
      handleXMLElementStart in interface XMLObject
      Overrides:
      handleXMLElementStart in class Colour
      Parameters:
      localName - Local name of the element
      attributes - Set of element attributes
      type - The XMLType of this element
    • getLocalName

      public java.lang.String getLocalName()
      Description copied from interface: XMLObject
      Returns the local name associated with this XML object.
      Specified by:
      getLocalName in interface XMLObject
      Overrides:
      getLocalName in class Colour
      Returns:
    • getXMLInstance

      public static XMLObject getXMLInstance​(org.xml.sax.Attributes attributes)