com.dopanic.panicarkit.lib
Class PARPoiLabel

java.lang.Object
  extended by com.dopanic.panicarkit.lib.PARPoi
      extended by com.dopanic.panicarkit.lib.PARPoiLabel
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
PARPoiLabelAdvanced

public class PARPoiLabel
extends PARPoi

Created by azeitler on 18.02.14.

See Also:
Serialized Form

Field Summary
protected  java.lang.String _description
           
protected  java.lang.String _distance
           
protected  int _iconImageViewResource
           
protected  float _lastUpdateAtDistance
           
protected  java.lang.String _title
           
protected  TextView altitudeTextView
           
protected static Point defaultSize
           
protected  TextView descriptionTextView
           
protected  TextView distanceTextView
           
protected static java.text.DecimalFormat FORMATTER_DISTANCE_LARGE
           
protected static java.text.DecimalFormat FORMATTER_DISTANCE_LARGEST
           
protected static java.text.DecimalFormat FORMATTER_DISTANCE_SMALL
           
protected  boolean hasCreatedView
           
protected  ImageView iconImageView
           
protected  boolean isAltitudeEnabled
           
protected  float LARGE_DISTANCE_INTERVAL
           
protected  int layoutId
          Resource id for POI's layout
protected  Point offset
           
protected  Point size
           
protected  float SMALL_DISTANCE_INTERVAL
           
protected  TextView titleTextView
           
 
Fields inherited from class com.dopanic.panicarkit.lib.PARPoi
_backgroundImageResource, _labelView, addedToRadar, addedToView, ctx, distanceToUser, halfSizeOfView, isClippedByDistance, isClippedByViewport, isDebug, isHidden, location, observed, radarParentView, radarResourceId, radarView
 
Constructor Summary
PARPoiLabel(Location location, java.lang.String title, int layoutId, int radarResourceId)
           
PARPoiLabel(Location location, java.lang.String title, java.lang.String description, int layoutId, int radarResourceId)
          Constructor
 
Method Summary
 void createView()
          Create poi label view
static Point getDefaultSize()
           
 java.lang.String getDescription()
           
 int getIconImageViewResource()
           
 boolean getIsAltitudeEnabled()
          Getter for altitude on/off setting
 Point getOffset()
          Get Label offset
 View.OnClickListener getOnClickListener()
           
 Point getSize()
           
 java.lang.String getTitle()
           
static void setDefaultSize(Point defaultSize)
           
 void setDescription(java.lang.String description)
           
 void setIconImageViewResource(int iconImageViewResource)
           
 void setIsAltitudeEnabled(boolean isAltitudeEnabled)
          Set altitude enabled on/off
 void setOffset(Point leftTop)
          Set label offset (do this where you create your pois)
 void setOnClickListener(View.OnClickListener onClickListener)
           
 void setSize(int w, int h)
           
 void setSize(Point size)
           
 void setTitle(java.lang.String title)
           
 void updateContent()
           
 
Methods inherited from class com.dopanic.panicarkit.lib.PARPoi
getBackgroundImageResource, getLocation, getRadarView, getRelativeScreenPosition, getView, isAddedToRadar, isClippedByDistance, isClippedByViewport, isHadLocationUpdate, isHidden, isInView, isObserved, onAddedToARController, onRemovedFromARController, renderInRadar, renderInView, setBackgroundImageResource, setDeviceGravity, setLocation, setObserved, setViewRotation, updateLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORMATTER_DISTANCE_LARGEST

protected static final java.text.DecimalFormat FORMATTER_DISTANCE_LARGEST

FORMATTER_DISTANCE_LARGE

protected static final java.text.DecimalFormat FORMATTER_DISTANCE_LARGE

FORMATTER_DISTANCE_SMALL

protected static final java.text.DecimalFormat FORMATTER_DISTANCE_SMALL

SMALL_DISTANCE_INTERVAL

protected final float SMALL_DISTANCE_INTERVAL
See Also:
Constant Field Values

LARGE_DISTANCE_INTERVAL

protected final float LARGE_DISTANCE_INTERVAL
See Also:
Constant Field Values

defaultSize

protected static Point defaultSize

size

protected Point size

hasCreatedView

protected boolean hasCreatedView

layoutId

protected int layoutId
Resource id for POI's layout


_title

protected java.lang.String _title

_description

protected java.lang.String _description

_distance

protected java.lang.String _distance

_iconImageViewResource

protected int _iconImageViewResource

distanceTextView

protected TextView distanceTextView

altitudeTextView

protected TextView altitudeTextView

titleTextView

protected TextView titleTextView

descriptionTextView

protected TextView descriptionTextView

iconImageView

protected ImageView iconImageView

_lastUpdateAtDistance

protected float _lastUpdateAtDistance

isAltitudeEnabled

protected boolean isAltitudeEnabled

offset

protected Point offset
Constructor Detail

PARPoiLabel

public PARPoiLabel(Location location,
                   java.lang.String title,
                   int layoutId,
                   int radarResourceId)

PARPoiLabel

public PARPoiLabel(Location location,
                   java.lang.String title,
                   java.lang.String description,
                   int layoutId,
                   int radarResourceId)
Constructor

Parameters:
location - Poi location
title - Poi title
description - Poi description
Method Detail

getDefaultSize

public static Point getDefaultSize()

setDefaultSize

public static void setDefaultSize(Point defaultSize)

getTitle

public java.lang.String getTitle()

setTitle

public void setTitle(java.lang.String title)

getDescription

public java.lang.String getDescription()

setDescription

public void setDescription(java.lang.String description)

getIconImageViewResource

public int getIconImageViewResource()

setIconImageViewResource

public void setIconImageViewResource(int iconImageViewResource)

getIsAltitudeEnabled

public boolean getIsAltitudeEnabled()
Getter for altitude on/off setting

Returns:
true if altitude is enabled, false otherwise

setIsAltitudeEnabled

public void setIsAltitudeEnabled(boolean isAltitudeEnabled)
Set altitude enabled on/off

Parameters:
isAltitudeEnabled - True for altitude enabled, false for off

getOffset

public Point getOffset()
Get Label offset

Overrides:
getOffset in class PARPoi
Returns:
Label offset with left and top ints

setOffset

public void setOffset(Point leftTop)
Set label offset (do this where you create your pois)

Parameters:
leftTop - Offset left top coordinates

createView

public void createView()
Create poi label view

Overrides:
createView in class PARPoi

updateContent

public void updateContent()
Overrides:
updateContent in class PARPoi

getSize

public Point getSize()

setSize

public void setSize(Point size)

setSize

public void setSize(int w,
                    int h)

getOnClickListener

public View.OnClickListener getOnClickListener()

setOnClickListener

public void setOnClickListener(View.OnClickListener onClickListener)



Copyright © 2014 doPanic GmbH. All rights reserved.