Class ZoomDragMap

java.lang.Object
com.ldtteam.blockui.UiRenderMacros
com.ldtteam.blockui.Pane
com.ldtteam.blockui.views.View
com.minecolonies.core.client.gui.map.ZoomDragMap

public class ZoomDragMap extends com.ldtteam.blockui.views.View
Zoomable and scrollable "online map"-like view, mostly copied from BlockUI's drag view
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
     
    protected int
     
    double
     
    double
     

    Fields inherited from class com.ldtteam.blockui.views.View

    children, padding

    Fields inherited from class com.ldtteam.blockui.Pane

    alignment, cursor, debugging, enabled, focus, height, hoverSource, id, lastClickedPane, mc, onHover, onHoverId, parent, visible, wasCursorInPane, width, window, x, y

    Fields inherited from class com.ldtteam.blockui.UiRenderMacros

    HALF_BIAS
  • Constructor Summary

    Constructors
    Constructor
    Description
    Required default constructor.
    ZoomDragMap(com.ldtteam.blockui.PaneParams params)
    Constructs a View from PaneParams.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addChild(com.ldtteam.blockui.Pane child)
     
    void
    addChildFirst(com.ldtteam.blockui.Pane child)
     
    protected boolean
    childIsVisible(@NotNull com.ldtteam.blockui.Pane child)
     
    protected void
    Compute the height in pixels of the container.
    void
    drawSelf(com.ldtteam.blockui.BOGuiGraphics target, double mx, double my)
     
    void
    drawSelfLast(com.ldtteam.blockui.BOGuiGraphics target, double mx, double my)
     
    double
     
    boolean
    mouseEventProcessor(double mx, double my, com.ldtteam.blockui.MouseEventCallback panePredicate, com.ldtteam.blockui.MouseEventCallback eventCallbackPositive, com.ldtteam.blockui.MouseEventCallback eventCallbackNegative)
     
    boolean
    onMouseDrag(double startX, double startY, int speed, double x, double y)
     
    void
    parseChildren(com.ldtteam.blockui.PaneParams params)
     
    boolean
    scrollInput(double wheel, double mx, double my)
     

    Methods inherited from class com.ldtteam.blockui.views.View

    accumulatePosition, addChild, adjustChild, click, drawHidden, findPaneByID, findPaneByType, findPaneForClick, getAccumulatedPosition, getChildren, getInteriorHeight, getInteriorWidth, mouseClickableEventHandler, mousePointableEventHandler, onUpdate, postAddChild, removeChild, rightClick, setSize, setWindow

    Methods inherited from class com.ldtteam.blockui.Pane

    canHandleClick, clearFocus, disable, draw, drawLast, enable, findFirstPaneByType, findPaneOfTypeByID, getAlignment, getCursor, getFocus, getHeight, getHoverPane, getID, getParent, getWidth, getWindow, getX, getY, handleClick, handleHover, handleRightClick, hide, isClickable, isEnabled, isFocus, isPointInPane, isVisible, moveBy, off, on, onFocus, onFocusLost, onKeyTyped, putInside, scissorsEnd, scissorsStart, setAlignment, setCursor, setEnabled, setFocus, setFocus, setHoverPane, setID, setParentView, setPosition, setVisible, shouldDraw, show, wasCursorInPane

    Methods inherited from class com.ldtteam.blockui.UiRenderMacros

    blit, blit, blit, blit, blitRepeatable, drawEntity, drawLineRect, drawLineRect, drawLineRect, drawLineRectGradient, drawLineRectGradient, drawLineRectGradient, fill, fill, fillGradient, fillGradient, hLine, hLine, line, line, populateBlitTriangles, populateFillGradientTriangles, populateFillTriangles, vLine, vLine

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • scrollX

      public double scrollX
    • scrollY

      public double scrollY
    • contentHeight

      protected int contentHeight
    • contentWidth

      protected int contentWidth
  • Constructor Details

    • ZoomDragMap

      public ZoomDragMap()
      Required default constructor.
    • ZoomDragMap

      public ZoomDragMap(com.ldtteam.blockui.PaneParams params)
      Constructs a View from PaneParams.
      Parameters:
      params - Params for the Pane.
  • Method Details

    • childIsVisible

      protected boolean childIsVisible(@NotNull @NotNull com.ldtteam.blockui.Pane child)
      Overrides:
      childIsVisible in class com.ldtteam.blockui.views.View
    • parseChildren

      public void parseChildren(com.ldtteam.blockui.PaneParams params)
      Overrides:
      parseChildren in class com.ldtteam.blockui.views.View
    • addChild

      public void addChild(com.ldtteam.blockui.Pane child)
      Overrides:
      addChild in class com.ldtteam.blockui.views.View
    • addChildFirst

      public void addChildFirst(com.ldtteam.blockui.Pane child)
    • computeContentSize

      protected void computeContentSize()
      Compute the height in pixels of the container.
    • drawSelf

      public void drawSelf(com.ldtteam.blockui.BOGuiGraphics target, double mx, double my)
      Overrides:
      drawSelf in class com.ldtteam.blockui.views.View
    • drawSelfLast

      public void drawSelfLast(com.ldtteam.blockui.BOGuiGraphics target, double mx, double my)
      Overrides:
      drawSelfLast in class com.ldtteam.blockui.views.View
    • onMouseDrag

      public boolean onMouseDrag(double startX, double startY, int speed, double x, double y)
      Overrides:
      onMouseDrag in class com.ldtteam.blockui.views.View
    • scrollInput

      public boolean scrollInput(double wheel, double mx, double my)
      Overrides:
      scrollInput in class com.ldtteam.blockui.views.View
    • mouseEventProcessor

      public boolean mouseEventProcessor(double mx, double my, com.ldtteam.blockui.MouseEventCallback panePredicate, com.ldtteam.blockui.MouseEventCallback eventCallbackPositive, com.ldtteam.blockui.MouseEventCallback eventCallbackNegative)
      Overrides:
      mouseEventProcessor in class com.ldtteam.blockui.views.View
    • getScale

      public double getScale()