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
FieldsModifier and TypeFieldDescriptionprotected intprotected intdoubledoubleFields inherited from class com.ldtteam.blockui.views.View
children, paddingFields 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, yFields inherited from class com.ldtteam.blockui.UiRenderMacros
HALF_BIAS -
Constructor Summary
ConstructorsConstructorDescriptionRequired default constructor.ZoomDragMap(com.ldtteam.blockui.PaneParams params) Constructs a View from PaneParams. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(com.ldtteam.blockui.Pane child) voidaddChildFirst(com.ldtteam.blockui.Pane child) protected booleanchildIsVisible(@NotNull com.ldtteam.blockui.Pane child) protected voidCompute the height in pixels of the container.voiddrawSelf(com.ldtteam.blockui.BOGuiGraphics target, double mx, double my) voiddrawSelfLast(com.ldtteam.blockui.BOGuiGraphics target, double mx, double my) doublegetScale()booleanmouseEventProcessor(double mx, double my, com.ldtteam.blockui.MouseEventCallback panePredicate, com.ldtteam.blockui.MouseEventCallback eventCallbackPositive, com.ldtteam.blockui.MouseEventCallback eventCallbackNegative) booleanonMouseDrag(double startX, double startY, int speed, double x, double y) voidparseChildren(com.ldtteam.blockui.PaneParams params) booleanscrollInput(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, setWindowMethods 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, wasCursorInPaneMethods 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
-
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:
childIsVisiblein classcom.ldtteam.blockui.views.View
-
parseChildren
public void parseChildren(com.ldtteam.blockui.PaneParams params) - Overrides:
parseChildrenin classcom.ldtteam.blockui.views.View
-
addChild
public void addChild(com.ldtteam.blockui.Pane child) - Overrides:
addChildin classcom.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:
drawSelfin classcom.ldtteam.blockui.views.View
-
drawSelfLast
public void drawSelfLast(com.ldtteam.blockui.BOGuiGraphics target, double mx, double my) - Overrides:
drawSelfLastin classcom.ldtteam.blockui.views.View
-
onMouseDrag
public boolean onMouseDrag(double startX, double startY, int speed, double x, double y) - Overrides:
onMouseDragin classcom.ldtteam.blockui.views.View
-
scrollInput
public boolean scrollInput(double wheel, double mx, double my) - Overrides:
scrollInputin classcom.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:
mouseEventProcessorin classcom.ldtteam.blockui.views.View
-
getScale
public double getScale()
-