public class TokenPainterReplacedEvent extends PaintSettingsEvent
TokenPainterList
has been replaced.Constructor and Description |
---|
TokenPainterReplacedEvent(PaintSettings source,
TokenPainter previousPainter,
TokenPainter newPainter,
int index)
Creates a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
int |
getIndex()
Returns the index in the token painter list where the specified replace happened.
|
TokenPainter |
getNewPainter()
Returns the painter that replaced the previous one
|
TokenPainter |
getPreviousPainter()
Returns the painter that has been replaced.
|
getSource
public TokenPainterReplacedEvent(PaintSettings source, TokenPainter previousPainter, TokenPainter newPainter, int index)
source
- the list object where the change took placepreviousPainter
- the painter that has been replacednewPainter
- the painter that replaces the previous oneindex
- the index where the painter has been replacedpublic TokenPainter getPreviousPainter()
null
if a null
entry in the list has been replacedpublic TokenPainter getNewPainter()
null
if the according entry in the list has been set to null
public int getIndex()