Class WLeafletMap.AbstractDrawnItem
- Direct Known Subclasses:
WLeafletMap.Circle,WLeafletMap.Polyline
- Enclosing class:
WLeafletMap
This is the base class for all AbstractMapItems that are drawn on the map. This is an abstract class, so it should not be used directly.
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor.protectedAbstractDrawnItem(WLeafletMap.Coordinate pos, WPen pen) Constructor.protectedAbstractDrawnItem(WLeafletMap.Coordinate pos, WPen pen, WBrush brush) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddStyleOptions(com.google.gson.JsonObject options) Adds the style options to the given JSON object.getBrush()Return the brush used to fill the item.getPen()Return the pen used to draw the outline of the item.voidSet the brush used to fill the item.voidSet the pen used to draw the outline of the item.Methods inherited from class eu.webtoolkit.jwt.WLeafletMap.AbstractMapItem
clicked, createItemJS, doubleClicked, getMap, getPosition, mouseWentDown, mouseWentOut, mouseWentOver, mouseWentUp, move, needsUpdate, setMap, unrender, updateMethods inherited from class eu.webtoolkit.jwt.WObject
getId, getObjectName, remove, resendFormData, setFormData, setObjectName, tr
-
Constructor Details
-
AbstractDrawnItem
Constructor.Creates a new
WLeafletMap.AbstractDrawnItemthat is at the givepos, that is drawn with the givenpenand filled with the givenbrush.Since this is an abstract class, this should not be used directly.
-
AbstractDrawnItem
Constructor. -
AbstractDrawnItem
Constructor.
-
-
Method Details
-
setPen
Set the pen used to draw the outline of the item.This sets the pen used to draw the outline of the item.
By default, the default WPen() is used.
- See Also:
-
getPen
Return the pen used to draw the outline of the item.- See Also:
-
setBrush
Set the brush used to fill the item.This sets the brush used to fill the item.
By default, the default WBrush() is used, which means no fill.
- See Also:
-
getBrush
Return the brush used to fill the item.- See Also:
-
addStyleOptions
protected void addStyleOptions(com.google.gson.JsonObject options) Adds the style options to the given JSON object.This adds the style options (from the pen and brush) to the given JSON object. This should be called on the options that you are adding to the drawn item at creation (in
AbstractMapItem#createItemJS()).
-