leftHeader.setOpaque ( false );
leftHeader.add ( previousSkip, BorderLayout.WEST );
leftHeader.add ( previous, BorderLayout.EAST );
header.add ( leftHeader, BorderLayout.WEST );
titlePanel = new ComponentTransition ( createTitleLabel () );
titlePanel.setOpaque ( false );
titlePanel.setTransitionEffect ( new FadeTransitionEffect () );
titlePanel.addMouseListener ( new MouseAdapter ()
{
@Override
public void mousePressed ( final MouseEvent e )
{
if ( SwingUtilities.isLeftMouseButton ( e ) )
{
setShownDate ( new Date () );
}
}
} );
header.add ( titlePanel, BorderLayout.CENTER );
next = WebButton.createIconWebButton ( nextIcon, StyleConstants.smallRound, true );
next.setDrawFocus ( false );
next.addActionListener ( new ActionListener ()
{
@Override
public void actionPerformed ( final ActionEvent e )
{
changeMonth ( 1 );
}
} );
nextSkip = WebButton.createIconWebButton ( nextSkipIcon, StyleConstants.smallRound, true );
nextSkip.setDrawFocus ( false );
nextSkip.addActionListener ( new ActionListener ()
{
@Override
public void actionPerformed ( final ActionEvent e )
{
changeYear ( 1 );
}
} );
final WebPanel rightHeader = new WebPanel ( new BorderLayout () );
rightHeader.setOpaque ( false );
rightHeader.add ( next, BorderLayout.WEST );
rightHeader.add ( nextSkip, BorderLayout.EAST );
header.add ( rightHeader, BorderLayout.EAST );
// Week days
weekHeaders = new WebPanel ();
weekHeaders.setUndecorated ( false );
weekHeaders.setPaintSides ( true, false, true, false );
weekHeaders.setShadeWidth ( 0 );
weekHeaders.setOpaque ( false );
weekHeaders.setMargin ( StyleConstants.shadeWidth, StyleConstants.shadeWidth - 1, StyleConstants.shadeWidth + 1,
StyleConstants.shadeWidth - 1 );
weekHeaders.setLayout ( new TableLayout ( new double[][]{
{ TableLayout.FILL, TableLayout.PREFERRED, TableLayout.FILL, TableLayout.PREFERRED, TableLayout.FILL, TableLayout.PREFERRED,
TableLayout.FILL, TableLayout.PREFERRED, TableLayout.FILL, TableLayout.PREFERRED, TableLayout.FILL,
TableLayout.PREFERRED, TableLayout.FILL }, { TableLayout.PREFERRED } } ) );
centerPanel.add ( weekHeaders, BorderLayout.NORTH );
updateWeekHeaders ();
// Month days
monthDays = createMonthPanel ();
updateMonth ( monthDays );
monthDaysTransition = new ComponentTransition ( monthDays );
monthDaysTransition.setOpaque ( false );
monthDaysTransition.addTransitionListener ( new TransitionAdapter ()
{
@Override
public void transitionFinished ()