|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.ctdp.rfdynhud.values.AbstractSize
net.ctdp.rfdynhud.properties.Size
public class Size
Constructor Summary | |
---|---|
protected |
Size(Widget widget,
boolean isGlobalSize,
float width,
boolean widthPercent,
float height,
boolean heightPercent)
|
Method Summary | |
---|---|
void |
bake()
|
boolean |
equalsEffective(int width,
int height)
|
Size |
flipHeightPercentagePx()
|
Size |
flipHeightSign()
|
Size |
flipWidthPercentagePx()
|
Size |
flipWidthSign()
|
int |
getEffectiveHeight()
Gets the effective Widget's height. |
int |
getEffectiveWidth()
Gets the effective Widget's width. |
PosSizeProperty |
getHeightProperty(java.lang.String name)
|
PosSizeProperty |
getHeightProperty(java.lang.String name,
java.lang.String nameForDisplay)
|
PosSizeProperty |
getWidthProperty(java.lang.String name)
|
PosSizeProperty |
getWidthProperty(java.lang.String name,
java.lang.String nameForDisplay)
|
boolean |
isBaked()
|
boolean |
isGlobalSize()
|
boolean |
isNegativeHeight()
|
boolean |
isNegativeWidth()
|
static Size |
newGlobalSize(Widget widget,
float width,
boolean widthPercent,
float height,
boolean heightPercent)
Create a new size property for global positions on the whole screen area. |
static Size |
newLocalSize(Widget widget,
float width,
boolean widthPercent,
float height,
boolean heightPercent)
Create a new size property for sizes local to a Widget's area. |
protected void |
onHeightPropertySet(float height)
|
protected void |
onWidthPropertySet(float width)
|
static float |
parseValue(java.lang.String value,
boolean defaultPerc)
|
boolean |
setEffectiveSize(int width,
int height)
Sets this Widget 's size in absolute pixel coordinates. |
Size |
setHeightToPercents()
|
Size |
setHeightToPixels()
|
void |
setTo(Size size)
Sets the Size to the values of the given Size . |
Size |
setWidthToPercents()
|
Size |
setWidthToPixels()
|
void |
unbake()
|
static java.lang.String |
unparseValue(float value)
|
Methods inherited from class net.ctdp.rfdynhud.values.AbstractSize |
---|
getAspect |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Size(Widget widget, boolean isGlobalSize, float width, boolean widthPercent, float height, boolean heightPercent)
Method Detail |
---|
public final boolean isGlobalSize()
public final boolean isNegativeWidth()
public final boolean isNegativeHeight()
public void setTo(Size size)
Size
to the values of the given Size
.
size
- public final boolean setEffectiveSize(int width, int height)
Widget
's size in absolute pixel coordinates. (only works for non-fixed-sized Widget
s)
width
- the new absolute pixel widthheight
- the new absolute pixel height
public final int getEffectiveWidth()
getWidth()
returns a
negative number, the effective width is (screen_width - width).
getEffectiveWidth
in class AbstractSize
public final int getEffectiveHeight()
getHeight()
returns a
negative number, the effective height is (screen_height - height).
getEffectiveHeight
in class AbstractSize
public final boolean equalsEffective(int width, int height)
public void unbake()
public void bake()
public boolean isBaked()
public Size setWidthToPercents()
public Size setWidthToPixels()
public Size flipWidthPercentagePx()
public Size setHeightToPercents()
public Size setHeightToPixels()
public Size flipHeightPercentagePx()
public Size flipWidthSign()
public Size flipHeightSign()
public static float parseValue(java.lang.String value, boolean defaultPerc)
public static java.lang.String unparseValue(float value)
protected void onWidthPropertySet(float width)
width
- the new widthpublic PosSizeProperty getWidthProperty(java.lang.String name, java.lang.String nameForDisplay)
public PosSizeProperty getWidthProperty(java.lang.String name)
protected void onHeightPropertySet(float height)
height
- the new heightpublic PosSizeProperty getHeightProperty(java.lang.String name, java.lang.String nameForDisplay)
public PosSizeProperty getHeightProperty(java.lang.String name)
public static final Size newLocalSize(Widget widget, float width, boolean widthPercent, float height, boolean heightPercent)
widget
- the owning Widget
.width
- the new width valuewidthPercent
- interpret 'width' as percents?height
- the new height valueheightPercent
- interpret 'height' as percents?
public static final Size newGlobalSize(Widget widget, float width, boolean widthPercent, float height, boolean heightPercent)
widget
- the owning Widget
.width
- the new width valuewidthPercent
- interpret 'width' as percents?height
- the new height valueheightPercent
- interpret 'height' as percents?
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |