org.xwiki.gwt.wysiwyg.client.plugin
Interface UIExtension


public interface UIExtension

User interface extension.

Version:
$Id$

Method Summary
 java.lang.String[] getFeatures()
          Examples of features are: bold, justifyright and macro.
 java.lang.String getRole()
           
 com.google.gwt.user.client.ui.UIObject getUIObject(java.lang.String feature)
          It can be a button, a menu item, a label or any other UIObject-derived instance.
 boolean isEnabled(java.lang.String feature)
          Tells if the given feature is enabled in the current context.
 void setEnabled(java.lang.String feature, boolean enabled)
          Enables or disables the given feature.
 

Method Detail

getFeatures

java.lang.String[] getFeatures()
Examples of features are: bold, justifyright and macro.

Returns:
An array of supported features, depending on the underlying text area's capabilities.

getUIObject

com.google.gwt.user.client.ui.UIObject getUIObject(java.lang.String feature)
It can be a button, a menu item, a label or any other UIObject-derived instance.

Parameters:
feature - One of the features provided by the editor's plug-ins and supported by the underlying text area.
Returns:
The user interface object that makes the specified feature accessible in the underlying extension point.

getRole

java.lang.String getRole()
Returns:
The extension point. It could be menu, toolbar, statusbar, contextmenu and so on.

setEnabled

void setEnabled(java.lang.String feature,
                boolean enabled)
Enables or disables the given feature. This way a feature can be disabled as long as it can generate invalid mark-up.

Parameters:
feature - The feature to enable or disable.
enabled - true if the specified feature should be enabled.

isEnabled

boolean isEnabled(java.lang.String feature)
Tells if the given feature is enabled in the current context. A feature can be temporarily disabled if it can generate invalid mark-up.

Parameters:
feature - The feature whose enabled state is queried.
Returns:
true if the specified feature is enabled.
See Also:
org.xwiki.gwt.wysiwyg.client.syntax.SyntaxValidator


Copyright © 2004-2011 XWiki. All Rights Reserved.