public class ViewComponent extends AdaptiveComponent
component
clickAction, hidden, id, interaction
Constructor and Description |
---|
ViewComponent(String id,
Action clickAction,
boolean hidden,
Interaction interaction,
Component defaultComponent,
List<Component> views)
Instantiates a new ViewComponent.
|
Modifier and Type | Method and Description |
---|---|
ViewComponent |
clone(Interaction interaction)
Clone the component with the new interaction.
|
Component |
locate(String componentId)
Locate the component with the given id.
|
ViewComponent |
locateOn(Interaction interaction)
Locate the same component on a different interaction.
|
void |
setView(String componentId)
Changes the view of the given interaction to the component with the provided id.
|
adapt, apply, getState, isInBounds, onClick
dispose, getClickAction, getId, getInteraction, isHidden, locate, setClickAction, setHidden
public ViewComponent(String id, Action clickAction, boolean hidden, Interaction interaction, Component defaultComponent, List<Component> views)
id
- the idclickAction
- the click actionshidden
- the hiddeninteraction
- the interactiondefaultComponent
- the default componentviews
- the viewspublic void setView(String componentId)
componentId
- the component idpublic ViewComponent clone(Interaction interaction)
Component
clone
in class AdaptiveComponent
interaction
- the interactionpublic ViewComponent locateOn(Interaction interaction)
Component
interaction.getComponentTree().locate(component.getId())
locateOn
in class AdaptiveComponent
interaction
- the interactionCopyright © 2021. All rights reserved.