Form Builder NG Model 6.0.0-SNAPSHOT

org.jbpm.form.builder.ng.model.client.menu
Class FBMenuItem

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Panel
              extended by com.google.gwt.user.client.ui.ComplexPanel
                  extended by com.google.gwt.user.client.ui.AbsolutePanel
                      extended by org.jbpm.form.builder.ng.model.client.menu.FBMenuItem
All Implemented Interfaces:
com.allen_sauer.gwt.dnd.client.HasDragHandle, com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.HasWidgets.ForIsWidget, com.google.gwt.user.client.ui.IndexedPanel, com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget, com.google.gwt.user.client.ui.InsertPanel, com.google.gwt.user.client.ui.InsertPanel.ForIsWidget, com.google.gwt.user.client.ui.IsWidget, Iterable<com.google.gwt.user.client.ui.Widget>
Direct Known Subclasses:
AbsoluteLayoutMenuItem, AudioMenuItem, BorderLayoutMenuItem, ButtonMenuItem, CalendarMenuItem, CanvasMenuItem, CheckBoxMenuItem, ClientScriptMenuItem, ComboBoxMenuItem, CompleteButtonMenuItem, ConditionalBlockMenuItem, CSSLayoutMenuItem, CustomMenuItem, ErrorMenuItem, FieldSetLayoutMenuItem, FileInputMenuItem, FlowLayoutMenuItem, HeaderMenuItem, HiddenMenuItem, HorizontalLayoutMenuItem, HTMLMenuItem, ImageMenuItem, ImageRolodexMenuItem, LabelMenuItem, LineGraphMenuItem, LoopBlockMenuItem, MenuLayoutMenuItem, MIGLayoutMenuItem, NumberFieldMenuItem, PasswordFieldMenuItem, RadioButtonMenuItem, RangeFieldMenuItem, RichTextEditorMenuItem, ServerTransformationMenuItem, SummaryMenuItem, TabbedLayoutMenuItem, TableLayoutMenuItem, TextAreaMenuItem, TextFieldMenuItem, VerticalLayoutMenuItem, VideoMenuItem

public abstract class FBMenuItem
extends com.google.gwt.user.client.ui.AbsolutePanel
implements com.allen_sauer.gwt.dnd.client.HasDragHandle

Base class for all menu items. It's in charge of creating a FBFormItem


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.InsertPanel
com.google.gwt.user.client.ui.InsertPanel.ForIsWidget
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
FBMenuItem()
           
FBMenuItem(List<FBFormEffect> formEffects)
           
 
Method Summary
 void addAllowedEvent(String allowedEventName)
           
 void addEffect(FBFormEffect effect)
           
protected
<T extends FBFormItem>
T
build(T item)
           
abstract  FBFormItem buildWidget()
          Builds a FBFormItem.
protected
<T extends FBMenuItem>
T
clone(T item)
           
abstract  FBMenuItem cloneWidget()
          This method is like Object.clone(), but returns the proper instance and forces implementation
 List<String> getAllowedEvents()
           
 Map<String,FBScript> getAllowedEventsAsMap()
           
abstract  com.google.gwt.user.client.ui.Label getDescription()
          This method returns a description that represents the UI component this menu item creates.
 com.google.gwt.user.client.ui.Widget getDragHandle()
           
 List<FBFormEffect> getFormEffects()
           
protected abstract  com.google.gwt.resources.client.ImageResource getIconUrl()
          This method returns an icon that visually represents the UI component this menu item creates.
protected  String getIconUrlAsString()
          This method can be overriden so that you can specify at runtime the URL of an icon.
 String getItemId()
           
protected  void onLoad()
          Adjust the shim size and attach once our widget dimensions are known.
protected  void onUnload()
          Remove the shim to allow the widget to size itself when reattached.
 void repaint()
           
 void setItemSelectionHandler(FormItemSelectionHandler itemSelectionHandler)
           
 void setPixelSize(int width, int height)
          Let shim size match our size.
 void setSize(String width, String height)
          Let shim size match our size.
 
Methods inherited from class com.google.gwt.user.client.ui.AbsolutePanel
add, add, add, getWidgetLeft, getWidgetTop, insert, insert, insert, remove, setWidgetPosition, setWidgetPositionImpl
 
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, orphan, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.user.client.ui.InsertPanel.ForIsWidget
add
 
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
getWidgetIndex
 
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel
getWidget, getWidgetCount, getWidgetIndex, remove
 

Constructor Detail

FBMenuItem

public FBMenuItem()

FBMenuItem

public FBMenuItem(List<FBFormEffect> formEffects)
Method Detail

repaint

public void repaint()

getFormEffects

public List<FBFormEffect> getFormEffects()

getItemId

public String getItemId()

getDragHandle

public com.google.gwt.user.client.ui.Widget getDragHandle()
Specified by:
getDragHandle in interface com.allen_sauer.gwt.dnd.client.HasDragHandle

setPixelSize

public void setPixelSize(int width,
                         int height)
Let shim size match our size.

Overrides:
setPixelSize in class com.google.gwt.user.client.ui.UIObject
Parameters:
width - the desired pixel width
height - the desired pixel height

setSize

public void setSize(String width,
                    String height)
Let shim size match our size.

Overrides:
setSize in class com.google.gwt.user.client.ui.UIObject
Parameters:
width - the desired CSS width
height - the desired CSS height

onLoad

protected void onLoad()
Adjust the shim size and attach once our widget dimensions are known.

Overrides:
onLoad in class com.google.gwt.user.client.ui.Widget

onUnload

protected void onUnload()
Remove the shim to allow the widget to size itself when reattached.

Overrides:
onUnload in class com.google.gwt.user.client.ui.Widget

addEffect

public void addEffect(FBFormEffect effect)

getIconUrlAsString

protected String getIconUrlAsString()
This method can be overriden so that you can specify at runtime the URL of an icon.

Returns:
an URL, but it will always return null unless you override it

getIconUrl

protected abstract com.google.gwt.resources.client.ImageResource getIconUrl()
This method returns an icon that visually represents the UI component this menu item creates.

Returns:
an icon

getDescription

public abstract com.google.gwt.user.client.ui.Label getDescription()
This method returns a description that represents the UI component this menu item creates.

Returns:
a description label

clone

protected <T extends FBMenuItem> T clone(T item)

build

protected <T extends FBFormItem> T build(T item)

cloneWidget

public abstract FBMenuItem cloneWidget()
This method is like Object.clone(), but returns the proper instance and forces implementation

Returns:
a copy of this FBMenuItem object

buildWidget

public abstract FBFormItem buildWidget()
Builds a FBFormItem. Remember to assign all FBFormEffect it will need. See getFormEffects() and FBMenuItem(List) to see how to assign and get these to and from your instance.

Returns:
a FBFormItem instance.

addAllowedEvent

public void addAllowedEvent(String allowedEventName)

getAllowedEvents

public List<String> getAllowedEvents()

getAllowedEventsAsMap

public Map<String,FBScript> getAllowedEventsAsMap()

setItemSelectionHandler

public void setItemSelectionHandler(FormItemSelectionHandler itemSelectionHandler)

Form Builder NG Model 6.0.0-SNAPSHOT

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