public class GeoVizComponent
extends com.codename1.ui.Component
BASELINE, BOTTOM, BRB_CENTER_OFFSET, BRB_CONSTANT_ASCENT, BRB_CONSTANT_DESCENT, BRB_OTHER, CENTER, DRAG_REGION_LIKELY_DRAG_X, DRAG_REGION_LIKELY_DRAG_XY, DRAG_REGION_LIKELY_DRAG_Y, DRAG_REGION_NOT_DRAGGABLE, DRAG_REGION_POSSIBLE_DRAG_X, DRAG_REGION_POSSIBLE_DRAG_XY, DRAG_REGION_POSSIBLE_DRAG_Y, LEFT, RIGHT, TOP
Constructor and Description |
---|
GeoVizComponent(FeatureCollection collection)
Creates a component to display the provided feature collection.
|
Modifier and Type | Method and Description |
---|---|
void |
animateViewport(int duration) |
protected com.codename1.ui.geom.Dimension |
calcPreferredSize()
Calculates the preferred size based on component content.
|
void |
featurePressed(Feature f,
com.codename1.maps.Coord coord)
Called when a feature is pressed.
|
com.codename1.maps.Coord |
getCenter() |
FeaturePainter |
getFeaturePainter() |
com.codename1.maps.Projection |
getProjection()
Gets the current projection for this component.
|
double |
getScale() |
void |
paint(com.codename1.ui.Graphics g)
This method paints the Component on the screen, it should be overriden
by subclasses to perform custom drawing or invoke the UI API's to let
the PLAF perform the rendering.
|
void |
pointerDragged(int[] x,
int[] y)
If this Component is focused, the pointer dragged event
will call this method
|
void |
pointerReleased(int x,
int y)
If this Component is focused, the pointer released event
will call this method
|
void |
setCenter(com.codename1.maps.Coord center) |
void |
setFeaturePainter(FeaturePainter featurePainter) |
void |
setProjection(com.codename1.maps.Projection projection) |
void |
setScale(double scale) |
void |
updateViewport() |
addDragOverListener, addDropListener, addFocusListener, addPointerDraggedListener, addPointerPressedListener, addPointerReleasedListener, addPullToRefresh, addScrollListener, animate, bindProperty, calcScrollSize, cancelRepaints, clearClientProperties, contains, deinitialize, deinitializeCustomStyle, dragEnter, dragExit, draggingOver, dragInitiated, drawDraggedImage, drop, fireClicked, focusGained, focusLost, getAbsoluteX, getAbsoluteY, getBaseline, getBaselineResizeBehavior, getBindablePropertyNames, getBindablePropertyTypes, getBorder, getBottomGap, getBoundPropertyValue, getBounds, getClientProperty, getCloudBoundProperty, getCloudDestinationProperty, getComponentForm, getComponentState, getDirtyRegion, getDisabledStyle, getDraggedx, getDraggedy, getDragImage, getDragRegionStatus, getDragSpeed, getGridPosX, getGridPosY, getHeight, getLabelForComponent, getName, getNextFocusDown, getNextFocusLeft, getNextFocusRight, getNextFocusUp, getParent, getPreferredH, getPreferredSize, getPreferredW, getPressedStyle, getPropertyNames, getPropertyTypeNames, getPropertyTypes, getPropertyValue, getSameHeight, getSameWidth, getScrollable, getScrollAnimationSpeed, getScrollDimension, getScrollOpacity, getScrollOpacityChangeSpeed, getScrollX, getScrollY, getSelectCommandText, getSelectedRect, getSelectedStyle, getSideGap, getStyle, getTensileLength, getUIID, getUIManager, getUnselectedStyle, getVisibleBounds, getWidth, getX, getY, growShrink, handlesInput, hasFocus, initComponent, initCustomStyle, initLaf, installDefaultPainter, isAlwaysTensile, isCellRenderer, isDragActivated, isDragAndDropOperation, isDraggable, isDragRegion, isDropTarget, isEnabled, isFlatten, isFocusable, isGrabsPointerEvents, isHideInPortrait, isInClippingRegion, isInitialized, isRTL, isScrollable, isScrollableX, isScrollableY, isScrollVisible, isSelectableInteraction, isSmoothScrolling, isSnapToGrid, isStickyDrag, isTactileTouch, isTactileTouch, isTensileDragEnabled, isVisible, keyPressed, keyReleased, keyRepeated, laidOut, longKeyPress, longPointerPress, onScrollX, onScrollY, paintBackground, paintBackgrounds, paintBorder, paintComponent, paintComponent, paintLock, paintLockRelease, paintScrollbars, paintScrollbarX, paintScrollbarY, paramString, pinch, pointerDragged, pointerHover, pointerHoverPressed, pointerHoverReleased, pointerPressed, pointerPressed, pointerReleased, putClientProperty, refreshTheme, refreshTheme, refreshTheme, removeDragOverListener, removeDropListener, removeFocusListener, removePointerDraggedListener, removePointerPressedListener, removePointerReleasedListener, removeScrollListener, repaint, repaint, requestFocus, resetFocusable, scrollRectToVisible, scrollRectToVisible, setAlwaysTensile, setBoundPropertyValue, setCellRenderer, setCloudBoundProperty, setCloudDestinationProperty, setComponentState, setDirtyRegion, setDisabledStyle, setDraggable, setDropTarget, setEnabled, setFlatten, setFocus, setFocusable, setGrabsPointerEvents, setHandlesInput, setHeight, setHideInPortrait, setInitialized, setIsScrollVisible, setLabelForComponent, setName, setNextFocusDown, setNextFocusLeft, setNextFocusRight, setNextFocusUp, setPreferredH, setPreferredSize, setPreferredW, setPressedStyle, setPropertyValue, setRTL, setSameHeight, setSameWidth, setScrollAnimationSpeed, setScrollOpacityChangeSpeed, setScrollSize, setScrollVisible, setScrollX, setScrollY, setSelectCommandText, setSelectedStyle, setShouldCalcPreferredSize, setSize, setSmoothScrolling, setSnapToGrid, setTactileTouch, setTensileDragEnabled, setTensileLength, setUIID, setUnselectedStyle, setVisible, setWidth, setX, setY, shouldBlockSideSwipe, styleChanged, toString, unbindProperty
public GeoVizComponent(FeatureCollection collection)
collection
- public void paint(com.codename1.ui.Graphics g)
com.codename1.ui.Component
paint
in interface com.codename1.ui.animations.Animation
paint
in class com.codename1.ui.Component
g
- the component graphicspublic void pointerDragged(int[] x, int[] y)
com.codename1.ui.Component
pointerDragged
in class com.codename1.ui.Component
x
- the pointer x coordinatey
- the pointer y coordinatepublic void pointerReleased(int x, int y)
com.codename1.ui.Component
pointerReleased
in class com.codename1.ui.Component
x
- the pointer x coordinatey
- the pointer y coordinatepublic void featurePressed(Feature f, com.codename1.maps.Coord coord)
f
- coord
- public FeaturePainter getFeaturePainter()
public void setFeaturePainter(FeaturePainter featurePainter)
featurePainter
- the featurePainter to setpublic com.codename1.maps.Projection getProjection()
public void setProjection(com.codename1.maps.Projection projection)
projection
- the projection to setpublic void updateViewport()
public void setCenter(com.codename1.maps.Coord center)
public com.codename1.maps.Coord getCenter()
public void setScale(double scale)
public double getScale()
protected com.codename1.ui.geom.Dimension calcPreferredSize()
com.codename1.ui.Component
calcPreferredSize
in class com.codename1.ui.Component
public void animateViewport(int duration)