public class MapMarker extends Object implements IContentData<MapMarkerProp>
Markers can be placed on a map by means of either API directory against the map component or in the VirtualSpace by means of connections to the map.
A marker that is enabled and not read-only can be dragged on a map if the markers settings allows draggable markers.
Modifier | Constructor and Description |
---|---|
|
MapMarker()
Constructor for API.
|
protected |
MapMarker(VSRow row)
Constructor for VS-connected content provider.
|
Modifier and Type | Method and Description |
---|---|
void |
addMappings(VSMappings mappings,
String uiRef,
MapMarkerProp item)
Adds the mappings of a VirtualSpace to the panel components.
|
MapMarkerProp |
getItemProp()
Returns the property that was used to update this data content.
|
char |
getLabel()
Gets the marker label character.
|
PlainKString |
getLabelChar()
Gets the marker label character text.
|
double |
getLatitude()
Gets the latitude of the marker.
|
double |
getLongitude()
Gets the longitude of the marker.
|
MapMarkers |
getMarkers()
Gets the map markers container.
|
PlainKString |
getTooltipText()
Gets the marker tooltip text.
|
VSRow |
getVSRow()
Gets the associated VSRow for this item.
|
void |
initialize(MapMarkerProp item)
Initializes the item property from the content data.
|
boolean |
isEnabled()
Gets the enabled state.
|
boolean |
isReadOnly()
Gets the read-only state.
|
boolean |
isSelected()
Gets the selection state of the item.
|
boolean |
isVisible()
Gets the visibility state.
|
void |
refreshFromVS(int[] columns)
Refreshes contents from VirtualSpace.
|
boolean |
setEnabled(boolean newState)
Sets the enabled state.
|
boolean |
setLabel(char ch)
Sets the marker label character.
|
boolean |
setLabelChar(PlainKString text)
Sets the marker label character.
|
boolean |
setLatitude(double latitude)
Sets the latitude of the marker.
|
boolean |
setLongitude(double longitude)
Sets the longitude of the marker.
|
boolean |
setReadOnly(boolean newState)
Sets the read-only state.
|
String |
setSelection(boolean on)
Sets the selection state of an item.
|
String |
setSelectionInternal(boolean on)
Internal method to sets the selection state of an item.
|
boolean |
setTooltipText(PlainKString text)
Sets the marker tooltip text.
|
boolean |
setVisible(boolean newState)
Sets the visibility state.
|
void |
toggleSelection()
Toggle the selected state of the map marker.
|
String |
toString()
Returns a String representation of the marker.
|
public MapMarker()
protected MapMarker(VSRow row)
public void refreshFromVS(int[] columns)
refreshFromVS
in interface IContentData<MapMarkerProp>
columns
- The connected table columns.public VSRow getVSRow()
getVSRow
in interface IContentData<MapMarkerProp>
public MapMarkerProp getItemProp()
getItemProp
in interface IContentData<MapMarkerProp>
public MapMarkers getMarkers()
public void initialize(MapMarkerProp item)
initialize
in interface IContentData<MapMarkerProp>
item
- The item.public String toString()
public PlainKString getTooltipText()
public boolean setTooltipText(PlainKString text)
text
- The text, or null for none.public char getLabel()
public PlainKString getLabelChar()
public boolean setLabel(char ch)
ch
- The character, or '\0' for none.public boolean setLabelChar(PlainKString text)
text
- The text, or null for none. Only the first character is used.public double getLatitude()
public boolean setLatitude(double latitude)
For reference, the Equator has a latitude of 0°, the North pole has a latitude of 90° north (written 90° N or +90°), and the South pole has a latitude of -90°. Prime Meridian has a longitude of 0° that goes through Greenwich, England.
latitude
- The latitude.IllegalArgumentException
- If the latitude is not -90 to 90 degrees.public double getLongitude()
public boolean setLongitude(double longitude)
Longitude is in the range -180 and +180 specifying the east-west position. For reference, the Equator has a latitude of 0°, the North pole has a latitude of 90° north (written 90° N or +90°), and the South pole has a latitude of -90°. Prime Meridian has a longitude of 0° that goes through Greenwich, England.
longitude
- The longitude.IllegalArgumentException
- If the longitude is not -180 to 180 degrees.public boolean isVisible()
This is the items individual state and does not take parent states into account.
public boolean isEnabled()
This is the items individual state and does not take parent states into account.
public boolean isReadOnly()
This is the items individual state and does not take parent states into account.
public boolean isSelected()
isSelected
in interface IContentData<MapMarkerProp>
public boolean setVisible(boolean newState)
This is the items individual state and does not take parent states into account.
newState
- the new state: true for visible, false for hidden.public boolean setEnabled(boolean newState)
This is the items individual state and does not take parent states into account.
newState
- The new state: true for enabled, false for disabled.public boolean setReadOnly(boolean newState)
This is the items individual state and does not take parent states into account.
newState
- The new state: true for read-only, false otherwise.public String setSelection(boolean on)
setSelection
in interface IContentData<MapMarkerProp>
on
- The new selection state.public String setSelectionInternal(boolean on)
setSelectionInternal
in interface IContentData<MapMarkerProp>
on
- The new selection state.public void toggleSelection()
public void addMappings(VSMappings mappings, String uiRef, MapMarkerProp item)
The default is to find the relative references to VS and add those references. Override to provide other functionality.
addMappings
in interface IContentData<MapMarkerProp>
mappings
- The mappings instance to fill in.uiRef
- The reference.item
- The item property.iizi® is a registered trademark of Mindus SARL. © Copyright 2019 Mindus SARL. All rights reserved.