org.xnap.commons.gui.completion
Class GlobalDefaultCompletionMode

java.lang.Object
  extended by org.xnap.commons.gui.completion.GlobalDefaultCompletionMode
All Implemented Interfaces:
CompletionMode

public class GlobalDefaultCompletionMode
extends Object
implements CompletionMode

This mode acts as a proxy for another mode that can be set as global default.

Author:
Steffen Pingel

Constructor Summary
GlobalDefaultCompletionMode()
           
 
Method Summary
 void disable()
          Disables the completion mode letting it remove its listeners from the text component.
 void enable(Completion completion)
          Enables the completion mode letting it add its listeners to the text component.
static String getCompletionMode()
          Returns the class name of the currently used completion mode.
static void setCompletionMode(String className)
          Calls to this method need to be Swing thread synchronized.
 void updateMode()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalDefaultCompletionMode

public GlobalDefaultCompletionMode()
Method Detail

enable

public void enable(Completion completion)
Description copied from interface: CompletionMode
Enables the completion mode letting it add its listeners to the text component.

Specified by:
enable in interface CompletionMode
Parameters:
completion - provides all components and information the completion mode must know about

disable

public void disable()
Description copied from interface: CompletionMode
Disables the completion mode letting it remove its listeners from the text component.

Specified by:
disable in interface CompletionMode

updateMode

public void updateMode()

getCompletionMode

public static String getCompletionMode()
Returns the class name of the currently used completion mode.


setCompletionMode

public static void setCompletionMode(String className)
Calls to this method need to be Swing thread synchronized.

Parameters:
className - must not be null, must not be the class name of DefaultCompletionMode itself.
Throws:
IllegalArgumentException - if className violates one of the requirements stated above


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