org.drools.guvnor.client.asseteditor.drools.modeldriven.ui
Class RuleModeller

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.Composite
              extended by org.drools.guvnor.client.common.DirtyableComposite
                  extended by org.drools.guvnor.client.asseteditor.drools.modeldriven.ui.RuleModeller
All Implemented Interfaces:
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.IsRenderable, com.google.gwt.user.client.ui.IsWidget, RuleModelEditor, EditorWidget, DirtyableWidget, IDirtyable

public class RuleModeller
extends DirtyableComposite
implements RuleModelEditor

This is the parent widget that contains the model based rule builder.


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
 
Field Summary
 
Fields inherited from class org.drools.guvnor.client.common.DirtyableComposite
dirtyflag
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
RuleModeller(Asset asset, RuleModel model, RuleModellerConfiguration configuration, ModellerWidgetFactory widgetFactory, ClientFactory clientFactory, com.google.gwt.event.shared.EventBus eventBus)
           
RuleModeller(Asset asset, RuleViewer viewer, ClientFactory clientFactory, com.google.gwt.event.shared.EventBus eventBus)
           
RuleModeller(Asset asset, RuleViewer viewer, ClientFactory clientFactory, com.google.gwt.event.shared.EventBus eventBus, ModellerWidgetFactory widgetFactory)
           
 
Method Summary
protected  void doLayout()
           
 Asset getAsset()
           
 RuleModel getModel()
           
 RuleModeller getRuleModeller()
           
 SuggestionCompletionEngine getSuggestionCompletions()
           
 ModellerWidgetFactory getWidgetFactory()
           
 boolean hasVerifierErrors()
           
 boolean hasVerifierWarnings()
           
 void initWidget()
          This updates the widget to reflect the state of the model.
 boolean isDirty()
           
 boolean isTemplate()
           
 boolean isVariableNameUsed(String name)
          Returns true is a var name has already been used either by the rule, or as a global.
 boolean lockLHS()
          return true if we should not allow unfrozen editing of the LHS
 boolean lockRHS()
          return true if we should not allow unfrozen editing of the RHS
 void refreshWidget()
           
 void setWidgetFactory(ModellerWidgetFactory widgetFactory)
           
protected  void showActionSelector(com.google.gwt.user.client.ui.Widget w, Integer position)
           
protected  void showAttributeSelector()
           
protected  void showConditionSelector(Integer position)
          Pops up the fact selector.
 boolean showLHS()
           
 boolean showRHS()
           
 void verifyRule(com.google.gwt.user.client.Command cmd)
           
 void verifyRule(com.google.gwt.user.client.Command cmd, boolean forceVerification)
           
 
Methods inherited from class org.drools.guvnor.client.common.DirtyableComposite
getHeight, getWidth, makeDirty, onBrowserEvent, resetDirty
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
getWidget, initWidget, isAttached, onAttach, onDetach, performDetachedInitialization, render, render, resolvePotentialElement, setWidget, wrapElement
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, 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, setElement, setElement, setHeight, setPixelSize, setSize, 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.IsWidget
asWidget
 

Constructor Detail

RuleModeller

public RuleModeller(Asset asset,
                    RuleViewer viewer,
                    ClientFactory clientFactory,
                    com.google.gwt.event.shared.EventBus eventBus)

RuleModeller

public RuleModeller(Asset asset,
                    RuleViewer viewer,
                    ClientFactory clientFactory,
                    com.google.gwt.event.shared.EventBus eventBus,
                    ModellerWidgetFactory widgetFactory)

RuleModeller

public RuleModeller(Asset asset,
                    RuleModel model,
                    RuleModellerConfiguration configuration,
                    ModellerWidgetFactory widgetFactory,
                    ClientFactory clientFactory,
                    com.google.gwt.event.shared.EventBus eventBus)
Method Detail

doLayout

protected void doLayout()

initWidget

public void initWidget()
This updates the widget to reflect the state of the model.


showRHS

public boolean showRHS()

lockRHS

public boolean lockRHS()
return true if we should not allow unfrozen editing of the RHS


showLHS

public boolean showLHS()

lockLHS

public boolean lockLHS()
return true if we should not allow unfrozen editing of the LHS


refreshWidget

public void refreshWidget()

showAttributeSelector

protected void showAttributeSelector()

showConditionSelector

protected void showConditionSelector(Integer position)
Pops up the fact selector.


showActionSelector

protected void showActionSelector(com.google.gwt.user.client.ui.Widget w,
                                  Integer position)

getModel

public RuleModel getModel()

isVariableNameUsed

public boolean isVariableNameUsed(String name)
Returns true is a var name has already been used either by the rule, or as a global.


isDirty

public boolean isDirty()
Specified by:
isDirty in interface DirtyableWidget
Overrides:
isDirty in class DirtyableComposite

getSuggestionCompletions

public SuggestionCompletionEngine getSuggestionCompletions()

verifyRule

public void verifyRule(com.google.gwt.user.client.Command cmd)

verifyRule

public void verifyRule(com.google.gwt.user.client.Command cmd,
                       boolean forceVerification)

hasVerifierErrors

public boolean hasVerifierErrors()

hasVerifierWarnings

public boolean hasVerifierWarnings()

getWidgetFactory

public ModellerWidgetFactory getWidgetFactory()

setWidgetFactory

public void setWidgetFactory(ModellerWidgetFactory widgetFactory)

getRuleModeller

public RuleModeller getRuleModeller()
Specified by:
getRuleModeller in interface RuleModelEditor

isTemplate

public boolean isTemplate()

getAsset

public Asset getAsset()


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