Package jam.framework

# Interface MenuFactory

All Known Implementing Classes:
  `DefaultEditMenuFactory`, `DefaultFileMenuFactory`, `DefaultHelpMenuFactory`, `DemoMenuFactory`, `MacEditMenuFactory`, `MacFileMenuFactory`, `MacHelpMenuFactory`, `MacWindowMenuFactory`

public interface MenuFactory

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`CENTER`
`static final int`
`LEFT`
`static final int`
`RIGHT`

## Method Summary

Modifier and Type
Method
Description
`String`
`getMenuName()`
Give the name of this menu.
`int`
`getPreferredAlignment()`
Returns the preferred alignment of the menu in the menu bar.
`void`
`populateMenu(JMenu menu, AbstractFrame frame)`
This method should populate the menu with menu items.

## Field Details

### LEFT

static final int LEFT

See Also:
  - Constant Field Values

### CENTER

static final int CENTER

See Also:
  - Constant Field Values

### RIGHT

static final int RIGHT

See Also:
  - Constant Field Values

## Method Details

### getMenuName

String getMenuName()
Give the name of this menu. If multiple MenuFactories are registered with the same name, then these will be appended into a single actual menu.

### populateMenu

void populateMenu(JMenu menu, AbstractFrame frame)
This method should populate the menu with menu items. Reference can be made to the frame in order to get Actions.

Parameters:
  `menu` -
  `frame` -

### getPreferredAlignment

int getPreferredAlignment()
Returns the preferred alignment of the menu in the menu bar. This should be one of MenuFactory.LEFT, MenuFactory.CENTER or MenuFactory.RIGHT.

Returns:
  the alignment