|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.geom.RectangularShape
java.awt.geom.Ellipse2D
java.awt.geom.Ellipse2D.Float
drvgraph.j2d.Rule
public class Rule
Represents the rule.
Rules consist of a body and a head. The former represents the "IF"
part of the rule and consists of one or more atomic formulae, while the
latter represents the "THEN" part of the rule and consists of a single
atomic formula.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.geom.Ellipse2D |
|---|
java.awt.geom.Ellipse2D.Double, java.awt.geom.Ellipse2D.Float |
| Field Summary | |
|---|---|
static java.lang.String |
DEFEASIBLERULE
Defeasible rule type. |
static java.lang.String |
DEFEATER
Defeater rule type. |
static java.lang.String |
STRICTRULE
Strict rule type. |
| Fields inherited from class java.awt.geom.Ellipse2D.Float |
|---|
height, width, x, y |
| Constructor Summary | |
|---|---|
Rule()
Constructs an empty strict rule with no name. |
|
Rule(java.lang.String ruleId)
Constructs a new strict rule with a given name (rule ID). |
|
Rule(java.lang.String ruleId,
java.lang.String ruleType)
Constructs a new rule with a given name (rule ID) and a specified rule type. |
|
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object another)
Compares this rule with a given rule. |
java.lang.String |
getRuleId()
Returns the rule ID. |
java.lang.String |
getRuleType()
Returns the rule type. |
boolean |
isSelected()
Checks if the rule is selected. |
void |
paint(java.awt.Graphics g)
Draws the rule circle. |
void |
setRuleId(java.lang.String ruleId)
Sets the rule ID. |
void |
setRuleType(java.lang.String ruleType)
Sets the rule type. |
void |
setSelected(boolean b)
Sets the "selected" status of the rule. |
| Methods inherited from class java.awt.geom.Ellipse2D.Float |
|---|
getBounds2D, getHeight, getWidth, getX, getY, isEmpty, setFrame, setFrame |
| Methods inherited from class java.awt.geom.Ellipse2D |
|---|
contains, contains, equals, getPathIterator, hashCode, intersects |
| Methods inherited from class java.awt.geom.RectangularShape |
|---|
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String STRICTRULE
public static final java.lang.String DEFEASIBLERULE
public static final java.lang.String DEFEATER
| Constructor Detail |
|---|
public Rule()
public Rule(java.lang.String ruleId)
ruleId - the string representing the rule ID
public Rule(java.lang.String ruleId,
java.lang.String ruleType)
ruleType - the string representing the rule typeruleId - the string representing the rule ID| Method Detail |
|---|
public void setSelected(boolean b)
b - the "selected" status flag (true|false)public boolean isSelected()
public void paint(java.awt.Graphics g)
g - the Graphics component that draws the rule circleGraphics
public int compareTo(java.lang.Object another)
throws java.lang.ClassCastException
compareTo in interface java.lang.Comparableanother - the rule to compare this rule to
java.lang.ClassCastException - A ClassCastException is thrown if the
Object to compare this object to belongs to a different class.public java.lang.String getRuleId()
public void setRuleId(java.lang.String ruleId)
ruleId - the rule ID value to set.public java.lang.String getRuleType()
public void setRuleType(java.lang.String ruleType)
ruleType - the rule type to set.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||