org.xnap.commons.gui.factory
Interface Factory

All Known Implementing Classes:
DefaultFactory

public interface Factory

Defines the requirements for a factory class used by Builder.


Method Summary
 void addCompletionModeMenu(JMenu menu, Completion completion)
          Adds a completion mode menu as a sub menu to the menu.
 void addCompletionModeMenu(JTextComponent textComponent, Completion completion)
          Adds a completion mode menu to the text component which pops up when the platform dependent popup action is triggered.
 AbstractButton createButton(Action action)
          Creates a button for an action.
 AbstractButton createCheckBox(ToggleAction action)
          Creates a checkbox for a toggle action.
 AbstractButton createIconButton(Action action)
          Creates an icon button for an action that only shows the icon and not the text of the action.
 JComponent createMenuItem(Action action)
          Creates a menu item for an action making sure the right sized icon is used.
 AbstractButton createToolBarButton(Action action)
          Creates a toolbar button for an action making sure the right sized icon is used.
 void setProperty(Object key, Object value)
          Sets a property of the factory to configure it.
 

Method Detail

addCompletionModeMenu

void addCompletionModeMenu(JTextComponent textComponent,
                           Completion completion)
Adds a completion mode menu to the text component which pops up when the platform dependent popup action is triggered.

Parameters:
textComponent -
completion - the completion object whose completion modes are set by the menu

addCompletionModeMenu

void addCompletionModeMenu(JMenu menu,
                           Completion completion)
Adds a completion mode menu as a sub menu to the menu.

Parameters:
menu - the menu into which the completion mode menu is plugged
completion - the completion object whose completion modes are set by the menu

createButton

AbstractButton createButton(Action action)
Creates a button for an action.

Parameters:
action - the action
Returns:
the button

createCheckBox

AbstractButton createCheckBox(ToggleAction action)
Creates a checkbox for a toggle action.

Parameters:
action - the action
Returns:
the checkbox

createIconButton

AbstractButton createIconButton(Action action)
Creates an icon button for an action that only shows the icon and not the text of the action.

Parameters:
action - the action
Returns:
the button

createToolBarButton

AbstractButton createToolBarButton(Action action)
Creates a toolbar button for an action making sure the right sized icon is used.

Parameters:
action - the action
Returns:
the button

createMenuItem

JComponent createMenuItem(Action action)
Creates a menu item for an action making sure the right sized icon is used.

Parameters:
action - the action
Returns:
the menu item

setProperty

void setProperty(Object key,
                 Object value)
Sets a property of the factory to configure it.

Parameters:
key - the key
value - the value


Copyright © 2004-2007 XNap Commons Team. All Rights Reserved.