Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.jgoodies.forms.factories
Interface ComponentFactory2

All Superinterfaces:
  ComponentFactory

All Known Implementing Classes:
  DefaultComponentFactory

    public interface ComponentFactory2

extends ComponentFactory

An extension to the ComponentFactory interface that describes the describes the read-only label creation introduced by the Forms 1.3. In version 1.4 it has been further extended to create buttons for Actions.

Note: This interface shall be merged with the ComponentFactory interface in the Forms 2.0.

Since:
  1.3
Version:
  $Revision: 1.5 $
Author:
  Karsten Lentzsch
See Also:
  `DefaultComponentFactory`, `PanelBuilder`

Method Summary
`JButton` | `createButton(Action action)` Creates and returns a button that is bound to the given Action.
`JLabel` | `createReadOnlyLabel(String textWithMnemonic)` Creates and returns a label with an optional mnemonic that is intended to label a read-only component.

Methods inherited from interface com.jgoodies.forms.factories.ComponentFactory
`createLabel, createSeparator, createTitle`

Method Detail

### createReadOnlyLabel

    JLabel createReadOnlyLabel(String textWithMnemonic)

  Creates and returns a label with an optional mnemonic that is intended to label a read-only component.

       createReadOnlyLabel("Name");       // No mnemonic
       createReadOnlyLabel("N&ame");      // Mnemonic is 'a'
       createReadOnlyLabel("Save &as");   // Mnemonic is the second 'a'
       createReadOnlyLabel("Look&&Feel"); // No mnemonic, text is Look&Feel

  Parameters:
    `textWithMnemonic` - the label's text - may contain an ampersand (`&`) to mark a mnemonic
  Returns:
    an label with optional mnemonic intended for read-only components
  Since:
    1.3

### createButton

    JButton createButton(Action action)

  Creates and returns a button that is bound to the given Action. Useful to return customized buttons, for example, the JGoodies `JGButton` is bound to some custom Action properties.

  Parameters:
    `action` - provides [bound] visual properties for the button
  Returns:
    the created button
  Since:
    1.4

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2011 JGoodies Karsten Lentzsch. All Rights Reserved.