Package breitband.GUI.elements
Class GAsset
- java.lang.Object
-
- sag.elements.GElement
-
- sag.elements.GSVG
-
- breitband.GUI.elements.GAsset
-
- All Implemented Interfaces:
sag.elements.Drawable
public class GAsset extends sag.elements.GSVG
AGSVG
that displays an asset from the/assets/
directory- Author:
- Luna Otte
- See Also:
Asset
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GAsset
setAsset(Asset asset)
Swaps the asset with some other oneGAsset
setAsset(Asset asset, java.awt.Color currentColor)
Swaps the asset with some other one.-
Methods inherited from class sag.elements.GElement
amIPicked, executeUpdate, flipHorizontal, flipVertical, getGElement, getParent, getPositionX, getPositionY, getRGBStringFromColor, getRootSAGPanel, getRotation, getScaleX, getScaleY, getSkewX, getSkewY, move, processMouseButtonEvent, processMouseMotionEvent, processMouseWheelEvent, removeCSSAttribute, removeXMLAttribute, rotate, scale, scale, setAttribute, setCSSAttribute, setCSSAttribute, setDisplay, setFill, setFill, setFillOpacity, setMouseEventListener, setOpacity, setParent, setPosition, setRootSAGPanel, setRotation, setScale, setScale, setSkew, setStroke, setStroke, setStroke, setStrokeLinecap, setStrokeLinejoin, setStrokeOpacity, setStrokePattern, setStrokePatternOffset, setStrokeWidth, setXMLAttribute, setXMLAttribute, skew, unsetFill, unsetFillOpacity, unsetOpacity, unsetStroke, unsetStrokeLinecap, unsetStrokeLinejoin, unsetStrokeOpacity, unsetStrokePattern, unsetStrokePatternOffset, unsetStrokeWidth, update, updateTransform
-
-
-
-
Constructor Detail
-
GAsset
public GAsset(Asset asset)
Creates a new GAsset using the providedAsset
- Parameters:
asset
- The asset that should be displayed
-
GAsset
public GAsset(Asset asset, java.awt.Color currentColor)
Creates a new GAsset using the providedAsset
. Also sets its color ifcurrentColor
is used in place of a color anywhere inside the asset.- Parameters:
asset
- The asset that should be displayedcurrentColor
- The color that should be used
-
GAsset
public GAsset()
-
-
Method Detail
-
setAsset
public GAsset setAsset(Asset asset)
Swaps the asset with some other one- Parameters:
asset
- The new asset- Returns:
- This GAsset
-
setAsset
public GAsset setAsset(Asset asset, java.awt.Color currentColor)
Swaps the asset with some other one. Also sets its color ifcurrentColor
is used in place of a color anywhere inside the asset.- Parameters:
asset
- The path to the new assetcurrentColor
- The color that should be used- Returns:
- This GAsset
-
-