Package mgui.util
Class Colour4f
java.lang.Object
mgui.util.Colour
mgui.util.Colour4f
- All Implemented Interfaces:
XMLObject
public class Colour4f extends Colour
-
Nested Class Summary
Nested classes/interfaces inherited from interface mgui.interfaces.xml.XMLObject
XMLObject.XMLEncoding, XMLObject.XMLType
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description float
getAlpha()
float
getBlue()
java.awt.Color
getColor()
org.jogamp.vecmath.Color3f
getColor3f()
org.jogamp.vecmath.Color4f
getColor4f()
org.jogamp.vecmath.Color4f
getColour()
float
getDim(int i)
int
getDims()
float
getGreen()
float
getIntensity()
java.lang.String
getLocalName()
Returns the local name associated with this XML object.float
getRed()
java.lang.String
getShortXML(int tab)
Returns a short XML representation of this object.java.lang.String
getXML(int tab)
Returns this object's XML representation as a single string.static XMLObject
getXMLInstance(org.xml.sax.Attributes attributes)
void
handleXMLElementStart(java.lang.String localName, org.xml.sax.Attributes attributes, XMLObject.XMLType type)
Handles the start of an XML element.void
set(java.awt.Color c)
void
setAlpha(float a)
void
setBlue(float b)
void
setColour(org.jogamp.vecmath.Color4f c)
void
setDim(int i, float val)
void
setGreen(float g)
void
setIntensity(float i)
void
setRed(float r)
java.lang.String
toString()
Methods inherited from class mgui.util.Colour
getColour, getDTD, getXML, getXMLSchema, handleXMLElementEnd, handleXMLString, setAlpha, setBlue, setGreen, setIntensity, setRed, writeXML, writeXML, writeXML
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
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() -
getColour
public org.jogamp.vecmath.Color4f getColour() -
setColour
public void setColour(org.jogamp.vecmath.Color4f c) -
set
public void set(java.awt.Color c) -
getColor
public java.awt.Color getColor() -
getAlpha
public float getAlpha() -
getBlue
public float getBlue() -
getGreen
public float getGreen() -
getIntensity
public float getIntensity()- Overrides:
getIntensity
in classColour
-
getRed
public float getRed() -
setAlpha
public void setAlpha(float a) -
setBlue
public void setBlue(float b) -
setGreen
public void setGreen(float g) -
setIntensity
public void setIntensity(float i)- Overrides:
setIntensity
in classColour
-
setRed
public void setRed(float r) -
getDim
public float getDim(int i) -
setDim
public void setDim(int i, float val) -
getColor4f
public org.jogamp.vecmath.Color4f getColor4f()- Overrides:
getColor4f
in classColour
-
getColor3f
public org.jogamp.vecmath.Color3f getColor3f()- Overrides:
getColor3f
in classColour
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.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 theXMLObject.writeXML(int,java.io.Writer,mgui.io.standard.xml.XMLOutputOptions,mgui.interfaces.ProgressUpdater)
functions to write larger objects to file. -
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 interfaceXMLObject
- Overrides:
getShortXML
in classColour
- 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 interfaceXMLObject
- Overrides:
handleXMLElementStart
in classColour
- Parameters:
localName
- Local name of the elementattributes
- Set of element attributestype
- TheXMLType
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 interfaceXMLObject
- Overrides:
getLocalName
in classColour
- Returns:
-
getXMLInstance
-