Package net.pl3x.map.core.markers.option
Class Fill
- All Implemented Interfaces:
JsonSerializable
Fill properties of a marker.
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static @NotNull Fill
fromJson
(@NotNull com.google.gson.JsonObject obj) @Nullable Integer
getColor()
Get the fill color of this fill rule.@Nullable Fill.Type
getType()
Get the fill type of this fill rule.int
hashCode()
boolean
Check whether all options are defaults (all are null)@Nullable Boolean
Whether to fill the path with color.@NotNull Fill
Set a new color for this fill rule.@NotNull Fill
setEnabled
(@Nullable Boolean enabled) Set whether to fill the path with color.@NotNull Fill
Set a new fill type for this fill rule.@NotNull com.google.gson.JsonObject
toJson()
Jsonify this object.@NotNull String
toString()
-
Constructor Details
-
Fill
public Fill()Create a fill rule with default options. -
Fill
public Fill(boolean enabled) Create a fill rule. -
Fill
public Fill(int color) Create a fill rule.- Parameters:
color
- argb color
-
-
Method Details
-
isEnabled
Whether to fill the path with color.Defaults to '
true
' if null.- Returns:
- true if fill is enabled
-
setEnabled
Set whether to fill the path with color.Setting to false will disable filling on polygons or circles.
Defaults to '
true
' if null.- Parameters:
enabled
- whether fill is enabled- Returns:
- this fill rule
-
getType
Get the fill type of this fill rule.Defaults to '
' if null.Fill.Type.EVENODD
- Returns:
- fill type
- See Also:
-
setType
Set a new fill type for this fill rule.Defaults to '
' if null.Fill.Type.EVENODD
- Parameters:
type
- new fill type- Returns:
- this fill rule
- See Also:
-
getColor
Get the fill color of this fill rule.Defaults to '
' if null.Stroke.getColor()
- Returns:
- argb color
-
setColor
Set a new color for this fill rule.Defaults to '
' if null.Stroke.getColor()
- Parameters:
color
- new argb color- Returns:
- this fill rule
-
isDefault
public boolean isDefault()Description copied from class:Option
Check whether all options are defaults (all are null) -
toJson
@NotNull public @NotNull com.google.gson.JsonObject toJson()Description copied from interface:JsonSerializable
Jsonify this object.- Returns:
- object as json element
-
fromJson
-
equals
-
hashCode
public int hashCode() -
toString
-