org.xnap.commons.gui
Class Builder

java.lang.Object
  extended by org.xnap.commons.gui.Builder

public class Builder
extends Object


Constructor Summary
Builder()
           
 
Method Summary
static Completion addCompletion(JTextComponent textComponent)
          Adds completion and a completion mode menu to a text component.
static Completion addCompletion(JTextComponent textComponent, CompletionModel model)
          Adds completion and a completion mode menu to a text component.
static Completion addCompletion(JTextComponent textComponent, JMenu menu)
          Adds completion and a completion mode menu to a text component.
static Completion addCompletion(JTextComponent textComponent, JMenu menu, CompletionModel model)
          Adds completion and a completion mode menu to a text component.
static AbstractButton createButton(Action action)
           
static AbstractButton createCheckBox(ToggleAction action)
           
static AbstractButton createIconButton(Action action)
           
static JComponent createMenuItem(Action action)
           
static AbstractButton createToolBarButton(Action action)
           
static Factory getFactory()
          Returns the factory used by the builder.
static void setFactory(Factory factory)
          Sets the factory that is used by the builder.
static void setProperty(Object key, Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Builder

public Builder()
Method Detail

setFactory

public static void setFactory(Factory factory)
Sets the factory that is used by the builder.

Parameters:
factory - can null then the DefaultFactory is set.

getFactory

public static Factory getFactory()
Returns the factory used by the builder. This method never returns null.

Returns:
a valid factory

addCompletion

public static Completion addCompletion(JTextComponent textComponent)
Adds completion and a completion mode menu to a text component.

Completion is done for the whole text of the component and not for the last word before the cursor.

The completion mode menu is added as context menu to the text component.


addCompletion

public static Completion addCompletion(JTextComponent textComponent,
                                       CompletionModel model)
Adds completion and a completion mode menu to a text component.

Completion is done for the whole text of the component and not for the last word before the cursor.

The completion mode menu is added as context menu to the text component.


addCompletion

public static Completion addCompletion(JTextComponent textComponent,
                                       JMenu menu)
Adds completion and a completion mode menu to a text component.

Completion is done for the whole text of the component and not for the last word before the cursor.

The completion mode menu is added as a submenu to the given menu.


addCompletion

public static Completion addCompletion(JTextComponent textComponent,
                                       JMenu menu,
                                       CompletionModel model)
Adds completion and a completion mode menu to a text component.

Completion is done for the whole text of the component and not for the last word before the cursor.

The completion mode menu is added as a submenu to the given menu.


createButton

public static AbstractButton createButton(Action action)

createCheckBox

public static AbstractButton createCheckBox(ToggleAction action)

createIconButton

public static AbstractButton createIconButton(Action action)

createToolBarButton

public static AbstractButton createToolBarButton(Action action)

createMenuItem

public static JComponent createMenuItem(Action action)

setProperty

public static void setProperty(Object key,
                               Object value)


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