org.xwiki.gwt.wysiwyg.client.plugin.macro
Class ParameterDisplayer

java.lang.Object
  extended by org.xwiki.gwt.wysiwyg.client.plugin.macro.ParameterDisplayer

public class ParameterDisplayer
extends Object

Displays a macro parameter allowing us to change its value.

Version:
$Id$

Constructor Summary
ParameterDisplayer(ParameterDescriptor descriptor)
          Creates a new displayer for the specified parameter.
 
Method Summary
 ParameterDescriptor getDescriptor()
           
 String getValue()
           
 com.google.gwt.user.client.ui.Widget getWidget()
           
 void setFocused(boolean focused)
          Explicitly focus/unfocus the input control.
 void setValue(String value)
          Sets the displayed value of the underlying macro parameter.
 boolean validate()
          Validates the current value of the displayed macro parameter and shows a notification message near the input control if the value is illegal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterDisplayer

public ParameterDisplayer(ParameterDescriptor descriptor)
Creates a new displayer for the specified parameter.

Parameters:
descriptor - describes the parameter to be displayed
Method Detail

getDescriptor

public ParameterDescriptor getDescriptor()
Returns:
descriptor

getWidget

public com.google.gwt.user.client.ui.Widget getWidget()
Returns:
the widget used to display and edit the underlying macro parameter

setFocused

public void setFocused(boolean focused)
Explicitly focus/unfocus the input control. Only one widget can have focus at a time, and the widget that does will receive all keyboard events.

Parameters:
focused - whether the input control should take focus or release it

getValue

public String getValue()
Returns:
the current value of the underlying macro parameter

setValue

public void setValue(String value)
Sets the displayed value of the underlying macro parameter.

Parameters:
value - the value to set

validate

public boolean validate()
Validates the current value of the displayed macro parameter and shows a notification message near the input control if the value is illegal.

Returns:
true if the current value is legal, false otherwise


Copyright © 2004-2012 XWiki. All Rights Reserved.