Top Fields Constructors Methods
impl.org.controlsfx.worldmap

public Class WorldMapViewSkin

extends SkinBase<WorldMapView>
Class Inheritance
Imports
javafx.beans.Observable, javafx.collections.*, javafx.css.PseudoClass, javafx.event.EventTarget, javafx.geometry.Point2D, javafx.scene.Group, .Node, javafx.scene.control.SkinBase, javafx.scene.input.MouseButton, .MouseEvent, .ScrollEvent, .ZoomEvent, javafx.scene.layout.BorderPane, .Pane, javafx.scene.shape.Rectangle, javafx.util.Callback, org.controlsfx.control.WorldMapView, java.io.IOException, java.util.*

Field Summary

Modifier and TypeField and Description
private Pane
private final Map<WorldMapView.Country, List<? extends String>>
private final ListChangeListener<? super WorldMapView.Country>
private final Map<WorldMapView.Country, List<? extends WorldMapView.CountryView>>
private static final String
private static final String
private double
private double
private Group
protected ObservableMap<WorldMapView.Location, Node>
private final ListChangeListener<? super WorldMapView.Location>
private Group
private final ListChangeListener<? super WorldMapView.Location>
private static double
private static double
private static final double
private static final double
private static final PseudoClass
private final WeakListChangeListener<E>
private final WeakListChangeListener<E>
private final WeakListChangeListener<E>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
private void
private Point2D
protected void
layoutChildren(double contentX, double contentY, double contentWidth, double contentHeight)

Overrides javafx.scene.control.SkinBase.layoutChildren.

Called during the layout pass of the scenegraph.

protected Properties

Returns:

the properties file storing the SVG path data for each country
loadData
()

Loads the properties file that is storing the SVG path information for each country.

private void
Inherited from javafx.scene.control.SkinBase:
computeBaselineOffsetcomputeMaxHeightcomputeMaxWidthcomputeMinHeightcomputeMinWidthcomputePrefHeightcomputePrefWidthconsumeMouseEventsdisposeexecuteAccessibleActiongetChildrengetClassCssMetaDatagetCssMetaDatagetNodegetSkinnablelayoutInArealayoutInArealayoutInAreapositionInAreapositionInAreapseudoClassStateChangedqueryAccessibleAttributeregisterChangeListenerregisterInvalidationListenerregisterListChangeListenersnappedBottomInsetsnappedLeftInsetsnappedRightInsetsnappedTopInsetsnapPositionsnapPositionXsnapPositionYsnapSizesnapSizeXsnapSizeYsnapSpacesnapSpaceXsnapSpaceYunregisterChangeListenersunregisterInvalidationListenersunregisterListChangeListeners

Field Detail

countryPaneback to summary
private Pane countryPane
countryPathMapback to summary
private final Map<WorldMapView.Country, List<? extends String>> countryPathMap
countrySelectionListenerback to summary
private final ListChangeListener<? super WorldMapView.Country> countrySelectionListener
countryViewMapback to summary
private final Map<WorldMapView.Country, List<? extends WorldMapView.CountryView>> countryViewMap
DEFAULT_STYLE_COUNTRYback to summary
private static final String DEFAULT_STYLE_COUNTRY
DEFAULT_STYLE_LOCATIONback to summary
private static final String DEFAULT_STYLE_LOCATION
dragXback to summary
private double dragX
dragYback to summary
private double dragY
groupback to summary
private Group group
locationMapback to summary
protected ObservableMap<WorldMapView.Location, Node> locationMap
locationSelectionListenerback to summary
private final ListChangeListener<? super WorldMapView.Location> locationSelectionListener
locationsGroupback to summary
private Group locationsGroup
locationsListenerback to summary
private final ListChangeListener<? super WorldMapView.Location> locationsListener
MAP_OFFSET_Xback to summary
private static double MAP_OFFSET_X
MAP_OFFSET_Yback to summary
private static double MAP_OFFSET_Y
PREFERRED_HEIGHTback to summary
private static final double PREFERRED_HEIGHT
PREFERRED_WIDTHback to summary
private static final double PREFERRED_WIDTH
SELECTED_PSEUDO_CLASSback to summary
private static final PseudoClass SELECTED_PSEUDO_CLASS
weakCountrySelectionListenerback to summary
private final WeakListChangeListener<E> weakCountrySelectionListener
weakLocationSelectionListenerback to summary
private final WeakListChangeListener<E> weakLocationSelectionListener
weakLocationsListenerback to summary
private final WeakListChangeListener<E> weakLocationsListener

Constructor Detail

WorldMapViewSkinback to summary
public WorldMapViewSkin(WorldMapView view)

Method Detail

addLocationback to summary
private void addLocation(WorldMapView.Location location)
buildViewback to summary
private void buildView()
getLocationCoordinatesback to summary
private Point2D getLocationCoordinates(WorldMapView.Location location)
layoutChildrenback to summary
protected void layoutChildren(double contentX, double contentY, double contentWidth, double contentHeight)

Overrides javafx.scene.control.SkinBase.layoutChildren.

Doc from javafx.scene.control.SkinBase.layoutChildren.

Called during the layout pass of the scenegraph.

Annotations
@Override
loadDataback to summary
protected Properties loadData()

Loads the properties file that is storing the SVG path information for each country. This method can be overriden to provide a different, maybe more detailed, data set. However, the default data set used by ControlsFX has to be small in order to keep the distribution small. The structure of the properties file needs to look like this:

    AE=M619.87,393.72L620.37,393.57L620.48,394.41L622.67,393.93 ....
    AF=M646.88,356.9L649.74,358.2L651.85,357.74L652.44,356.1 ....
    ......
Returns:Properties

the properties file storing the SVG path data for each country

removeLocationback to summary
private void removeLocation(WorldMapView.Location location)