|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
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 | +--javax.swing.JComponent | +--javax.swing.JPanel | +--com.ibm.able.rules.AbleRuleSetEditor
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.
Inner Class Summary | |
---|---|
class |
AbleRuleSetEditor.XAppCloser
To shutdown when run as an application. |
Inner classes inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Inner classes inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent |
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, getUIClassID, paramString, 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, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected javax.swing.JFileChooser myFileDialog
protected int myFileOption
protected java.io.File myCurrentDir
protected javax.swing.event.UndoableEditListener myUndoHandler
protected javax.swing.undo.UndoManager myUndoManager
Constructor Detail |
public AbleRuleSetEditor()
Method Detail |
public void setEnteredThruMain()
public void addPropertyChangeListener(java.beans.PropertyChangeListener theListener)
addPropertyChangeListener
in interface java.beans.Customizer
addPropertyChangeListener
in class javax.swing.JComponent
theListener
- the property change listener to be added to this
object.
public void removePropertyChangeListener(java.beans.PropertyChangeListener theListener)
removePropertyChangeListener
in interface java.beans.Customizer
removePropertyChangeListener
in class javax.swing.JComponent
theListener
- the property change listener to be removed from this
object.
public void setObject(java.lang.Object theRuleSet)
setObject
in interface java.beans.Customizer
theRuleSet
- The AbleRuleSet object that is to be changed.
public void updateObject() throws AbleException
updateObject
in interface AbleCustomizer
public void mouseClicked(java.awt.event.MouseEvent theEvent)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent theEvent)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent theEvent)
mouseExited
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent theEvent)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent theEvent)
mouseReleased
in interface java.awt.event.MouseListener
protected void debugTrace(java.lang.String theMessage)
theMessage
- A String containing text to be traced.
protected javax.swing.text.JTextComponent getEditor()
protected void xferFileNames()
protected java.awt.Frame getFrame()
protected java.awt.Window getWindow_()
protected boolean isRegularFrame()
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.
protected void exitCustomizer(int buttonOptions)
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).
buttonOptions
- JOptionPane.YES_NO_CANCEL_OPTION or JOptionPane.YES_NO_OPTIONprotected void saveFramePreferences()
protected void saveEditorFramePreferences()
protected void saveExceptionFramePreferences()
protected void saveHelpFramePreferences()
protected void saveOutputFramePreferences()
protected void saveSetViewerFramePreferences()
protected void saveXmlFramePreferences()
public static void main(java.lang.String[] theArgs)
theArgs
- the first element must be "arl" which specifies that
"Able Rule Language" edit mode wanted. This is the
only mode supported.
|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |