Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.able.rules
Class AbleRuleSetEditor

    java.lang.Object
      java.awt.Component
          java.awt.Container
              javax.swing.JComponent
                  javax.swing.JPanel
                      com.ibm.able.rules.AbleRuleSetEditor

All Implemented Interfaces:
  AbleCustomizer, javax.accessibility.Accessible, java.beans.Customizer, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.io.Serializable

public class AbleRuleSetEditor
extends javax.swing.JPanel
implements AbleCustomizer, java.awt.event.MouseListener

This class contains the Able Ruleset Editor panel.

This object can be run from the command line, in which case the main() method will create an new, empty AbleRuleSet that can be saved as a serialized bean. When called as a regular bean customizer, the setObject() method must be called specifying the AbleRuleSet object that is to be customized. Being a "customizer", this object implements the "Customizer" interface, but note that no property change events are fired from this object. However, the AbleRuleSet object being customized may itself fire such events.

See Also:
  Serialized Form

Nested Class Summary
`class` | `AbleRuleSetEditor.XAppCloser` To shutdown when run as an application.

Nested classes inherited from class javax.swing.JPanel
`javax.swing.JPanel.AccessibleJPanel`

Nested classes inherited from class javax.swing.JComponent
`javax.swing.JComponent.AccessibleJComponent`

Nested classes inherited from class java.awt.Container
`java.awt.Container.AccessibleAWTContainer`

Nested classes inherited from class java.awt.Component
`java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy`

Field Summary
`protected java.io.File` | `myCurrentDir`
`protected javax.swing.JFileChooser` | `myFileDialog`
`protected int` | `myFileOption`
`protected javax.swing.event.UndoableEditListener` | `myUndoHandler` Listener for the edits on the current document.
`protected javax.swing.undo.UndoManager` | `myUndoManager` UndoManager to which we add edits.

Fields inherited from class javax.swing.JComponent
`accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW`

Fields inherited from class java.awt.Component
`BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT`

Fields inherited from interface java.awt.image.ImageObserver
`ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

Constructor Summary
`AbleRuleSetEditor()`

Method Summary
`void` | `addPropertyChangeListener(java.beans.PropertyChangeListener theListener)` Add a property change listener to this object.
`protected void` | `debugTrace(java.lang.String theMessage)` Log a trace message.
`protected void` | `exitCustomizer(int buttonOptions)` Gracefully exit the customizer.
`protected javax.swing.text.JTextComponent` | `getEditor()` Fetch the editor contained in this panel.
`protected java.awt.Frame` | `getFrame()` Find the hosting frame, for the file-chooser dialog, and for setting the title.
`protected java.awt.Window` | `getWindow_()` This method is used by those routines that display dialog boxes so that the box can be displayed relative to our parent component.
`protected boolean` | `isRegularFrame()` We use this to determine whether we are in some sort of Dialog window or a regular (J)Frame.
`static void` | `main(java.lang.String[] theArgs)` Called thru the command line or from AbleRuleSetEditorLauncher main() method.
`void` | `mouseClicked(java.awt.event.MouseEvent theEvent)` Handle a popup menu request
`void` | `mouseEntered(java.awt.event.MouseEvent theEvent)`
`void` | `mouseExited(java.awt.event.MouseEvent theEvent)`
`void` | `mousePressed(java.awt.event.MouseEvent theEvent)`
`void` | `mouseReleased(java.awt.event.MouseEvent theEvent)`
`void` | `removePropertyChangeListener(java.beans.PropertyChangeListener theListener)` Remove a property change listener from this object.
`protected void` | `saveEditorFramePreferences()` Save the location and size of the rule editor frame.
`protected void` | `saveExceptionFramePreferences()` Save the location and size of the exception frame.
`protected void` | `saveFramePreferences()` Save the locations and sizes of each frame in the preferences file.
`protected void` | `saveHelpFramePreferences()` Save the location and size of the help frame.
`protected void` | `saveOutputFramePreferences()` Save the location and size of the output frame.
`protected void` | `saveSetViewerFramePreferences()` Save the location and size of the set viewer frame.
`protected void` | `saveXmlFramePreferences()` Save the location and size of the XML frame.
`void` | `setEnteredThruMain()`
`void` | `setObject(java.lang.Object theRuleSet)` Save a reference to the object that is being customized.
`void` | `updateObject()` This is an "OK" from a JDialog box thrown up by the AbleCustomizerDialog class.
`protected void` | `xferFileNames()` Transfer the current "source", "serial", and "xml" file names to the object being customized.

Methods inherited from class javax.swing.JPanel
`getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI`

Methods inherited from class javax.swing.JComponent
`addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update`

Methods inherited from class java.awt.Container
`add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree`

Methods inherited from class java.awt.Component
`action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### myFileDialog

    protected javax.swing.JFileChooser myFileDialog

### myFileOption

    protected int myFileOption

### myCurrentDir

    protected java.io.File myCurrentDir

### myUndoHandler

    protected javax.swing.event.UndoableEditListener myUndoHandler

  Listener for the edits on the current document.

### myUndoManager

    protected javax.swing.undo.UndoManager myUndoManager

  UndoManager to which we add edits.

Constructor Detail

### AbleRuleSetEditor

    public AbleRuleSetEditor()

Method Detail

### setEnteredThruMain

    public void setEnteredThruMain()

### addPropertyChangeListener

    public void addPropertyChangeListener(java.beans.PropertyChangeListener theListener)

  Add a property change listener to this object.

  Specified by:
    `addPropertyChangeListener` in interface `java.beans.Customizer`
  Parameters:
    `theListener` - the property change listener to be added to this object.

### removePropertyChangeListener

    public void removePropertyChangeListener(java.beans.PropertyChangeListener theListener)

  Remove a property change listener from this object.

  Specified by:
    `removePropertyChangeListener` in interface `java.beans.Customizer`
  Parameters:
    `theListener` - the property change listener to be removed from this object.

### setObject

    public void setObject(java.lang.Object theRuleSet)

  Save a reference to the object that is being customized.

  Specified by:
    `setObject` in interface `java.beans.Customizer`
  Parameters:
    `theRuleSet` - The AbleRuleSet object that is to be changed.

### updateObject

    public void updateObject()
                      throws AbleException

  This is an "OK" from a JDialog box thrown up by the AbleCustomizerDialog class.

  Specified by:
    `updateObject` in interface `AbleCustomizer`
  Throws:
    `AbleException`

### mouseClicked

    public void mouseClicked(java.awt.event.MouseEvent theEvent)

  Handle a popup menu request

  Specified by:
    `mouseClicked` in interface `java.awt.event.MouseListener`

### mouseEntered

    public void mouseEntered(java.awt.event.MouseEvent theEvent)

  Specified by:
    `mouseEntered` in interface `java.awt.event.MouseListener`

### mouseExited

    public void mouseExited(java.awt.event.MouseEvent theEvent)

  Specified by:
    `mouseExited` in interface `java.awt.event.MouseListener`

### mousePressed

    public void mousePressed(java.awt.event.MouseEvent theEvent)

  Specified by:
    `mousePressed` in interface `java.awt.event.MouseListener`

### mouseReleased

    public void mouseReleased(java.awt.event.MouseEvent theEvent)

  Specified by:
    `mouseReleased` in interface `java.awt.event.MouseListener`

### debugTrace

    protected void debugTrace(java.lang.String theMessage)

  Log a trace message.

  Parameters:
    `theMessage` - A String containing text to be traced.

### getEditor

    protected javax.swing.text.JTextComponent getEditor()

  Fetch the editor contained in this panel.

### xferFileNames

    protected void xferFileNames()

  Transfer the current "source", "serial", and "xml" file names to the object being customized.

### getFrame

    protected java.awt.Frame getFrame()

  Find the hosting frame, for the file-chooser dialog, and for setting the title.

### getWindow_

    protected java.awt.Window getWindow_()

  This method is used by those routines that display dialog boxes so that the box can be displayed relative to our parent component.

### isRegularFrame

    protected boolean isRegularFrame()

  We use this to determine whether we are in some sort of Dialog window or a regular (J)Frame.

  If we are in a dialog box, we don't honor any exit requests from the user.

  Otherwise, we assume that we've been put in a frame that can be disposed of, and we will indeed dispose of ourselves when the user presses exit! We will also save parent frame location and size.

### exitCustomizer

    protected void exitCustomizer(int buttonOptions)

  Gracefully exit the customizer.

  If we are in a regular frame, we check to see whether the ruleset needs to be saved, we save all our frame sizes and locations, and then we dispose of our frame.

  If we are in some sort of dialog box, we simply disable our exit action, and let the dialog handle the "OK" & "Cancel" options itself.

  Lastly, if this class was entered thru the main() method, presumably from the command line, we do a System.exit(0).

  Parameters:
    `buttonOptions` - JOptionPane.YES_NO_CANCEL_OPTION or JOptionPane.YES_NO_OPTION

### saveFramePreferences

    protected void saveFramePreferences()

  Save the locations and sizes of each frame in the preferences file.

### saveEditorFramePreferences

    protected void saveEditorFramePreferences()

  Save the location and size of the rule editor frame.

### saveExceptionFramePreferences

    protected void saveExceptionFramePreferences()

  Save the location and size of the exception frame.

### saveHelpFramePreferences

    protected void saveHelpFramePreferences()

  Save the location and size of the help frame.

### saveOutputFramePreferences

    protected void saveOutputFramePreferences()

  Save the location and size of the output frame.

### saveSetViewerFramePreferences

    protected void saveSetViewerFramePreferences()

  Save the location and size of the set viewer frame.

### saveXmlFramePreferences

    protected void saveXmlFramePreferences()

  Save the location and size of the XML frame.

### main

    public static void main(java.lang.String[] theArgs)

  Called thru the command line or from AbleRuleSetEditorLauncher main() method. When launched from main(), the ruleset editor will kill the JVM when it exits!

  Parameters:
    `theArgs` - the first element must be "arl" which specifies that "Able Rule Language" edit mode wanted. This is the only mode supported.

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

(C) Copyright IBM Corporation 1999, 2005