org.drools.guvnor.client.modeldriven.ui
Class RuleModeller
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
org.drools.guvnor.client.common.DirtyableComposite
org.drools.guvnor.client.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.IsWidget, DirtyableWidget, IDirtyable, RuleModelEditor, EditorWidget
public class RuleModeller
- extends DirtyableComposite
- implements RuleModelEditor
This is the parent widget that contains the model based rule builder.
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 |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
DEBUG_ID_PREFIX |
Method Summary |
protected void |
addActionSetField(String itemText,
int position)
|
protected void |
addCallMethod(String itemText,
int position)
|
protected void |
addModify(String itemText,
int position)
|
protected void |
addNewCE(String s,
int position)
|
protected void |
addNewDSLLhs(DSLSentence sentence,
int position)
|
protected void |
addNewDSLRhs(DSLSentence sentence,
int position)
|
protected void |
addNewFact(String itemText,
int position)
Adds a fact to the model, and then refreshes the display. |
protected void |
addNewFCE(String type,
int position)
|
protected void |
addRetract(String var,
int position)
|
RuleAsset |
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(com.google.gwt.user.client.ui.Widget w,
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 com.google.gwt.user.client.ui.Composite |
getWidget, initWidget, isAttached, onAttach, onDetach, setWidget |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
addAttachHandler, 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, toString, unsinkEvents |
Methods inherited from interface com.google.gwt.user.client.ui.IsWidget |
asWidget |
RuleModeller
public RuleModeller(RuleAsset asset,
RuleViewer viewer,
ModellerWidgetFactory widgetFactory)
RuleModeller
public RuleModeller(RuleAsset asset,
ModellerWidgetFactory widgetFactory)
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(com.google.gwt.user.client.ui.Widget w,
Integer position)
- Pops up the fact selector.
addNewDSLLhs
protected void addNewDSLLhs(DSLSentence sentence,
int position)
showActionSelector
protected void showActionSelector(com.google.gwt.user.client.ui.Widget w,
Integer position)
addModify
protected void addModify(String itemText,
int position)
addNewDSLRhs
protected void addNewDSLRhs(DSLSentence sentence,
int position)
addRetract
protected void addRetract(String var,
int position)
addActionSetField
protected void addActionSetField(String itemText,
int position)
addCallMethod
protected void addCallMethod(String itemText,
int position)
addNewCE
protected void addNewCE(String s,
int position)
addNewFCE
protected void addNewFCE(String type,
int position)
addNewFact
protected void addNewFact(String itemText,
int position)
- Adds a fact to the model, and then refreshes the display.
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 RuleAsset getAsset()
Copyright © 2001-2011 JBoss Inc.. All Rights Reserved.