public abstract class InteractiveControl<T extends InteractiveResource<T>> extends InteractiveResource<T> implements IInteractiveCreatable, IInteractiveDeletable, Comparable<InteractiveControl>
InteractiveControl
is the superclass for all controls on the Interactive service.ButtonControl
,
JoystickControl
meta
Modifier and Type | Method and Description |
---|---|
T |
addPosition(InteractiveControlPosition... controlPositions)
Adds
InteractiveControlPositions to this InteractiveControl . |
int |
compareTo(InteractiveControl o) |
CompletableFuture<Boolean> |
create(GameClient gameClient)
Creates
this in the default scene on the Interactive service. |
CompletableFuture<Boolean> |
delete(GameClient gameClient)
Asynchronously deletes
this from the specified scene. |
boolean |
equals(Object o) |
String |
getControlID()
Returns the unique identifier for the
InteractiveControl . |
InteractiveControlType |
getKind()
Returns the kind of control this
InteractiveControl is. |
InteractiveControlPosition |
getPositionFor(InteractiveCanvasSize canvasSize)
Returns the
InteractiveControlPosition for the provided InteractiveCanvasSize if
there exists one, null otherwise. |
InteractiveControlPosition |
getPositionFor(String canvasSize)
Returns the
InteractiveControlPosition for the provided canvas size if there exists one,
null otherwise. |
Set<InteractiveControlPosition> |
getPositions()
Returns a
Set of all InteractiveControlPositions for this
InteractiveControl . |
String |
getSceneID()
Returns the unique identifier for the
InteractiveScene that contains this control. |
int |
hashCode() |
boolean |
hasPositionFor(InteractiveCanvasSize canvasSize)
Returns
true if this InteractiveControl has a controlPositions for the provided
InteractiveCanvasSize , false otherwise. |
boolean |
hasPositionFor(String canvasSize)
Returns
true if this InteractiveControl has a controlPositions for the provided canvas size,
false otherwise. |
boolean |
isDisabled()
Returns
true if this InteractiveControlType is disabled, false otherwise |
T |
removeAllPositions()
Removes all
InteractiveControlPositions associated with this InteractiveControl . |
T |
removePosition(InteractiveCanvasSize canvasSize)
Attempts to remove any
InteractiveControlPosition associated with the provided
InteractiveCanvasSize . |
T |
removePosition(String canvasSize)
Attempts to remove any
InteractiveControlPosition associated with the provided canvas size. |
T |
setDisabled(Boolean disabled)
Sets the disabled state for this
InteractiveControlType . |
T |
setPositions(Collection<InteractiveControlPosition> controlPositions)
Sets the
InteractiveControlPositions for this InteractiveControl . |
T |
setPositions(InteractiveControlPosition... controlPositions)
Sets the
InteractiveControlPositions for this InteractiveControl . |
CompletableFuture<Boolean> |
update(GameClient gameClient)
Asynchronously updates
this in the specified on the Interactive service. |
addMetaProperty, getMeta, getThis, setMeta, syncIfEqual
public String getControlID()
InteractiveControl
.InteractiveControl
public String getSceneID()
InteractiveScene
that contains this control.InteractiveControl
that contains this controlpublic InteractiveControlType getKind()
InteractiveControl
is.InteractiveControlType
representing what kind of InteractiveControl
this ispublic boolean isDisabled()
true
if this InteractiveControlType
is disabled, false
otherwisetrue
if this InteractiveControlType
is disabled, false
otherwisepublic T setDisabled(Boolean disabled)
InteractiveControlType
.disabled
- true
if this InteractiveControlType
should be disabled,
false
otherwisethis
for method chainingpublic boolean hasPositionFor(String canvasSize)
true
if this InteractiveControl
has a controlPositions for the provided canvas size,
false
otherwise.canvasSize
- The canvas size that is being checked for a controlPositions setting for this controltrue
if this InteractiveControl
has a controlPositions for the provided
canvas size, false
otherwisepublic boolean hasPositionFor(InteractiveCanvasSize canvasSize)
true
if this InteractiveControl
has a controlPositions for the provided
InteractiveCanvasSize
, false
otherwise.canvasSize
- The InteractiveCanvasSize
that is being checked for a controlPositions setting for this controltrue
if this InteractiveControl
has a controlPositions for the provided
InteractiveCanvasSize
, false
otherwisepublic InteractiveControlPosition getPositionFor(String canvasSize)
InteractiveControlPosition
for the provided canvas size if there exists one,
null
otherwise.canvasSize
- Interactive control canvas sizeInteractiveControlPosition
if one exists for the provided canvas size,
null
otherwisepublic InteractiveControlPosition getPositionFor(InteractiveCanvasSize canvasSize)
InteractiveControlPosition
for the provided InteractiveCanvasSize
if
there exists one, null
otherwise.canvasSize
- A InteractiveCanvasSize
InteractiveControlPosition
for the provided InteractiveCanvasSize
if
there exists one, null
otherwise.public Set<InteractiveControlPosition> getPositions()
Set
of all InteractiveControlPositions
for this
InteractiveControl
.Set
of all InteractiveControlPositions
for this
InteractiveControl
public T addPosition(InteractiveControlPosition... controlPositions)
InteractiveControlPositions
to this InteractiveControl
. If there already exists
a InteractiveControlPosition
for a InteractiveCanvasSize
, then the existing value is
for that canvas size is retained.controlPositions
- An array of InteractiveControlPositions
to be added to this InteractiveControl
this
for method chainingpublic T setPositions(Collection<InteractiveControlPosition> controlPositions)
InteractiveControlPositions
for this InteractiveControl
. All previous
positions are cleared and the new ones are applied in place of them.controlPositions
- A Collection
of InteractiveControlPositions
to be set for this
InteractiveControl
this
for method chainingpublic T setPositions(InteractiveControlPosition... controlPositions)
InteractiveControlPositions
for this InteractiveControl
. All previous
positions are cleared and the new ones are applied in place of them.controlPositions
- An array of InteractiveControlPositions
to be set for this InteractiveControl
this
for method chainingpublic T removePosition(InteractiveCanvasSize canvasSize)
InteractiveControlPosition
associated with the provided
InteractiveCanvasSize
.canvasSize
- The InteractiveCanvasSize
for which we would like to remove a
InteractiveControlPosition
this
for method chainingpublic T removePosition(String canvasSize)
InteractiveControlPosition
associated with the provided canvas size.canvasSize
- The canvas size for which we would like to remove a InteractiveControlPosition
this
for method chainingpublic T removeAllPositions()
InteractiveControlPositions
associated with this InteractiveControl
.this
for method chainingpublic CompletableFuture<Boolean> create(GameClient gameClient)
this
in the default scene on the Interactive service.create
in interface IInteractiveCreatable
gameClient
- The GameClient
to use for the create operationCompletableFuture
that when complete returns true
if the
create
method call completes with no errorsIInteractiveCreatable.create(GameClient)
public CompletableFuture<Boolean> update(GameClient gameClient)
this
in the specified on the Interactive service.update
in interface IInteractiveUpdatable
gameClient
- The GameClient
to use for the update operationCompletableFuture
that when complete returns true
if the
update
method call completes with no errorspublic CompletableFuture<Boolean> delete(GameClient gameClient)
this
from the specified scene.delete
in interface IInteractiveDeletable
gameClient
- The GameClient
to use for the delete operationCompletableFuture
that when complete returns true
if the
delete
method call completes with no errorspublic int compareTo(InteractiveControl o)
compareTo
in interface Comparable<InteractiveControl>
Copyright © 2018. All rights reserved.