Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Table of Contents
maxLevel3
indent0px

(Automatically generated from BeanInfo)

Generated Object

A java.awt.CardLayout is returned, unless the user passes in a subclass of CardLayout as the value argument, in which case the value argument is returned.

Attributes

Declared in java.awt.CardLayout

  • hgap <int>
  • vgap <int>

Events

Content

Usage

Examples

Code Block
actions
{
    action(id: 'nextAction',
            name: 'Next >>',
            closure: { cards.layout.show(cards, 'Options') })
            
    action(id: 'prevAction',
            name: '<< Prev',
            closure: { cards.layout.show(cards, 'Main') })
}

application(title:'Test',
  pack:true,
  locationByPlatform:true,
  iconImage: imageIcon('/griffon-icon-48x48.png').image,
  iconImages: [imageIcon('/griffon-icon-48x48.png').image,
               imageIcon('/griffon-icon-32x32.png').image,
               imageIcon('/griffon-icon-16x16.png').image]
) 
{
    panel(id: 'cards')
    {
        cardLayout()
    
        panel(constraints: 'Main')
        {
            label('Main Page')
            
            button(action: nextAction)
        }
        
        panel(constraints: 'Options')
        {
            label('Options Page')
            
            button(action: prevAction)        
        }  
    }
    
    cards.layout.show(cards, 'Main')
}