T
- type of components for LayerContainer
public class Layer<T extends Component>
extends java.lang.Object
Layer can be eventPassable - that's mean that current layer allow to pass events to bottom layer if event wasn't handled by components of this layer.
Also layer can be eventReceivable - that's mean
that current layer and all of it components can receive events. For example TooltipLayer
is eventPassable and isn't eventReceivable.
Modifier and Type | Field and Description |
---|---|
protected LayerContainer<T> |
container
Used to hold all components of layer.
|
Constructor and Description |
---|
Layer() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
LayerContainer<T> |
getContainer()
Returns component container.
|
Frame |
getFrame()
Returns frame to which attached this layer.
|
int |
hashCode() |
boolean |
isEventPassable()
Returns true if layer is event passable.
|
boolean |
isEventReceivable()
Returns true if layer is event receivable.
|
void |
setContainer(LayerContainer<T> container)
Used to set custom layer container.
|
void |
setEventPassable(boolean eventPassable)
Used to enable or disable passing events to bottom layer.
|
void |
setEventReceivable(boolean eventReceivable)
Used to enable or disable receiving events by layer.
|
protected void |
setFrame(Frame frame)
Used to attach layer to frame.
|
java.lang.String |
toString() |
protected LayerContainer<T extends Component> container
public Frame getFrame()
protected void setFrame(Frame frame)
frame
- frame to attach.public LayerContainer<T> getContainer()
public void setContainer(LayerContainer<T> container)
container
- new layer container to set.public boolean isEventPassable()
public void setEventPassable(boolean eventPassable)
eventPassable
- true/false to enable/disable passing events to bottom layer.public boolean isEventReceivable()
public void setEventReceivable(boolean eventReceivable)
eventReceivable
- true/false to enable/disable receiving events by layer.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object