Class PerspectiveOrigin
java.lang.Object
com.webfirmframework.wffweb.css.core.AbstractCssProperty<PerspectiveOrigin>
com.webfirmframework.wffweb.css.css3.PerspectiveOrigin
- All Implemented Interfaces:
CssProperty
,Serializable
,Cloneable
perspective-origin: x-axis y-axis|initial|inherit; The perspective-origin property defines where a 3D element is based in the x- and the y-axis. This property allows you to change the bottom position of 3D elements. When defining the perspective-origin property for an element, it is the CHILD elements that are positioned, NOT the element itself. Note: This property must be used together with the perspective property, and only affects 3D transformed elements! To better understand the perspective-origin property, view a demo. Default value: 50% 50% Inherited: no Animatable: yes Version: CSS3 JavaScript syntax: object.style.perspectiveOrigin="10px 50%"
- Since:
- 1.0.0
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionThe0px
will be set as the valuePerspectiveOrigin
(float xyAxis, CssLengthUnit cssLengthUnit) PerspectiveOrigin
(float xAxis, CssLengthUnit xAxisCssLengthUnit, float yAxis, CssLengthUnit yAxisCssLengthUnit) PerspectiveOrigin
(PerspectiveOrigin backgroundSize) PerspectiveOrigin
(String cssValue) -
Method Summary
Modifier and TypeMethodDescriptiongetXAxis()
gets the x-axis value in float value.getYAxis()
gets the y-axis value in float value.static boolean
validates if the given cssValue is valid for this class.void
sets asinherit
void
sets asinitial
setCssValue
(String cssValue) setValue
(float xyAxis, CssLengthUnit cssLengthUnit) setValue
(float xAxis, CssLengthUnit xAxisCssLengthUnit, float yAxis, CssLengthUnit yAxisCssLengthUnit) toString()
Methods inherited from class com.webfirmframework.wffweb.css.core.AbstractCssProperty
clone, getStateChangeInformer, isAlreadyInUse, setAlreadyInUse, setStateChangeInformer, toCssString
-
Field Details
-
INITIAL
- See Also:
-
INHERIT
- See Also:
-
-
Constructor Details
-
PerspectiveOrigin
public PerspectiveOrigin()The0px
will be set as the value -
PerspectiveOrigin
- Parameters:
cssValue
- the css value to set.
-
PerspectiveOrigin
- Parameters:
backgroundSize
- thePerspectiveOrigin
object from which the cssValue to set.And,null
will throwNullValueException
-
PerspectiveOrigin
- Parameters:
xyAxis
- the value to set.cssLengthUnit
- the value unit to set.- Since:
- 1.0.0
-
PerspectiveOrigin
public PerspectiveOrigin(float xAxis, CssLengthUnit xAxisCssLengthUnit, float yAxis, CssLengthUnit yAxisCssLengthUnit) - Parameters:
xAxis
-xAxisCssLengthUnit
-yAxis
-yAxisCssLengthUnit
-- Since:
- 1.0.0
-
-
Method Details
-
setValue
public PerspectiveOrigin setValue(float xAxis, CssLengthUnit xAxisCssLengthUnit, float yAxis, CssLengthUnit yAxisCssLengthUnit) - Parameters:
xAxis
-xAxisCssLengthUnit
-yAxis
-yAxisCssLengthUnit
-- Returns:
- Since:
- 1.0.0
-
setValue
- Parameters:
xyAxis
-cssLengthUnit
-- Returns:
- the current object
- Since:
- 1.0.0
-
getCssName
- Returns:
- the name portion in style, eg
align-content
for stylealign-content: center
.
-
getCssValue
- Returns:
- the value portion in style, eg
center
for stylealign-content: center
.
-
toString
-
getXAxis
gets the x-axis value in float value.PerspectiveOrigin#getXAxisUnit()
should be used to get the cssLengthUnit for this value.- Returns:
- the horizontal value in float or
null
if the value is any inbuilt value likeinherit
. - Since:
- 1.0.0
-
getYAxis
gets the y-axis value in float value.PerspectiveOrigin#getYAxisUnit()
should be used to get the cssLengthUnit for this value.- Returns:
- the vertical value in float or
null
if the value is any inbuilt value likeinherit
. - Since:
- 1.0.0
-
getXAxisUnit
- Returns:
- the cssLengthUnit
PX
/PER
, ornull
if the value is any inbuilt value likeinherit
. - Since:
- 1.0.0
-
getYAxisUnit
- Returns:
- the cssLengthUnit
PX
/PER
, ornull
if the value is any inbuilt value likeinherit
. - Since:
- 1.0.0
-
setCssValue
- Specified by:
setCssValue
in classAbstractCssProperty<PerspectiveOrigin>
- Parameters:
cssValue
- the value should be in the format of55px
or95%
.null
is considered as an invalid value and it will throwNullValueException
.- Returns:
- the current object.
- Since:
- 1.0.0
-
setAsInitial
public void setAsInitial()sets asinitial
- Since:
- 1.0.0
-
setAsInherit
public void setAsInherit()sets asinherit
- Since:
- 1.0.0
-
isValid
validates if the given cssValue is valid for this class.- Parameters:
cssValue
- the value to check.- Returns:
- true if valid and false if invalid.
- Since:
- 1.0.0
-