Package ej.mwt.style.outline.border
Class FlexibleRectangularMulticoloredBorder
- java.lang.Object
-
- ej.mwt.style.outline.FlexibleOutline
-
- ej.mwt.style.outline.border.FlexibleRectangularMulticoloredBorder
-
- All Implemented Interfaces:
Outline
public class FlexibleRectangularMulticoloredBorder extends FlexibleOutline
Represents and draw a rectangular border with different thicknesses and colors.Each edge color can be customized.
The thicknesses are stored as a
charfor heap optimization and therefore cannot exceed65535.
-
-
Constructor Summary
Constructors Constructor Description FlexibleRectangularMulticoloredBorder(int top, int colorTop, int right, int colorRight, int bottom, int colorBottom, int left, int colorLeft)Creates a flexible rectangular border specifying its edges thickness and color.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(ej.microui.display.GraphicsContext g, Size size)Applies the outline on a graphics context.booleanequals(java.lang.Object obj)intgetColorBottom()Gets the bottom color.intgetColorLeft()Gets the left color.intgetColorRight()Gets the right color.intgetColorTop()Gets the top color.inthashCode()
-
-
-
Constructor Detail
-
FlexibleRectangularMulticoloredBorder
public FlexibleRectangularMulticoloredBorder(int top, int colorTop, int right, int colorRight, int bottom, int colorBottom, int left, int colorLeft)Creates a flexible rectangular border specifying its edges thickness and color.The given thickness values are clamped between
0andCharacter.MAX_VALUE.- Parameters:
top- the top thickness.colorTop- the top color.right- the right thickness.colorRight- the right color.bottom- the bottom thickness.colorBottom- the bottom color.left- the left thickness.colorLeft- the left color.
-
-
Method Detail
-
getColorTop
public int getColorTop()
Gets the top color.- Returns:
- the top color.
-
getColorBottom
public int getColorBottom()
Gets the bottom color.- Returns:
- the bottom color.
-
getColorLeft
public int getColorLeft()
Gets the left color.- Returns:
- the left color.
-
getColorRight
public int getColorRight()
Gets the right color.- Returns:
- the right color.
-
apply
public void apply(ej.microui.display.GraphicsContext g, Size size)Description copied from interface:OutlineApplies the outline on a graphics context.- Specified by:
applyin interfaceOutline- Overrides:
applyin classFlexibleOutline- Parameters:
g- the graphics context.size- the size to apply on.
-
equals
public boolean equals(@Nullable java.lang.Object obj)- Specified by:
equalsin interfaceOutline- Overrides:
equalsin classFlexibleOutline
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceOutline- Overrides:
hashCodein classFlexibleOutline
-
-