org.xnap.commons.gui.factory
Class DefaultFactory

java.lang.Object
  extended by org.xnap.commons.gui.factory.DefaultFactory
All Implemented Interfaces:
Factory

public class DefaultFactory
extends Object
implements Factory


Field Summary
static String ENHANCED_TEXT_FIELD_MENU_KEY
           
 
Constructor Summary
DefaultFactory()
           
 
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.
 Object getProperty(Object key)
           
 void setProperty(Object key, Object value)
          Sets a property of the factory to configure it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENHANCED_TEXT_FIELD_MENU_KEY

public static final String ENHANCED_TEXT_FIELD_MENU_KEY
See Also:
Constant Field Values
Constructor Detail

DefaultFactory

public DefaultFactory()
Method Detail

addCompletionModeMenu

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

Specified by:
addCompletionModeMenu in interface Factory
completion - the completion object whose completion modes are set by the menu

addCompletionModeMenu

public void addCompletionModeMenu(JMenu menu,
                                  Completion completion)
Description copied from interface: Factory
Adds a completion mode menu as a sub menu to the menu.

Specified by:
addCompletionModeMenu in interface Factory
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

public AbstractButton createButton(Action action)
Description copied from interface: Factory
Creates a button for an action.

Specified by:
createButton in interface Factory
Parameters:
action - the action
Returns:
the button

createCheckBox

public AbstractButton createCheckBox(ToggleAction action)
Description copied from interface: Factory
Creates a checkbox for a toggle action.

Specified by:
createCheckBox in interface Factory
Parameters:
action - the action
Returns:
the checkbox

createIconButton

public AbstractButton createIconButton(Action action)
Description copied from interface: Factory
Creates an icon button for an action that only shows the icon and not the text of the action.

Specified by:
createIconButton in interface Factory
Parameters:
action - the action
Returns:
the button

createToolBarButton

public AbstractButton createToolBarButton(Action action)
Description copied from interface: Factory
Creates a toolbar button for an action making sure the right sized icon is used.

Specified by:
createToolBarButton in interface Factory
Parameters:
action - the action
Returns:
the button

createMenuItem

public JComponent createMenuItem(Action action)
Description copied from interface: Factory
Creates a menu item for an action making sure the right sized icon is used.

Specified by:
createMenuItem in interface Factory
Parameters:
action - the action
Returns:
the menu item

getProperty

public Object getProperty(Object key)

setProperty

public void setProperty(Object key,
                        Object value)
Description copied from interface: Factory
Sets a property of the factory to configure it.

Specified by:
setProperty in interface Factory
Parameters:
key - the key
value - the value


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