org.xwiki.gwt.wysiwyg.client.plugin.separator
Class AbstractSeparator

java.lang.Object
  extended by org.xwiki.gwt.wysiwyg.client.plugin.separator.AbstractSeparator
All Implemented Interfaces:
UIExtension
Direct Known Subclasses:
ToolBarSeparator

public abstract class AbstractSeparator
extends java.lang.Object
implements UIExtension

Abstract separator.

Version:
$Id: AbstractSeparator.java 26786 2010-02-07 16:46:17Z mflorea $

Constructor Summary
AbstractSeparator(java.lang.String role)
          Creates a new separator for the given extension point.
 
Method Summary
 java.lang.String getRole()
          
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xwiki.gwt.wysiwyg.client.plugin.UIExtension
getFeatures, getUIObject
 

Constructor Detail

AbstractSeparator

public AbstractSeparator(java.lang.String role)
Creates a new separator for the given extension point.

Parameters:
role - the name of the extension point for which the new separator is created.
Method Detail

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()

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)


Copyright © 2004-2011 XWiki. All Rights Reserved.