com.xpn.xwiki.wysiwyg.client.plugin.internal
Class CompositeUIExtension

java.lang.Object
  extended by com.xpn.xwiki.wysiwyg.client.plugin.internal.CompositeUIExtension
All Implemented Interfaces:
UIExtension

public class CompositeUIExtension
extends java.lang.Object
implements UIExtension

Aggregates many UIExtension objects that have the same role.


Constructor Summary
CompositeUIExtension(java.lang.String role)
           
 
Method Summary
 void addUIExtension(UIExtension uie)
           
 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 removeUIExtension(UIExtension uie)
           
 void setEnabled(java.lang.String feature, boolean enabled)
          Enables or disables the given feature.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeUIExtension

public CompositeUIExtension(java.lang.String role)
Method Detail

getFeatures

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

Specified by:
getFeatures in interface UIExtension
Returns:
An array of supported features, depending on the underlying text area's capabilities.
See Also:
UIExtension.getFeatures()

getRole

public java.lang.String getRole()

Specified by:
getRole in interface UIExtension
Returns:
The extension point. It could be menu, toolbar, statusbar, contextmenu and so on.
See Also:
UIExtension.getRole()

getUIObject

public 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.

Specified by:
getUIObject in interface UIExtension
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.
See Also:
UIExtension.getUIObject(String)

isEnabled

public 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.

Specified by:
isEnabled in interface UIExtension
Parameters:
feature - The feature whose enabled state is queried.
Returns:
true if the specified feature is enabled.
See Also:
UIExtension.isEnabled(String)

setEnabled

public 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.

Specified by:
setEnabled in interface UIExtension
Parameters:
feature - The feature to enable or disable.
enabled - true if the specified feature should be enabled.
See Also:
UIExtension.setEnabled(String, boolean)

addUIExtension

public void addUIExtension(UIExtension uie)

removeUIExtension

public void removeUIExtension(UIExtension uie)


Copyright © 2004-2008 XWiki. All Rights Reserved.