|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Window | +--java.awt.Frame | +--javax.swing.JFrame | +--rule.RuleFrame
The RuleFrame
class implements the GUI and application logic
that demonstrates boolean and fuzzy rule inferencing.
Inner classes inherited from class javax.swing.JFrame |
javax.swing.JFrame.AccessibleJFrame |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AWTTreeLock |
Field Summary | |
(package private) javax.swing.JMenuItem |
AboutMenuItem
|
(package private) javax.swing.JRadioButton |
backChainRadioButton
|
(package private) java.awt.BorderLayout |
borderLayout1
|
(package private) java.awt.BorderLayout |
borderLayout2
|
(package private) static BooleanRuleBase |
bugs
|
(package private) javax.swing.JRadioButtonMenuItem |
BugsRadioButtonMenuItem
|
(package private) javax.swing.ButtonGroup |
buttonGroup
|
(package private) static RuleBase |
currentRuleBase
|
(package private) javax.swing.JMenu |
DataMenu
|
(package private) javax.swing.JMenuItem |
DefaultsMenuItem
|
(package private) javax.swing.JMenuItem |
ExitMenuItem
|
(package private) javax.swing.JMenu |
FileMenu
|
(package private) java.awt.FlowLayout |
flowLayout1
|
(package private) javax.swing.JRadioButton |
forwardChainRadioButton
|
(package private) javax.swing.JComboBox |
GoalComboBox
|
(package private) javax.swing.JMenu |
HelpMenu
|
(package private) javax.swing.JLabel |
jLabel1
|
(package private) javax.swing.JLabel |
jLabel2
|
(package private) javax.swing.JMenuBar |
jMenuBar1
|
(package private) javax.swing.JPanel |
jPanel1
|
(package private) javax.swing.JPanel |
jPanel2
|
(package private) javax.swing.JPanel |
jPanel3
|
(package private) javax.swing.JScrollPane |
jScrollPane1
|
(package private) static FuzzyRuleBase |
motor
|
(package private) javax.swing.JRadioButtonMenuItem |
MotorRadioButtonMenuItem
|
(package private) static BooleanRuleBase |
plants
|
(package private) javax.swing.JRadioButtonMenuItem |
PlantsRadioButtonMenuItem
|
(package private) javax.swing.JMenuItem |
ResetMenuItem
|
(package private) javax.swing.JTextField |
resultTextField
|
(package private) javax.swing.ButtonGroup |
ruleBaseButtonGroup
|
(package private) javax.swing.JMenu |
RuleBaseMenu
|
(package private) javax.swing.JMenuItem |
SetValuesMenuItem
|
(package private) javax.swing.JMenuItem |
StartMenuItem
|
(package private) javax.swing.JTextArea |
traceTextArea
|
(package private) static BooleanRuleBase |
vehicles
|
(package private) javax.swing.JRadioButtonMenuItem |
VehiclesRadioButtonMenuItem
|
Fields inherited from class javax.swing.JFrame |
accessibleContext,
rootPane,
rootPaneCheckingEnabled |
Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR,
DEFAULT_CURSOR,
E_RESIZE_CURSOR,
HAND_CURSOR,
icon,
ICONIFIED,
mbManagement,
menuBar,
MOVE_CURSOR,
N_RESIZE_CURSOR,
NE_RESIZE_CURSOR,
NORMAL,
NW_RESIZE_CURSOR,
ownedWindows,
resizable,
S_RESIZE_CURSOR,
SE_RESIZE_CURSOR,
SW_RESIZE_CURSOR,
TEXT_CURSOR,
title,
W_RESIZE_CURSOR,
WAIT_CURSOR |
Fields inherited from class java.awt.Window |
inputContext,
OPENED,
ownedWindowList,
state,
warningString,
windowListener |
Fields inherited from class java.awt.Container |
component,
containerListener,
layoutMgr,
ncomponents |
Fields inherited from class java.awt.Component |
actionListenerK,
adjustmentListenerK,
appContext,
background,
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
componentListener,
componentListenerK,
componentOrientation,
containerListenerK,
cursor,
dropTarget,
enabled,
eventMask,
focusListener,
focusListenerK,
font,
foreground,
hasFocus,
height,
incRate,
inputMethodListener,
inputMethodListenerK,
isInc,
isPacked,
itemListenerK,
keyListener,
keyListenerK,
LEFT_ALIGNMENT,
locale,
LOCK,
minSize,
mouseListener,
mouseListenerK,
mouseMotionListener,
mouseMotionListenerK,
newEventsOnly,
ownedWindowK,
parent,
peer,
peerFont,
popups,
prefSize,
RIGHT_ALIGNMENT,
textListenerK,
TOP_ALIGNMENT,
valid,
visible,
width,
windowListenerK,
x,
y |
Constructor Summary | |
RuleFrame()
Creates a RuleFrame object. |
Method Summary | |
(package private) void |
AboutMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Displays the About dialog. |
(package private) void |
BugsRadioButtonMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Switches to the bugs rule base. |
(package private) void |
DefaultsMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Sets the defaults. |
void |
demoBugsBC(BooleanRuleBase rb)
Sets values for the bugs backward chaining demonstration. |
void |
demoBugsFC(BooleanRuleBase rb)
Sets values for the bugs forward chaining demonstration. |
void |
demoMotorBC(FuzzyRuleBase rb)
Fuzzy rules base does not support backward chaining. |
void |
demoMotorFC(FuzzyRuleBase rb)
Sets values for the motor forward chaining demonstration. |
void |
demoPlantsBC(BooleanRuleBase rb)
Sets values for the plants backward chaining demonstration. |
void |
demoPlantsFC(BooleanRuleBase rb)
Sets values for the plants forward chaining demonstration. |
void |
demoVehiclesBC(BooleanRuleBase rb)
Sets values for the vehicles backward chaining demonstration. |
void |
demoVehiclesFC(BooleanRuleBase rb)
Sets values for the vehicles forward chaining demonstration. |
(package private) void |
ExitMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Exits the application. |
void |
initBugsRuleBase(BooleanRuleBase rb)
Initializes the Bugs rule base. |
void |
initMotorRuleBase(FuzzyRuleBase rb)
Initializes the motor rule base. |
void |
initPlantsRuleBase(BooleanRuleBase rb)
Initializes the plants rule base. |
void |
initVehiclesRuleBase(BooleanRuleBase rb)
Initializes the vehicles rule base. |
(package private) void |
MotorRadioButtonMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Switches to the motor rule base. |
(package private) void |
PlantsRadioButtonMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Switches to the plants rule base. |
protected void |
processWindowEvent(java.awt.event.WindowEvent e)
Closes or repaints the window. |
(package private) void |
ResetMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Resets the current rule base. |
(package private) void |
SetValuesMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Displays a dialog and allow the user to set variable values. |
(package private) void |
StartMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Starts the inferencing cycle. |
(package private) void |
switchRuleBase()
Changes the context from one rule base to another and clears the text areas. |
(package private) void |
VehiclesRadioButtonMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Switches to the vehicles rule base. |
Methods inherited from class javax.swing.JFrame |
addImpl,
createRootPane,
frameInit,
getAccessibleContext,
getContentPane,
getDefaultCloseOperation,
getGlassPane,
getJMenuBar,
getLayeredPane,
getRootPane,
isRootPaneCheckingEnabled,
paramString,
processKeyEvent,
setContentPane,
setDefaultCloseOperation,
setGlassPane,
setJMenuBar,
setLayeredPane,
setLayout,
setRootPane,
setRootPaneCheckingEnabled,
update |
Methods inherited from class java.awt.Frame |
|
Methods inherited from class java.awt.Window |
addOwnedWindow,
addWindowListener,
applyResourceBundle,
applyResourceBundle,
connectOwnedWindow,
dispatchEventImpl,
dispose,
eventEnabled,
getFocusOwner,
getInputContext,
getLocale,
getOwnedWindows,
getOwner,
getToolkit,
getWarningString,
isActive,
isShowing,
nextFocus,
pack,
postEvent,
postWindowEvent,
preProcessKeyEvent,
processEvent,
removeOwnedWindow,
removeWindowListener,
setFocusOwner,
show,
toBack,
toFront,
transferFocus |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
applyOrientation,
countComponents,
deliverEvent,
dispatchEventToSelf,
doLayout,
findComponentAt,
findComponentAt,
getAlignmentX,
getAlignmentY,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents_NoClientCode,
getComponents,
getInsets,
getLayout,
getMaximumSize,
getMinimumSize,
getMouseEventTarget,
getPreferredSize,
getWindow,
insets,
invalidate,
invalidateTree,
isAncestorOf,
layout,
lightweightPrint,
list,
list,
locate,
minimumSize,
paint,
paintComponents,
postsOldMouseEvents,
preferredSize,
print,
printComponents,
processContainerEvent,
proxyEnableEvents,
proxyRequestFocus,
remove,
remove,
removeAll,
removeContainerListener,
setFont,
validate,
validateTree |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
areInputMethodsEnabled,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
contains,
createImage,
createImage,
disable,
disableEvents,
dispatchEvent,
enable,
enable,
enableEvents,
enableInputMethods,
firePropertyChange,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont_NoClientCode,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputMethodRequests,
getLocation,
getLocation,
getLocationOnScreen,
getName,
getNativeContainer,
getParent_NoClientCode,
getParent,
getPeer,
getSize,
getSize,
getToolkitImpl,
getTreeLock,
getWidth,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
inside,
isDisplayable,
isDoubleBuffered,
isEnabled,
isEnabledImpl,
isFocusTraversable,
isLightweight,
isOpaque,
isValid,
isVisible,
keyDown,
keyUp,
list,
list,
list,
location,
lostFocus,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
prepareImage,
prepareImage,
printAll,
processComponentEvent,
processFocusEvent,
processInputMethodEvent,
processMouseEvent,
processMouseMotionEvent,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removePropertyChangeListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
resize,
resize,
setBackground,
setBounds,
setBounds,
setComponentOrientation,
setCursor,
setDropTarget,
setEnabled,
setForeground,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
setVisible,
show,
size,
toString,
transferFocus |
Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
java.awt.BorderLayout borderLayout1
javax.swing.JMenuBar jMenuBar1
javax.swing.JMenu FileMenu
javax.swing.JMenuItem StartMenuItem
javax.swing.JMenuItem ResetMenuItem
javax.swing.JMenuItem ExitMenuItem
javax.swing.JMenu DataMenu
javax.swing.JMenuItem DefaultsMenuItem
javax.swing.JMenuItem SetValuesMenuItem
javax.swing.JPanel jPanel1
javax.swing.JPanel jPanel2
javax.swing.JPanel jPanel3
javax.swing.JScrollPane jScrollPane1
javax.swing.JTextArea traceTextArea
javax.swing.JRadioButton forwardChainRadioButton
javax.swing.JRadioButton backChainRadioButton
javax.swing.ButtonGroup buttonGroup
javax.swing.JLabel jLabel1
javax.swing.JLabel jLabel2
javax.swing.JTextField resultTextField
java.awt.FlowLayout flowLayout1
java.awt.BorderLayout borderLayout2
javax.swing.JMenu HelpMenu
javax.swing.JMenuItem AboutMenuItem
javax.swing.JMenu RuleBaseMenu
javax.swing.JRadioButtonMenuItem VehiclesRadioButtonMenuItem
javax.swing.JRadioButtonMenuItem BugsRadioButtonMenuItem
javax.swing.JRadioButtonMenuItem PlantsRadioButtonMenuItem
javax.swing.JRadioButtonMenuItem MotorRadioButtonMenuItem
javax.swing.ButtonGroup ruleBaseButtonGroup
javax.swing.JComboBox GoalComboBox
static BooleanRuleBase bugs
static BooleanRuleBase plants
static BooleanRuleBase vehicles
static FuzzyRuleBase motor
static RuleBase currentRuleBase
Constructor Detail |
public RuleFrame()
RuleFrame
object.Method Detail |
protected void processWindowEvent(java.awt.event.WindowEvent e)
e
- the WindowEvent object generated when window is closed or
activatedpublic void initBugsRuleBase(BooleanRuleBase rb)
rb
- the BooleanRuleBase object to be initializedpublic void initPlantsRuleBase(BooleanRuleBase rb)
rb
- the BooleanRuleBase object to be initializedpublic void initVehiclesRuleBase(BooleanRuleBase rb)
rb
- the BooleanRuleBase object to be initializedpublic void initMotorRuleBase(FuzzyRuleBase rb)
rb
- the FuzzyRuleBase object to be initializedpublic void demoVehiclesFC(BooleanRuleBase rb)
rb
- the BooleanRuleBase object set for forward chainingpublic void demoVehiclesBC(BooleanRuleBase rb)
rb
- the BooleanRuleBase object set for backward chainingpublic void demoBugsBC(BooleanRuleBase rb)
rb
- the BooleanRuleBase object set for backward chainingpublic void demoBugsFC(BooleanRuleBase rb)
rb
- the BooleanRuleBase object set for forward chainingpublic void demoPlantsBC(BooleanRuleBase rb)
rb
- the BooleanRuleBase object set for backward chainingpublic void demoPlantsFC(BooleanRuleBase rb)
rb
- the BooleanRuleBase object set for forward chainingpublic void demoMotorBC(FuzzyRuleBase rb)
rb
- the FuzzyRuleBase objectpublic void demoMotorFC(FuzzyRuleBase rb)
rb
- the FuzzyRuleBase object set for forward chainingvoid StartMenuItem_actionPerformed(java.awt.event.ActionEvent e)
e
- the ActionEvent object generated when start was selectedvoid ResetMenuItem_actionPerformed(java.awt.event.ActionEvent e)
e
- the ActionEvent object generated when reset was selectedvoid ExitMenuItem_actionPerformed(java.awt.event.ActionEvent e)
e
- the ActionEvent object generated when exit was selectedvoid SetValuesMenuItem_actionPerformed(java.awt.event.ActionEvent e)
e
- the ActionEvent object generated when the set values was selectedvoid DefaultsMenuItem_actionPerformed(java.awt.event.ActionEvent e)
e
- the ActionEvent object generated when default was selectedvoid switchRuleBase()
void AboutMenuItem_actionPerformed(java.awt.event.ActionEvent e)
e
- the ActionEvent object generated when About was selectedvoid VehiclesRadioButtonMenuItem_actionPerformed(java.awt.event.ActionEvent e)
e
- the ActionEvent object generated when the vehicles button was clickedvoid BugsRadioButtonMenuItem_actionPerformed(java.awt.event.ActionEvent e)
e
- the ActionEvent object generated when the bugs button was clickedvoid PlantsRadioButtonMenuItem_actionPerformed(java.awt.event.ActionEvent e)
e
- the ActionEvent object generated when the plants button was clickedvoid MotorRadioButtonMenuItem_actionPerformed(java.awt.event.ActionEvent e)
e
- the ActionEvent object generated when the motor button was clicked
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |