Linear Layout
A LinearLayout may be used to visualize a zone containing GameComponentViews.
GameComponentViews inside the container get placed according to the specified Orientation and Alignment. A spacing between components may be specified which may also be negative e.g. components like playing cards should overlap.
Visualization:
The Visual is used to visualize a background.
If all components are still within bounds with the user defined spacing, the user defined spacing gets used to space the components. Otherwise, the biggest possible spacing is used so that all components are still withing bounds of the LinearLayout.
Parameters
Generic GameComponentView.
horizontal coordinate for this LinearLayout. Default: 0.
vertical coordinate for this LinearLayout. Default: 0.
width for this LinearLayout. Default: DEFAULT_LINEAR_LAYOUT_WIDTH.
height for this LinearLayout. Default: DEFAULT_LINEAR_LAYOUT_HEIGHT.
spacing between contained GameComponentViews. Default: DEFAULT_LINEAR_LAYOUT_SPACING.
Visual to be used for this LinearLayout.
orientation for this LinearLayout. Default: Orientation.HORIZONTAL.
specifies how the contained GameComponentViews should be aligned. Default: Alignment.TOP_LEFT.
Constructors
Secondary constructor taking separate alignment components.
Creates a LinearLayout.
Functions
Adds a GameComponentView to this GameComponentContainer.
Adds all GameComponentViews passed as varargs to this GameComponentContainer.
Adds all GameComponentViews contained in collection to this GameComponentContainer.
Adds a ValueObserver on the observableComponents list.
Removes all GameComponentViews from this GameComponentContainer.
Removes all listeners from the observableComponents list.
Returns whether the components list is empty.
Returns whether the components list is not empty.
Returns an iterator over the elements of this GameComponentContainer.
Returns the size of the components list.
Adds an offset to this ComponentView's Position.
Removes the GameComponentView specified by the parameter from this GameComponentContainer.
Removes all GameComponentViews matching the predicate from this GameComponentContainer.
Removes all GameComponentViews contained in collection from this GameComponentContainer.
Removes a listener from the observableComponents list.
Removes this component from its parent.
Repositions this ComponentView to the specified coordinates.
Rotates this ComponentView by the given number of degrees.
Scales this ComponentView by the given scalar.
Scales this ComponentView's width by the given scalar.
Scales this ComponentView's height by the given scalar.
Puts the ComponentView to the back inside its parent and Changes its zIndex accordingly.
Puts the component to the back inside the LayeredContainer and Changes its zIndex accordingly.
Puts the ComponentView to the front inside its parent and Changes its zIndex accordingly.
Puts the component to the front inside the LayeredContainer and Changes its zIndex accordingly.
Properties
The actual height for this ComponentView considering scale.
Horizontal position of this ComponentView considering scale.
Vertical position of this ComponentView considering scale.
The actual width for this ComponentView considering scale.
Property for the Alignment of GameComponentViews in this LinearLayout.
GameComponentViews that are contained in this GameComponentContainer.
Returns whether this ComponentView is a valid drop target for the dragged component in the given DragEvent or not.
Property for the height of this ComponentView.
Controls if user input events cause input functions of this ComponentView to get invoked.
Property that controls if user input events cause input functions of this ComponentView to get invoked.
Property that controls whether component is draggable or not.
Property that reflects whether component is currently dragged or not.
Controls whether this ComponentView is focusable or not.
Property that controls whether this ComponentView is focusable or not.
Property for the visibility of this ComponentView.
Returns a CoordinatePlain containing the component's corner Coordinates and its layout bounds.
onAdd gets invoked anytime after a GameComponentView is added to this GameComponentContainer with the added GameComponentView as its receiver.
Gets invoked with a DragEvent whenever a drag and drop gesture finishes over this ComponentView and the dropAcceptor returns true
for the given DragEvent.
Gets invoked with a DragEvent whenever a drag gesture has ended on this rendered ComponentView.
Gets invoked with a DragEvent whenever the mouse enters this ComponentView while performing a drag gesture.
Gets invoked with a DragEvent whenever the mouse leaves this ComponentView while performing a drag gesture.
Gets invoked with a DragEvent whenever a mouse movement occurs during a drag gesture on this ComponentView.
Gets invoked with a DragEvent whenever a drag gesture is started on this ComponentView.
Gets invoked with a KeyEvent whenever a key is pressed while this ComponentView has focus.
Gets invoked with a KeyEvent whenever a key is released while this ComponentView has focus.
Gets invoked with a KeyEvent whenever a Character is typed while this ComponentView has focus. Gets invoked after onKeyPressed.
Gets invoked with a MouseEvent whenever the mouse is clicked inside this ComponentView. Gets invoked after onMousePressed and onMouseReleased.
Gets invoked with a MouseEvent whenever the mouse enters this ComponentView.
Gets invoked with a MouseEvent whenever the mouse leaves this ComponentView.
Gets invoked with a MouseEvent whenever the mouse is pressed inside this ComponentView.
Gets invoked with a MouseEvent whenever the mouse is released inside this ComponentView.
onRemove gets invoked anytime after a GameComponentView is removed from this GameComponentContainer with the removed GameComponentView as its receiver.
Gets invoked with a ScrollEvent whenever the mouse wheel is turned while the mouse is inside this ComponentView.
Property for the opacity of this ComponentView.
Orientation of GameComponentViews in this LinearLayout.
Property for the Orientation of GameComponentViews in this LinearLayout.
Property for the horizontal position of this ComponentView.
Property for the vertical position of this ComponentView.
Property for the rotation of this ComponentView in degrees.
Property for the horizontal scale of this ComponentView.
Property for the vertical scale of this ComponentView.
Property for the spacing of GameComponentViews in this LinearLayout.
Property for the width of this ComponentView.
Property for the order of ComponentView inside of parent.#