{
if( !isShown() )
{
Application.getManager().getDisplay().setCurrent( this );
}
final ProgressEvent event = (ProgressEvent) e;
if( event.getTitle() != null )
{
setTitle( event.getTitle() );
}
final ProgressMeterComp meter = this.meter;
if( event.getPhase() != null )
{
meter.setLabel( event.getPhase() );
}
if( event.getMaxValue() != null )
{
meter.setMaxValue( event.getMaxValue().intValue() );
}
if( event.getValue() != null )
{
meter.setValue( event.getValue().intValue() );
}
if( event.getMessage() != null )
{
message = event.getMessage();
}
if( event.isAnimate() && animator != null )
{
animator = new Animator( this );
animator.start();
}
if(
event.isCancellable() != null &&
event.isCancellable().booleanValue() != cancellable
)
{
cancellable = event.isCancellable().booleanValue();
if( cancellable )
{
addCommand(
Application.getCommandFactory().cancelCommand()
);