Class PopupDrawInfo

java.lang.Object
com.massifmaps.ui.PopupDrawInfo

public class PopupDrawInfo extends Object
A container class that provides information how to draw the popup.
  • Constructor Details

    • PopupDrawInfo

      public PopupDrawInfo(ScreenPos anchorScreenPos, ScreenBounds screenBounds, Popup popup, float dpToPX)
      Constructs a PopupClickInfo object from a click position and a vector element.
      Parameters:
      anchorScreenPos - The screen position of the anchor point of this popup in pixels.
      screenBounds - The screen bounds for clipping the popup.
      popup - The popup on which the click was performed.
      dpToPX - The value used for converting display independent pixels (dp) to pixels (px).
  • Method Details

    • equals

      public boolean equals(Object obj)
      Checks if this object is equal to the specified object.
      Overrides:
      equals in class Object
      Parameters:
      obj - The reference object.
      Returns:
      True when objects are equal, false otherwise.
    • hashCode

      public int hashCode()
      Returns the hash value of this object.
      Overrides:
      hashCode in class Object
      Returns:
      The hash value of this object.
    • getAnchorScreenPos

      public ScreenPos getAnchorScreenPos()
      Returns the screen position of the anchor point of this popup in pixels.
      Returns:
      The screen position of the anchor point of this popup in pixels.
    • getScreenBounds

      public ScreenBounds getScreenBounds()
      Returns the screen bounds, so that the popup can be clipped if neccessary.
      Returns:
      The screen bounds in pixels.
    • getPopup

      public Popup getPopup()
      Returns the popup to draw.
      Returns:
      The popup to draw.
    • getDPToPX

      public float getDPToPX()
      Returns the value used for converting display independent pixels (dp) to pixels (px).
      Returns:
      The value used for converting display independent pixels (dp) to pixels (px).