Form Builder NG Model 6.0.0-SNAPSHOT

org.jbpm.form.builder.ng.model.client.effect
Class FBFormEffect

java.lang.Object
  extended by org.jbpm.form.builder.ng.model.client.effect.FBFormEffect
Direct Known Subclasses:
ChangeColspanFormEffect

public abstract class FBFormEffect
extends Object

Base class for right click actions. These effects add special characteristics and settings to a given form item


Constructor Summary
FBFormEffect(String name, boolean hasSubMenu)
           
 
Method Summary
 void apply(FBFormItem item, com.google.gwt.user.client.ui.PopupPanel panel)
           
 com.google.gwt.user.client.ui.PopupPanel createPanel()
          If your instance of FBFormEffect happens to need a popup menu, override this method and create that menu here
protected abstract  void createStyles()
          Classes that implement FBFormEffect must write this method, and make all actions of the effect in it
protected  FBFormItem getItem()
          Use this method to obtain the FBFormItem this FBFormEffect is related to
 String getName()
           
 com.google.gwt.user.client.ui.PopupPanel getParent()
           
 com.google.gwt.user.client.ui.Widget getWidget()
          Use this method to obtain the UI GWT component represented by the FBFormItem this FBFormEffect is related to
 boolean isValidForItem(FBFormItem item)
          Override this method as a safety switch.
 void remove(FBFormItem item)
           
 void setParent(com.google.gwt.user.client.ui.PopupPanel parent)
           
 void setWidget(com.google.gwt.user.client.ui.Widget widget)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FBFormEffect

public FBFormEffect(String name,
                    boolean hasSubMenu)
Parameters:
name - Name of the effect for the drop menu
hasSubMenu - if this effect, on selection, opens a new popup menu
Method Detail

getName

public String getName()

apply

public void apply(FBFormItem item,
                  com.google.gwt.user.client.ui.PopupPanel panel)

remove

public void remove(FBFormItem item)

createStyles

protected abstract void createStyles()
Classes that implement FBFormEffect must write this method, and make all actions of the effect in it


createPanel

public com.google.gwt.user.client.ui.PopupPanel createPanel()
If your instance of FBFormEffect happens to need a popup menu, override this method and create that menu here

Returns:
the popup needed for the given effect

getItem

protected FBFormItem getItem()
Use this method to obtain the FBFormItem this FBFormEffect is related to

Returns:
the related FBFormItem

setWidget

public void setWidget(com.google.gwt.user.client.ui.Widget widget)

getParent

public com.google.gwt.user.client.ui.PopupPanel getParent()

setParent

public void setParent(com.google.gwt.user.client.ui.PopupPanel parent)

getWidget

public com.google.gwt.user.client.ui.Widget getWidget()
Use this method to obtain the UI GWT component represented by the FBFormItem this FBFormEffect is related to

Parameters:
widget - the UI GWT component of the related FBFormItem

isValidForItem

public boolean isValidForItem(FBFormItem item)
Override this method as a safety switch. If your FBFormEffect only works for a given set of components, or for components with a given characteristic, and you want to check it, you can override this method to say when it the makes sense to have this FBFormEffect related to a given FBFormItem Default implementation always returns true

Parameters:
item - the related FBFormItem to validate
Returns:
wether its a valid effect for the given item or not

Form Builder NG Model 6.0.0-SNAPSHOT

Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.