org.drools.eclipse.rulebuilder.ui
Class DSLSentenceWidget

java.lang.Object
  extended by org.drools.eclipse.rulebuilder.ui.Widget
      extended by org.drools.eclipse.rulebuilder.ui.DSLSentenceWidget
Direct Known Subclasses:
LHSDSLSentenceWidget, RHSDSLSentenceWidget

public abstract class DSLSentenceWidget
extends Widget

This displays a widget to edit a DSL sentence.


Field Summary
protected  org.drools.ide.common.client.modeldriven.SuggestionCompletionEngine completions
           
 
Fields inherited from class org.drools.eclipse.rulebuilder.ui.Widget
index, modeller, parent, toolkit
 
Constructor Summary
DSLSentenceWidget(org.eclipse.ui.forms.widgets.FormToolkit toolkit, org.eclipse.swt.widgets.Composite parent, org.drools.ide.common.client.modeldriven.brl.DSLSentence sentence, RuleModeller modeller, int index)
           
 
Method Summary
 ModelWidget addBox(org.eclipse.swt.widgets.Composite parent, String variableDef, String regex)
           
 ModelWidget addCheckbox(org.eclipse.swt.widgets.Composite parent, String variableDef)
           
 ModelWidget addDateSelector(org.eclipse.swt.widgets.Composite parent, String variableDef)
           
 ModelWidget addVariable(org.eclipse.swt.widgets.Composite parent, String currVariable)
           
 org.eclipse.swt.widgets.Composite makeWidgets(String dslLine)
          This will take a DSL line item, and split it into widget thingamies for displaying.
protected abstract  void updateModel()
           
protected  void updateSentence()
          This will go through the widgets and extract the values
 
Methods inherited from class org.drools.eclipse.rulebuilder.ui.Widget
addDeleteRHSAction, addImage, getModeller, showMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

completions

protected org.drools.ide.common.client.modeldriven.SuggestionCompletionEngine completions
Constructor Detail

DSLSentenceWidget

public DSLSentenceWidget(org.eclipse.ui.forms.widgets.FormToolkit toolkit,
                         org.eclipse.swt.widgets.Composite parent,
                         org.drools.ide.common.client.modeldriven.brl.DSLSentence sentence,
                         RuleModeller modeller,
                         int index)
Method Detail

updateModel

protected abstract void updateModel()

makeWidgets

public org.eclipse.swt.widgets.Composite makeWidgets(String dslLine)
This will take a DSL line item, and split it into widget thingamies for displaying. One day, if this is too complex, this will have to be done on the server side.

Returns:

addVariable

public ModelWidget addVariable(org.eclipse.swt.widgets.Composite parent,
                               String currVariable)

addBox

public ModelWidget addBox(org.eclipse.swt.widgets.Composite parent,
                          String variableDef,
                          String regex)

addCheckbox

public ModelWidget addCheckbox(org.eclipse.swt.widgets.Composite parent,
                               String variableDef)

addDateSelector

public ModelWidget addDateSelector(org.eclipse.swt.widgets.Composite parent,
                                   String variableDef)

updateSentence

protected void updateSentence()
This will go through the widgets and extract the values



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