P
- the generic typeS
- the generic typePlayer<P,S>
, org.refcodes.graphical.DraggableAccessor
, org.refcodes.graphical.DraggableAccessor.DraggableBuilder<P>
, org.refcodes.graphical.DraggableAccessor.DraggableMutator
, org.refcodes.graphical.DraggableAccessor.DraggableProperty
, org.refcodes.graphical.Position
, org.refcodes.graphical.Position.PositionBuilder<P>
, org.refcodes.graphical.Position.PositionMutator
, org.refcodes.graphical.Position.PositionProperty
, org.refcodes.graphical.PosXAccessor
, org.refcodes.graphical.PosXAccessor.PosXBuilder<P>
, org.refcodes.graphical.PosXAccessor.PosXMutator
, org.refcodes.graphical.PosXAccessor.PosXProperty
, org.refcodes.graphical.PosYAccessor
, org.refcodes.graphical.PosYAccessor.PosYBuilder<P>
, org.refcodes.graphical.PosYAccessor.PosYMutator
, org.refcodes.graphical.PosYAccessor.PosYProperty
, org.refcodes.graphical.VisibleAccessor
, org.refcodes.graphical.VisibleAccessor.VisibleBuilder<P>
, org.refcodes.graphical.VisibleAccessor.VisibleMutator
, org.refcodes.graphical.VisibleAccessor.VisibleProperty
, org.refcodes.mixin.Disposable
, org.refcodes.mixin.Loggable
, org.refcodes.mixin.StateAccessor<S>
, org.refcodes.mixin.StateAccessor.StateBuilder<S,P>
, org.refcodes.mixin.StateAccessor.StateMutator<S>
, org.refcodes.mixin.StateAccessor.StateProperty<S>
, org.refcodes.observer.Observable<PlayerObserver<P,S>>
TaitoImpl
public abstract class AbstractPlayer<P extends Player<P,S>,S> extends org.refcodes.observer.AbstractObservable<PlayerObserver<P,S>,PlayerEvent<P>> implements Player<P,S>
org.refcodes.mixin.Disposable.Disposedable
org.refcodes.graphical.DraggableAccessor.DraggableBuilder<B extends org.refcodes.graphical.DraggableAccessor.DraggableBuilder<B>>, org.refcodes.graphical.DraggableAccessor.DraggableMutator, org.refcodes.graphical.DraggableAccessor.DraggableProperty
org.refcodes.graphical.Position.PositionBuilder<B extends org.refcodes.graphical.Position.PositionBuilder<B>>, org.refcodes.graphical.Position.PositionMutator, org.refcodes.graphical.Position.PositionProperty, org.refcodes.graphical.Position.PositionPropertyBuilder
org.refcodes.graphical.PosXAccessor.PosXBuilder<B extends org.refcodes.graphical.PosXAccessor.PosXBuilder<B>>, org.refcodes.graphical.PosXAccessor.PosXMutator, org.refcodes.graphical.PosXAccessor.PosXProperty
org.refcodes.graphical.PosYAccessor.PosYBuilder<B extends org.refcodes.graphical.PosYAccessor.PosYBuilder<B>>, org.refcodes.graphical.PosYAccessor.PosYMutator, org.refcodes.graphical.PosYAccessor.PosYProperty
org.refcodes.mixin.StateAccessor.StateBuilder<S extends Object,B extends org.refcodes.mixin.StateAccessor.StateBuilder<S,B>>, org.refcodes.mixin.StateAccessor.StateMutator<S extends Object>, org.refcodes.mixin.StateAccessor.StateProperty<S extends Object>
org.refcodes.graphical.VisibleAccessor.VisibleBuilder<B extends org.refcodes.graphical.VisibleAccessor.VisibleBuilder<B>>, org.refcodes.graphical.VisibleAccessor.VisibleMutator, org.refcodes.graphical.VisibleAccessor.VisibleProperty
Constructor | Description |
---|---|
AbstractPlayer() |
Empty constructor.
|
AbstractPlayer(int aPosX,
int aPosY) |
Instantiates a new abstract player.
|
AbstractPlayer(org.refcodes.graphical.Position aPosition) |
Instantiates a new abstract player.
|
Modifier and Type | Method | Description |
---|---|---|
void |
draggable() |
|
protected boolean |
fireEvent(PlayerEvent<P> aEvent,
PlayerObserver<P,S> aObserver,
org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy) |
Fire event.
|
int |
getPositionX() |
|
int |
getPositionY() |
|
S |
getState() |
|
void |
hide() |
|
boolean |
isDraggable() |
|
boolean |
isVisible() |
|
void |
setDraggable(boolean isDraggable) |
Sets the draggable.
|
void |
setPosition(int aPosX,
int aPosY) |
Sets the position.
|
void |
setPosition(org.refcodes.graphical.Position aPosition) |
|
void |
setPositionX(int aPosX) |
Sets the position X.
|
void |
setPositionY(int aPosY) |
Sets the position Y.
|
void |
setState(S aState) |
Sets the state.
|
void |
setVisible(boolean isVisible) |
Sets the visible.
|
void |
show() |
|
void |
stationary() |
|
String |
toString() |
|
P |
withDraggable() |
With draggable.
|
P |
withDraggable(boolean isDraggable) |
With draggable.
|
P |
withHide() |
With hide.
|
P |
withPosition(int aPosX,
int aPosY) |
With position.
|
P |
withPosition(org.refcodes.graphical.Position aPosition) |
With position.
|
P |
withPositionX(int aPosX) |
With position X.
|
P |
withPositionY(int aPosY) |
With position Y.
|
P |
withShow() |
With show.
|
P |
withState(S aState) |
With state.
|
P |
withStationary() |
With stationary.
|
P |
withVisible(boolean isVisible) |
With visible.
|
clear, dispose, doHandleEventListenerException, fireEvent, getThreadPriority, hasObserverSubscription, isEmpty, isObserversActive, observers, setObserversActive, setThreadPriority, size, subscribeObserver, unsubscribeObserver
alert, alert, critical, critical, debug, error, info, notice, panic, trace, warn, warn
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
hasObserverSubscription, subscribeObserver, unsubscribeObserver
public AbstractPlayer()
setPosition(int, int)
or the like after construction. You may
also directly construct with coordinates by using
AbstractPlayer(Position)
or AbstractPlayer(int, int)
.public AbstractPlayer(int aPosX, int aPosY)
aPosX
- the pos XaPosY
- the pos Ypublic AbstractPlayer(org.refcodes.graphical.Position aPosition)
aPosition
- the positionpublic P withPosition(int aPosX, int aPosY) throws org.refcodes.exception.VetoException.VetoRuntimeException
public P withPosition(org.refcodes.graphical.Position aPosition) throws org.refcodes.exception.VetoException.VetoRuntimeException
public void setPosition(int aPosX, int aPosY) throws org.refcodes.exception.VetoException.VetoRuntimeException
setPosition
in interface org.refcodes.graphical.Position.PositionMutator
aPosX
- the pos XaPosY
- the pos Yorg.refcodes.exception.VetoException.VetoRuntimeException
- the veto runtime exceptionpublic void setPosition(org.refcodes.graphical.Position aPosition) throws org.refcodes.exception.VetoException.VetoRuntimeException
setPosition
in interface org.refcodes.graphical.Position.PositionMutator
org.refcodes.exception.VetoException.VetoRuntimeException
public P withPositionY(int aPosY) throws org.refcodes.exception.VetoException.VetoRuntimeException
public void setPositionY(int aPosY) throws org.refcodes.exception.VetoException.VetoRuntimeException
setPositionY
in interface org.refcodes.graphical.PosYAccessor.PosYMutator
aPosY
- the new position Yorg.refcodes.exception.VetoException.VetoRuntimeException
- the veto runtime exceptionpublic P withPositionX(int aPosX) throws org.refcodes.exception.VetoException.VetoRuntimeException
public void setState(S aState)
public void setPositionX(int aPosX)
setPositionX
in interface org.refcodes.graphical.PosXAccessor.PosXMutator
aPosX
- the new position Xpublic void setVisible(boolean isVisible)
setVisible
in interface org.refcodes.graphical.VisibleAccessor.VisibleMutator
isVisible
- the new visiblepublic P withShow()
public P withHide()
public P withVisible(boolean isVisible)
public void show()
show
in interface org.refcodes.graphical.VisibleAccessor.VisibleMutator
public void hide()
hide
in interface org.refcodes.graphical.VisibleAccessor.VisibleMutator
public boolean isVisible()
isVisible
in interface org.refcodes.graphical.VisibleAccessor
public void setDraggable(boolean isDraggable)
setDraggable
in interface org.refcodes.graphical.DraggableAccessor.DraggableMutator
isDraggable
- the new draggablepublic P withDraggable()
public P withStationary()
public P withDraggable(boolean isDraggable)
public void draggable()
draggable
in interface org.refcodes.graphical.DraggableAccessor.DraggableMutator
public void stationary()
stationary
in interface org.refcodes.graphical.DraggableAccessor.DraggableMutator
public boolean isDraggable()
isDraggable
in interface org.refcodes.graphical.DraggableAccessor
public int getPositionX()
getPositionX
in interface org.refcodes.graphical.PosXAccessor
public int getPositionY()
getPositionY
in interface org.refcodes.graphical.PosYAccessor
public S getState()
protected boolean fireEvent(PlayerEvent<P> aEvent, PlayerObserver<P,S> aObserver, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy) throws org.refcodes.exception.VetoException
fireEvent
in class org.refcodes.observer.AbstractObservable<PlayerObserver<P extends Player<P,S>,S>,PlayerEvent<P extends Player<P,S>>>
aEvent
- the eventaObserver
- the observeraExecutionStrategy
- the execution strategyorg.refcodes.exception.VetoException
- the veto exceptionCopyright © 2018. All rights reserved.