Class BaseContainerChild
- java.lang.Object
-
- be.yildizgames.common.util.BaseRegisterable
-
- be.yildizgames.module.graphic.gui.internal.BaseElement
-
- be.yildizgames.module.graphic.gui.internal.BaseWidget
-
- be.yildizgames.module.graphic.gui.BaseContainerChild
-
- All Implemented Interfaces:
be.yildizgames.common.util.Registerable,ContainerChild,Element,Widget
- Direct Known Subclasses:
TabContainer
public abstract class BaseContainerChild extends BaseWidget implements ContainerChild
Contains common method for all container children.- Author:
- Grégory Van Den Borre
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface be.yildizgames.module.graphic.gui.internal.Element
Element.Alignment
-
-
Field Summary
-
Fields inherited from class be.yildizgames.module.graphic.gui.internal.BaseWidget
emptyZones
-
Fields inherited from class be.yildizgames.module.graphic.gui.internal.BaseElement
MAX_OPACITY, virtualHeight
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBaseContainerChild(String name, be.yildizgames.module.coordinate.BaseCoordinate coordinates, Container container)Full constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddEmptyZoneImpl(be.yildizgames.common.geometry.Rectangle zone)voiddetachFromParent()Remove this widget from its parent.ContainergetParent()booleanisContainer()ContainerChildsetLeftFromParent(PositionRelativeLeft relative)Set the left position relative to the parent position.ContainerChildsetLeftFromParent(PositionRelativeLeft relative, int diff)Set the left position relative to the parent position with a difference.ContainerChildsetStatic()Optimization to avoid to check this element when receiving events.ContainerChildsetTopFromParent(PositionRelativeTop relative)Set the top position relative to the parent position.ContainerChildsetTopFromParent(PositionRelativeTop relative, int diff)Set the top position relative to the parent position with a difference.voidsetUnaffectedByZoom()If the view containing this widget is zoomed, the widget will not be affected.voidupdateSizeAfterZoom(float factor)Zoom in the container does not update this object size, to keep it coherent, it is updated in this method.-
Methods inherited from class be.yildizgames.module.graphic.gui.internal.BaseWidget
addEmptyZone, addKeyboardListener, addMouseDoubleLeftClickListener, addMouseDragListener, addMouseLeftClickListener, addMouseMoveListener, addMouseReleaseListener, addMouseRightClickListener, addMouseWheelListener, addOnMouseOverListener, align, contains, contains, disableEmptyZone, enableEmptyZone, findParent, focus, forceContainsFalse, getAbsoluteLeft, getAbsolutePosition, getAbsoluteTop, highlight, highlightImpl, isFocusable, isMouseOver, keyPressed, mouseLeftClick, playAnimation, registerAnimation, removeAllClickListeners, setFocusable, setHighlightable, setMouseClickActive, setMouseOver, specialKeyPressed, stopAnimation, toString
-
Methods inherited from class be.yildizgames.module.graphic.gui.internal.BaseElement
addToLeft, addToPosition, addToTop, delete, getBottom, getCoordinates, getHeight, getLeft, getOpacity, getRight, getTop, getWidth, hide, hideImpl, isVisible, multiplySize, resetVirtualHeight, setCoordinates, setHeight, setLeft, setLeft, setLeft, setLeft, setPosition, setPosition, setPositionImpl, setSize, setSize, setSizeImpl, setTop, setTop, setTop, setTop, setVirtualHeight, setVisible, setWidth, show, showImpl, updateAddPositionValue
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface be.yildizgames.module.graphic.gui.ContainerChild
updateAddPositionValue
-
Methods inherited from interface be.yildizgames.module.graphic.gui.internal.Element
addToLeft, addToPosition, addToTop, getBottom, getCoordinates, getHeight, getLeft, getRight, getTop, getWidth, hide, isVisible, resetVirtualHeight, setCoordinates, setHeight, setLeft, setLeft, setLeft, setLeft, setPosition, setPosition, setSize, setSize, setTop, setTop, setTop, setTop, setVirtualHeight, setVisible, setWidth, show
-
Methods inherited from interface be.yildizgames.module.graphic.gui.Widget
addEmptyZone, addKeyboardListener, addMouseDoubleLeftClickListener, addMouseDragListener, addMouseLeftClickListener, addMouseMoveListener, addMouseReleaseListener, addMouseRightClickListener, addMouseWheelListener, addOnMouseOverListener, align, contains, contains, focus, getAbsoluteLeft, getAbsoluteTop, highlight, isFocusable, playAnimation, registerAnimation, removeAllClickListeners, stopAnimation
-
-
-
-
Method Detail
-
getParent
public final Container getParent()
- Specified by:
getParentin interfaceContainerChild
-
detachFromParent
public final void detachFromParent()
Description copied from interface:ContainerChildRemove this widget from its parent.- Specified by:
detachFromParentin interfaceContainerChild
-
addEmptyZoneImpl
protected final void addEmptyZoneImpl(be.yildizgames.common.geometry.Rectangle zone)
- Specified by:
addEmptyZoneImplin classBaseWidget
-
setUnaffectedByZoom
public final void setUnaffectedByZoom()
If the view containing this widget is zoomed, the widget will not be affected.
-
updateSizeAfterZoom
public final void updateSizeAfterZoom(float factor)
Zoom in the container does not update this object size, to keep it coherent, it is updated in this method.- Specified by:
updateSizeAfterZoomin interfaceContainerChild- Parameters:
factor- Zoom factor.
-
setStatic
public final ContainerChild setStatic()
Optimization to avoid to check this element when receiving events.- Returns:
- this.
-
setLeftFromParent
public final ContainerChild setLeftFromParent(PositionRelativeLeft relative)
Description copied from interface:ContainerChildSet the left position relative to the parent position.- Specified by:
setLeftFromParentin interfaceContainerChild- Parameters:
relative- Position to set.- Returns:
- This element for chaining methods.
-
setLeftFromParent
public final ContainerChild setLeftFromParent(PositionRelativeLeft relative, int diff)
Description copied from interface:ContainerChildSet the left position relative to the parent position with a difference.- Specified by:
setLeftFromParentin interfaceContainerChild- Parameters:
relative- Position to set.diff- Difference to set.- Returns:
- This element for chaining methods.
-
setTopFromParent
public final ContainerChild setTopFromParent(PositionRelativeTop relative)
Description copied from interface:ContainerChildSet the top position relative to the parent position.- Specified by:
setTopFromParentin interfaceContainerChild- Parameters:
relative- Position to set.- Returns:
- This element for chaining methods.
-
setTopFromParent
public final ContainerChild setTopFromParent(PositionRelativeTop relative, int diff)
Description copied from interface:ContainerChildSet the top position relative to the parent position with a difference.- Specified by:
setTopFromParentin interfaceContainerChild- Parameters:
relative- Position to set.diff- Difference to set.- Returns:
- This element for chaining methods.
-
isContainer
public final boolean isContainer()
- Overrides:
isContainerin classBaseWidget
-
-