sourceViewer = new SourceViewer ( ExamplesManager.createJarStructure ( progress ) );
// Content
containerTransition = new ComponentTransition ( exampleTabs );
containerTransition.setTransitionEffect ( new FadeTransitionEffect () );
containerTransition.addTransitionListener ( new TransitionAdapter ()
{
@Override
public void transitionFinished ()
{
// To show back tooltip once
if ( !isSourceTipShownOnce () && containerTransition.getContent () == sourceViewer )
{
// Marking the fact we already seen this tip
setSourceTipShownOnce ();
// Showing helpful tip
TooltipManager.showOneTimeTooltip ( locationBreadcrumb.getComponent ( 0 ), null, infoIcon,
"You can go back to demos at anytime " + "using this breadcrumb", TooltipWay.up );
}
}
} );
contentPane.add ( containerTransition, BorderLayout.CENTER );
// Status bar
contentPane.add ( createStatusBar (), BorderLayout.SOUTH );
exampleTabs.setSelectedIndex ( 0 );
// Base content
appearanceTransition = new ComponentTransition ( createBackgroundPanel () )
{
@Override
public Dimension getPreferredSize ()
{
return contentPane.getPreferredSize ();
}
};
final CurtainTransitionEffect effect = new CurtainTransitionEffect ();
effect.setDirection ( Direction.down );
effect.setType ( CurtainType.fade );
appearanceTransition.setTransitionEffect ( effect );
appearanceTransition.addAncestorListener ( new AncestorAdapter ()
{
@Override
public void ancestorAdded ( final AncestorEvent event )
{
appearanceTransition.delayTransition ( 1000, contentPane );
}
} );
appearanceTransition.addTransitionListener ( new TransitionAdapter ()
{
@Override
public void transitionFinished ()
{
// Search tip