}
final Vector speedOptions = viewDef.getSpeedOptions();
final int speedOptionCount = speedOptions.size();
for( int i = 0; i < speedOptionCount; i++ )
{
final SpeedOptionDef option = (SpeedOptionDef)
speedOptions.elementAt( i );
final String optionText = option.getText();
final int code = option.getCode();
boolean active = true;
if( option.getOnlyIf() != null )
{
active = ViewFactory.hasFlag( option.getOnlyIf() );
}
else if( option.getUnless() != null )
{
active = !ViewFactory.hasFlag( option.getUnless() );
}
if( active )
{
if( browser instanceof ListBrowserView )
{
browser.addSpeedOption(
optionText,
code
);
}
else
{
ViewFactory.loadIconStore( option.getIconSet() );
if( option.getIconSet() != null )
{
browser.addSpeedOption(
code,
option.getIconSet(),
option.getIcon() != null ?
option.getIcon().intValue() :
i,
option.getHelp()
);
}
else
{
browser.addSpeedOption(
code,
optionText,
option.getHelp()
);
}
}
}
}