Package mgui.util
Class Colour3f
java.lang.Object
mgui.util.Colour
mgui.util.Colour3f
- All Implemented Interfaces:
XMLObject
public class Colour3f 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()
org.jogamp.vecmath.Color3f
getColor3f()
org.jogamp.vecmath.Color4f
getColor4f()
float
getDim(int i)
int
getDims()
float
getGreen()
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
setBlue(float b)
void
setDim(int i, float val)
void
setGreen(float g)
void
setIntensity(int i)
void
setRed(float r)
java.lang.String
toString()
Methods inherited from class mgui.util.Colour
getColor, getColour, getDTD, getIntensity, getXML, getXMLSchema, handleXMLElementEnd, handleXMLString, set, setAlpha, 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
-
Colour3f
public Colour3f() -
Colour3f
public Colour3f(float red, float green, float blue) -
Colour3f
public Colour3f(java.awt.Color c)
-
-
Method Details
-
getDims
public int getDims() -
getAlpha
public float getAlpha() -
getBlue
public float getBlue() -
getGreen
public float getGreen() -
getRed
public float getRed() -
setBlue
public void setBlue(float b) -
setGreen
public void setGreen(float g) -
setIntensity
public void setIntensity(int 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) -
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
-
getColor4f
public org.jogamp.vecmath.Color4f getColor4f()- Overrides:
getColor4f
in classColour
-
getColor3f
public org.jogamp.vecmath.Color3f getColor3f()- Overrides:
getColor3f
in classColour
-
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
-