Class IlrWSyntacticEditor
- java.lang.Object
-
- ilog.webui.dhtml.IlxWContainer
-
- ilog.webui.dhtml.IlxWComponent
-
- ilog.rules.webui.IlrWSyntacticEditor
-
- All Implemented Interfaces:
IlxWConstants,IlxWCSSModelProvider,IlxWDependencyProvider,IlxWJSObject,Serializable
@Deprecated public class IlrWSyntacticEditor extends IlxWComponent implements IlxWConstants
Deprecated.IlrWSyntacticEditorOverview
The Web Rule Editor can be integrated into your web application to provide business rule
editAllModecapabilities.The Web Rule Editor is associated with a token model that represents the business rules to be edited.
Code example
The following code example shows you how to create and initialize a syntactic editor:
private IlrWSyntacticEditor initializeSyntacticEditor(IlrSession rtsSession ,HttpSession session, IlrActionRule rule) throws IlrConnectException, IlrApplicationException, FileNotFoundException, IOException { IlxWManager manager = IlxWManager.getManager(session); IlrWSyntacticEditor syntacticEditor; synchronized (manager) { syntacticEditor = (IlrWSyntacticEditor) manager.getComponentNamed(EDITORNAME); if (syntacticEditor == null) { syntacticEditor = new IlrWSyntacticEditor(); syntacticEditor.setName(EDITORNAME); manager.add(syntacticEditor); } IlrWBRLSyntacticRuleElement ruleElement = getRuleElement(rtsSession, rule); syntacticEditor.setBRLRuleElement(ruleElement,rtsSession.getReferenceLocale()); syntacticEditor.setAttribute(ACTION_RULE_UUID_ATTRIBUTE_NAME, rule.getUuid()); syntacticEditor.setAuthorRules(new IlxWCSSRuleset(new InputStreamReader(RuleEditor.class.getClassLoader().getResourceAsStream("syntacticeditor.css") ))); //$NON-NLS-1$ } return syntacticEditor; }
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ilog.webui.dhtml.IlxWComponent
IlxWComponent.DynamicStyleMap
-
-
Field Summary
Fields Modifier and Type Field Description static StringCSS_RESOURCE_NAMEDeprecated.Resource path to the user-agent CSS.-
Fields inherited from class ilog.webui.dhtml.IlxWContainer
listenerList
-
Fields inherited from interface ilog.webui.dhtml.IlxWConstants
ATTR_CONFIG_RESNAME, ATTR_EXCEPTION, ATTR_IE5UPDATE, ATTR_MODIFIERS, ATTR_OPENPORT, ATTR_REQUESTPATH, ATTR_UPDATEREQUEST_LIST, ATTRIBUTE_SERVICE, CID_PREFIX, DATE_FORMAT_DATE, DATE_FORMAT_DATETIME, DATE_FORMAT_TIME, HTML_ESCAPE, ILRIFRAME, IMGID_PREFIX, MIME_APPLICATION_JAVASCRIPT, MIME_IMAGE_GIF, MIME_IMAGE_JPG, MIME_TEXT_HTML, NO_ESCAPE, PARAM_CONTROLLER_PATH, PARAM_DATA, PARAM_PORT, PARAM_RESOURCE_MANAGER_PATH, PARAM_SERVICE, PARAM_SERVLET_CONTEXT_DELEGATE, PARAM_VIEW_PATH, PROP_ACTION, PROP_AFTER, PROP_ALIGN, PROP_BACKGROUND_COLOR, PROP_BEFORE, PROP_BORDER, PROP_BORDER_BOTTOM, PROP_BORDER_COLOR, PROP_BORDER_LEFT, PROP_BORDER_RIGHT, PROP_BORDER_STYLE, PROP_BORDER_TOP, PROP_BORDER_WIDTH, PROP_BOTTOM_RIGHT_ICON, PROP_CELL_PADDING, PROP_CELL_SPACING, PROP_CHECKMENU_ICON, PROP_COLOR, PROP_COLS, PROP_COLUMNS, PROP_CURSOR, PROP_DATE_FORMAT, PROP_DHTML, PROP_EMPTY_TEXT, PROP_ENABLED, PROP_FILTER, PROP_FONT, PROP_FONT_FAMILY, PROP_FONT_SIZE, PROP_FONT_STYLE, PROP_FONT_WEIGHT, PROP_HEIGHT, PROP_ICON, PROP_ICON_TEXT_GAP, PROP_INNER_HTML, PROP_ITEM_HEIGHT, PROP_LINE_HEIGHT, PROP_MIME_TYPE, PROP_MINUS_SQUARE_ICON, PROP_NOWRAP, PROP_ONMOUSEOUT, PROP_ONMOUSEOVER, PROP_OVERFLOW, PROP_PADDING, PROP_PATH, PROP_PLUS_SQUARE_ICON, PROP_POSTPONED, PROP_RIGHT_ICON, PROP_ROOT_VISIBLE, PROP_ROWS, PROP_SELECTED, PROP_SELECTED_INDEX, PROP_SELECTION_BACKGROUND_COLOR, PROP_SELECTION_COLOR, PROP_SHOW_HORIZONTAL_LINES, PROP_SHOW_VERTICAL_LINES, PROP_SHOWS_ROOT_HANDLES, PROP_SQUARE_ICON, PROP_SUBMENU_ICON, PROP_TAB_PLACEMENT, PROP_TEXT, PROP_TEXT_DECORATION, PROP_TEXT_POSITION, PROP_TOOLTIP, PROP_TOP_BOTTOM_ICON, PROP_TOP_BOTTOM_RIGHT_ICON, PROP_TOP_RIGHT_ICON, PROP_TOP_ROW, PROP_TOTAL_ROW_COUNT, PROP_VALIGN, PROP_VISIBLE_ROW_COUNT, PROP_WIDTH, SERVICE_BLANKPAGE, SERVICE_BLANKPAGE_INT, SERVICE_COMMAND, SERVICE_COMMAND_INT, SERVICE_FORWARD, SERVICE_FORWARD_INT, SERVICE_SERIALIZE, SERVICE_SERIALIZE_INT, TARGET_IFRAME, TARGET_SELF, VAR_PREFIX, WEB_ALREADY_ATTACHED, WEB_MISSING_OPENPORT, WEB_NULL_MANAGER, XML_ESCAPE
-
-
Constructor Summary
Constructors Constructor Description IlrWSyntacticEditor()Deprecated.Constructs a new Web Rule Editor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddTokenStyle(Vector tokens, String styleName)Deprecated.Adds a style to a set of edited tokens.booleancanRedo()Deprecated.Specifies whether the redo action is possible.booleancanUndo()Deprecated.Specifies whether the 'undo' action is possible.voidclearTokenStyles(String styleName)Deprecated.Removes a style from a set of edited tokens.voidclearTokenStyles(Vector tokens, String styleName)Deprecated.Removes a style from a set of edited tokens.IlrWBRLSyntacticRuleElementgetBRLRuleElement()Deprecated.Gets the rule currently edited by this rule editor.LocalegetLocale()Deprecated.Gets the locale in which the current rule is edited.intgetUndoLimit()Deprecated.Gets the undo limit.protected IlxWCSSRulesetgetUserAgentRules()Deprecated.Gets the "user-agent" CSS rules.IlrBRLVariableProvidergetVariableProvider()Deprecated.Gets the variable provider used, if any.booleanisAutoEditMode()Deprecated.Gets the automatic edit mode property.booleanisDHtml(IlxWPort port)Deprecated.Gets the value of theDHTMLproperty.booleanisEditable()Deprecated.Returns the value of the Editable property.protected voidmake(IlxWPort port)Deprecated.protected voidprintComponent(IlxWPort port)Deprecated.Redefines theIlxWComponent.printComponentmethod.voidredo()Deprecated.Redo action.voidsetAutoEditMode(boolean auto)Deprecated.Sets the automatic edit mode property.voidsetBRLRuleElement(IlrBRLRuleElement ruleElement, IlrVocabulary vocabulary)Deprecated.voidsetBRLRuleElement(IlrWBRLSyntacticRuleElement ruleElement, Locale locale)Deprecated.Sets the rule to be edited by this rule editor and the locale in which the element must be edited.voidsetDHtml(boolean dhtml)Deprecated.Sets the value of theDHTMLproperty.voidsetEditable(boolean editable)Deprecated.Sets the Editable property.voidsetUndoLimit(int limit)Deprecated.Sets the undo limit.voidsetVariableProvider(IlrBRLVariableProvider variableProvider)Deprecated.Sets the variable provider to be used.voidundo()Deprecated.Undo action.-
Methods inherited from class ilog.webui.dhtml.IlxWComponent
addPropertyChangeListener, addPropertyChangeListener, detach, doPrint, firePropertyChange, firePropertyChange, getName, getRealHtmlTagName, getStyle, invalidate, isInvalidated, notifyDependencies, print, removePropertyChangeListener, removePropertyChangeListener, setName, validate
-
Methods inherited from class ilog.webui.dhtml.IlxWContainer
add, add, getAttribute, getAttributeNames, getComponent, getComponentCount, getComponentNamed, getComponents, getManager, getParent, indexOf, isAncestorOf, remove, remove, removeAll, removeAttribute, setAttribute, setAuthorRules, setFinalizer
-
-
-
-
Field Detail
-
CSS_RESOURCE_NAME
public static final String CSS_RESOURCE_NAME
Deprecated.Resource path to the user-agent CSS.- See Also:
- Constant Field Values
-
-
Method Detail
-
setDHtml
public void setDHtml(boolean dhtml)
Deprecated.Sets the value of theDHTMLproperty.When this property is
trueand the browser has DHTML capabilities, the editor is displayed with a smart user interface, using some advanced features of the DHTML capabilities provided by the Web browser. By default, this flag istruewith IE5.x, andfalsewith other Web browsers, like Netscape 3 or Netscape 4.If the browser does not support this mode, setting this flag has no effect.
- Parameters:
dhtml- The new value of theDHTMLproperty.- See Also:
isDHtml(ilog.webui.dhtml.IlxWPort)
-
isDHtml
public boolean isDHtml(IlxWPort port)
Deprecated.Gets the value of the
DHTMLproperty.- Returns:
trueif the Web Rule Editor is in DHTML mode and the browser supports this mode;falseotherwise.- See Also:
setDHtml(boolean)
-
isEditable
public boolean isEditable()
Deprecated.Returns the value of the Editable property.
-
setEditable
public void setEditable(boolean editable)
Deprecated.Sets the Editable property.
This property manages the editAllMode mode. When
true, the token model can be modified. Whenfalse, the editor is in read-only mode.The default value for this property is
true.
-
printComponent
protected void printComponent(IlxWPort port) throws IOException
Deprecated.Redefines the
IlxWComponent.printComponentmethod.- Specified by:
printComponentin classIlxWComponent- Parameters:
port- The port on which the component will be printed.- Throws:
IOException- See Also:
IlxWComponent.print(ilog.webui.dhtml.IlxWPort)
-
addTokenStyle
public void addTokenStyle(Vector tokens, String styleName)
Deprecated.Adds a style to a set of edited tokens.
- Parameters:
tokens- AVectorcontaining editedIlrTokenobjects.styleName- The name of a style defined in the current graphic resources.- See Also:
clearTokenStyles(Vector, String)
-
clearTokenStyles
public void clearTokenStyles(Vector tokens, String styleName)
Deprecated.Removes a style from a set of edited tokens.
- Parameters:
tokens- AVectorcontaining editedIlrTokenobjects.styleName- The name of a style defined in the current graphic resources.- See Also:
addTokenStyle(Vector, String)
-
clearTokenStyles
public void clearTokenStyles(String styleName)
Deprecated.Removes a style from a set of edited tokens.
- Parameters:
styleName- The name of a style defined in the current graphic resources.- See Also:
addTokenStyle(Vector, String)
-
setBRLRuleElement
public void setBRLRuleElement(IlrWBRLSyntacticRuleElement ruleElement, Locale locale)
Deprecated.Sets the rule to be edited by this rule editor and the locale in which the element must be edited.- Parameters:
ruleElement- The rule to be edited.locale- The locale in which the rule should be edited.
-
getBRLRuleElement
public IlrWBRLSyntacticRuleElement getBRLRuleElement()
Deprecated.Gets the rule currently edited by this rule editor.- Returns:
- The edited rule.
-
getLocale
public Locale getLocale()
Deprecated.Gets the locale in which the current rule is edited.- Returns:
- The locale in which the current rule is edited.
-
setBRLRuleElement
public void setBRLRuleElement(IlrBRLRuleElement ruleElement, IlrVocabulary vocabulary)
Deprecated.Sets the rule to be edited by this rule editor.- Parameters:
ruleElement- The rule to be edited.
-
setVariableProvider
public void setVariableProvider(IlrBRLVariableProvider variableProvider)
Deprecated.Sets the variable provider to be used.- Parameters:
variableProvider- The variable provider.
-
getVariableProvider
public IlrBRLVariableProvider getVariableProvider()
Deprecated.Gets the variable provider used, if any.- Returns:
- The variable provider used, if any.
-
isAutoEditMode
public boolean isAutoEditMode()
Deprecated.Gets the automatic edit mode property.
If this property is
trueand thedhtmlproperty is false, the editAllMode mode of a line of the Web Rule Editor (editable or read-only) will be automatically computed. Otherwise it will be read-only by default, and editable if the user clicks on the "edit mode" icon at the end of the line.- Returns:
- the value of the auto edit mode property.
-
setAutoEditMode
public void setAutoEditMode(boolean auto)
Deprecated.Sets the automatic edit mode property.
- See Also:
isAutoEditMode()
-
make
protected void make(IlxWPort port) throws IOException
Deprecated.- Throws:
IOException
-
getUserAgentRules
protected IlxWCSSRuleset getUserAgentRules()
Deprecated.Description copied from class:IlxWContainerGets the "user-agent" CSS rules.
User agent rules are a set of CSS rules which will apply by default to each instance of this container. They may be completed or overridden by the author rules, set via thesetAuthorRulesmethod.This method returns
nullby default but is intended to be redefined by subclasses.- Overrides:
getUserAgentRulesin classIlxWContainer- Returns:
- a CSS ruleset.
- See Also:
IlxWContainer.setAuthorRules(ilog.webui.dhtml.IlxWCSSRuleset)
-
setUndoLimit
public void setUndoLimit(int limit)
Deprecated.Sets the undo limit.
By default the undo limit is set to 100.
- Parameters:
limit- The new undo limit (an integer greater or equal to 0).- See Also:
getUndoLimit()
-
getUndoLimit
public int getUndoLimit()
Deprecated.Gets the undo limit.
- Returns:
- the undo limit.
- See Also:
setUndoLimit(int)
-
undo
public void undo()
Deprecated.Undo action.If the undo is not possible, this method has no effect.
-
canUndo
public boolean canUndo()
Deprecated.Specifies whether the 'undo' action is possible.
-
redo
public void redo()
Deprecated.Redo action.If the redo is not possible, this method has no effect.
-
canRedo
public boolean canRedo()
Deprecated.Specifies whether the redo action is possible.
-
-