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
Class AbleObjectCustomizer

    java.lang.Object
      java.awt.Component
          java.awt.Container
              java.awt.Window
                  java.awt.Dialog
                      javax.swing.JDialog
                          com.ibm.able.AbleObjectCustomizer

All Implemented Interfaces:
  AbleCustomizer, javax.accessibility.Accessible, java.beans.Customizer, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants

Direct Known Subclasses:
  AbleBackPropagationCustomizer, AbleConversationManagerCustomizer, AbleDBExportCustomizer, AbleDBImportCustomizer, AbleDecisionTreeCustomizer, AbleDecisionTreeCustomizer, AbleDefaultAgentCustomizer, AbleExportCustomizer, AbleFileWatcherCustomizer, AbleFilterCustomizer, AbleImportCustomizer, AbleKnnCustomizer, AbleNaiveBayesCustomizer, AbleNaiveBayesCustomizer, AblePetriPlaceCustomizer, AblePetriTransitionCustomizer, AbleRadialBasisFunctionNetCustomizer, AbleSelfOrganizingMapCustomizer, AbleTemporalDifferenceLearningCustomizer, AbleTimeSeriesFilterCustomizer, SampleSensorEffectorCustomizer

public class AbleObjectCustomizer
extends javax.swing.JDialog
implements AbleCustomizer

This class provides a dialog with a tabbed property panel and standard tabs for AbleObjects. Classes extending from AbleObjectCustomizer must add or insert their panels to this dialog. Panels may register property change events with their customizer to invoke a method when a property of interest changes. For now assume the panel size is 525x350.

Standard tabs are:

General tab
  where the name, comment, processing options are set.
Connections tab
  where data, event, and property connections are displayed and can be removed.

See Also:
  `AbleObject`, `AbleObjectPanel`, `AbleConnectionsPanel`, `addPropertyChangeMethod(java.lang.String, java.lang.Object, java.lang.String)`, Serialized Form

Nested Class Summary

Nested classes inherited from class javax.swing.JDialog
`javax.swing.JDialog.AccessibleJDialog`

Nested classes inherited from class java.awt.Dialog
`java.awt.Dialog.AccessibleAWTDialog`

Nested classes inherited from class java.awt.Window
`java.awt.Window.AccessibleAWTWindow`

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
`static int` | `TabHeight`
`static int` | `TabWidth`

Fields inherited from class javax.swing.JDialog
`accessibleContext, rootPane, rootPaneCheckingEnabled`

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

Fields inherited from interface javax.swing.WindowConstants
`DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE`

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

Constructor Summary
`AbleObjectCustomizer()` Called by main.
`AbleObjectCustomizer(javax.swing.JFrame theFrame, java.lang.String theTitle, boolean isModal)` Create the property tabbed panel and add the general and connections tabs to it.

Method Summary
`void` | `addPanel(AbleCustomizerPanel thePanel)`
`void` | `addPropertyChangeListener(java.beans.PropertyChangeListener l)` This allows other objects to register when this customizer changes.
`void` | `addPropertyChangeMethod(java.lang.String theProperty, java.lang.Object theObject, java.lang.String theMethodName)` If a panel wants to be informed when a specific property is changed, it registers with its customizer.
`void` | `addTab(java.lang.String theTabTitle, AbleCustomizerPanel thePanel)` Append a panel to the tabbed panel.
`void` | `dispose()` Cleanup, and dispose of the customizer.
`javax.swing.JButton` | `getCancelButton()` Return the Cancel button in case another customizer wants to add a listener.
`static AbleObjectCustomizer` | `getCustomizer(java.lang.Class customizerClass, AbleBean bean)` Return a customizer dialog, for example: `AbleObjectCustomizer c = AbleObjectCustomizer.getCustomizer( AbleDefaultAgentCustomizer.class, ableDefaultAgent); c.setVisible(true);` This format is intended for use from another application.
`javax.swing.JPanel` | `getCustomizerButtonPanel()` Return the panel containing the control buttons in case additional buttons are to be added.
`javax.swing.JButton` | `getHelpButton()` Return the Help button in case another customizer wants to add a listener.
`javax.swing.JButton` | `getOKButton()` Return The OK button in case another customizer wants to add a listener.
`java.lang.String` | `getWorkingDirectory()` Get the working directory.
`void` | `insertTab(java.lang.String theTabTitle, AbleCustomizerPanel thePanel, int theIndex)` Insert a panel in the tabbed list at a specific location.
`void` | `insertTab(java.lang.String theTabTitle, javax.swing.Icon theIcon, AbleCustomizerPanel thePanel, java.lang.String theToolTip, int theIndex)` Insert a panel in the tabbed list at a specific location.
`boolean` | `isChanged()` Find out if the object was changed, possibly because of a side-effect.
`boolean` | `isIgnoringPropertyChanges()` Find out if we're currently ignoring property change events.
`static void` | `main(java.lang.String[] args)` Construct a new object and display the customizer.
`void` | `removePropertyChangeListener(java.beans.PropertyChangeListener l)` This allows other objects to deregister from changes to this customizer.
`void` | `setChanged(boolean theFlag)` Find out if the object was changed, possibly because of a side-effect.
`void` | `setCustomizer(AbleCustomizer theCustomizer)` Customizers that extend this customizer call setCustomizer so that the base object knows to call its updateObject method.
`void` | `setIgnoreAnyPropertyChanges(boolean theFlag)` Set the flag to ignore property change events.
`void` | `setObject(java.lang.Object theObject)` Get a reference to the object to be customized.
`void` | `setVisible(boolean isVisible)` When a customizer is displayed, place it relative to the parent location.
`void` | `setWorkingDirectory(java.lang.String dir)` Set the working directory.
`static void` | `startCustomizer(java.lang.Class customizerClass, java.lang.Class beanClass)` Start a customizer dialog, for example: `static public void main(String args[]) { AbleObjectCustomizer.startCustomizer( AbleDefaultAgentCustomizer.class, AbleDefaultAgent.class); }` This method is intended for running standalone applications and in testing customizer panels.
`void` | `updateObject()` Update the customized object by calling each panel we constructed for this customizer and telling it to get its panel data and write it to the object.
`void` | `updateProperties()` Call the customizer's updateObject method for each listed customizer so that all panel data is read and updated in the object.
`boolean` | `userCancelled()` Find out if the user pressed cancel.

Methods inherited from class javax.swing.JDialog
`addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update`

Methods inherited from class java.awt.Dialog
`addNotify, getTitle, hide, isModal, isResizable, isUndecorated, removeNotify, setModal, setResizable, setTitle, setUndecorated, show`

Methods inherited from class java.awt.Window
`addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, finalize, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, toBack, toFront`

Methods inherited from class java.awt.Container
`add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, 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, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusUpCycle`

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

Field Detail

### TabWidth

    public static final int TabWidth

See Also:
  Constant Field Values

### TabHeight

    public static final int TabHeight

See Also:
  Constant Field Values

Constructor Detail

### AbleObjectCustomizer

    public AbleObjectCustomizer(javax.swing.JFrame theFrame,
                                java.lang.String theTitle,
                                boolean isModal)

  Create the property tabbed panel and add the general and connections tabs to it.

Parameters:
  `theFrame` - The frame to own this property dialog.
  `theTitle` - The title of the property dialog.
  `isModal` - This flag makes the dialog modal when true.

### AbleObjectCustomizer

    public AbleObjectCustomizer()

  Called by main. Used for testing only.

See Also:
  `main(java.lang.String[])`

Method Detail

### main

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

  Construct a new object and display the customizer.

  See Also:
    `startCustomizer(java.lang.Class, java.lang.Class)`

### setCustomizer

    public void setCustomizer(AbleCustomizer theCustomizer)

  Customizers that extend this customizer call setCustomizer so that the base object knows to call its updateObject method.

  Parameters:
    `theCustomizer` - An object that implements AbleCustomizer.

### addTab

    public void addTab(java.lang.String theTabTitle,
                       AbleCustomizerPanel thePanel)

  Append a panel to the tabbed panel.

  Parameters:
    `theTabTitle` - The string to display on the tab as the name.
    `thePanel` - The panel to be added as a tab.

### addPanel

    public void addPanel(AbleCustomizerPanel thePanel)

### insertTab

    public void insertTab(java.lang.String theTabTitle,
                          AbleCustomizerPanel thePanel,
                          int theIndex)

  Insert a panel in the tabbed list at a specific location.

  Parameters:
    `theTabTitle` - The string to display on the tab as the name.
    `thePanel` - The panel to be added as a tab.
    `theIndex` - The position to insert the the tab.

### insertTab

    public void insertTab(java.lang.String theTabTitle,
                          javax.swing.Icon theIcon,
                          AbleCustomizerPanel thePanel,
                          java.lang.String theToolTip,
                          int theIndex)

  Insert a panel in the tabbed list at a specific location.

  Parameters:
    `theTabTitle` - The string to display on the tab as the name.
    `theIcon` - The icon to display on the tab panel.
    `thePanel` - The panel to be added as a tab.
    `theIndex` - The position to insert the the tab.

### setVisible

    public void setVisible(boolean isVisible)

  When a customizer is displayed, place it relative to the parent location.

### addPropertyChangeListener

    public void addPropertyChangeListener(java.beans.PropertyChangeListener l)

  This allows other objects to register when this customizer changes.

  Specified by:
    `addPropertyChangeListener` in interface `java.beans.Customizer`
  See Also:
    `PropertyChangeListener`, `removePropertyChangeListener(java.beans.PropertyChangeListener)`

### removePropertyChangeListener

    public void removePropertyChangeListener(java.beans.PropertyChangeListener l)

  This allows other objects to deregister from changes to this customizer.

  Specified by:
    `removePropertyChangeListener` in interface `java.beans.Customizer`
  See Also:
    `PropertyChangeListener`, `addPropertyChangeListener(java.beans.PropertyChangeListener)`

### setObject

    public void setObject(java.lang.Object theObject)

  Get a reference to the object to be customized. Add a property change listener to this object so we can update panels appropriately when properties change. Pass the object to the panels so its properties can be written to the screen.

  Specified by:
    `setObject` in interface `java.beans.Customizer`
  See Also:
    `AbleCustomizer`

### updateObject

    public void updateObject()
                      throws java.rmi.RemoteException

  Update the customized object by calling each panel we constructed for this customizer and telling it to get its panel data and write it to the object.

  Specified by:
    `updateObject` in interface `AbleCustomizer`
  Throws:
    `java.rmi.RemoteException`
  See Also:
    `AbleCustomizer`, `updateProperties()`

### updateProperties

    public void updateProperties()
                          throws java.rmi.RemoteException

  Call the customizer's updateObject method for each listed customizer so that all panel data is read and updated in the object. This temporarily turns off its own property change listener so that events are not created for these property changes themselves. This method is called when the OK button is pressed. It can also be called when panels have their own buttons that produce side-effects such as a generate or configure. Those panels must call their getDataFromBean method to force any side effects to be displayed since the property change listener is temporarily removed. If they wish to update all the panels, they should call setObject.

  Throws:
    `java.rmi.RemoteException`
  See Also:
    `AbleCustomizer`, `updateObject()`, `setObject(java.lang.Object)`

### dispose

    public void dispose()

  Cleanup, and dispose of the customizer.

### getCustomizer

    public static AbleObjectCustomizer getCustomizer(java.lang.Class customizerClass,
                                                     AbleBean bean)

  Return a customizer dialog, for example: `AbleObjectCustomizer c = AbleObjectCustomizer.getCustomizer( AbleDefaultAgentCustomizer.class, ableDefaultAgent); c.setVisible(true);` This format is intended for use from another application.

  Parameters:
    `customizerClass` - The customizer class to instantiate.
    `bean` - The bean to be edited by the customizer.
  Returns:
    The customizer created.

### startCustomizer

    public static void startCustomizer(java.lang.Class customizerClass,
                                       java.lang.Class beanClass)

  Start a customizer dialog, for example: `static public void main(String args[]) { AbleObjectCustomizer.startCustomizer( AbleDefaultAgentCustomizer.class, AbleDefaultAgent.class); }` This method is intended for running standalone applications and in testing customizer panels.

  Parameters:
    `customizerClass` -
    `beanClass` -

### userCancelled

    public boolean userCancelled()

  Find out if the user pressed cancel.

### setChanged

    public void setChanged(boolean theFlag)

  Find out if the object was changed, possibly because of a side-effect.

### isChanged

    public boolean isChanged()

  Find out if the object was changed, possibly because of a side-effect.

### isIgnoringPropertyChanges

    public boolean isIgnoringPropertyChanges()

  Find out if we're currently ignoring property change events.

### setIgnoreAnyPropertyChanges

    public void setIgnoreAnyPropertyChanges(boolean theFlag)
                                     throws java.rmi.RemoteException

  Set the flag to ignore property change events. Any listeners registered with this object will only be informed if ignore is false. This flag is set to false when the updateProperties method is called.

  Parameters:
    `theFlag` - A boolean where true disables the customizer property change listener.
  Throws:
    `java.rmi.RemoteException`
  See Also:
    `updateProperties()`

### addPropertyChangeMethod

    public void addPropertyChangeMethod(java.lang.String theProperty,
                                        java.lang.Object theObject,
                                        java.lang.String theMethodName)

  If a panel wants to be informed when a specific property is changed, it registers with its customizer. This method adds the panel method to be invoked for a specific property to the hashtable myPropertyChangeMethods. If the property is already included, it makes the hashtable object a vector and adds this method to the other methods.

  Parameters:
    `theProperty` - The name of the property of interest, which could be listed in the AbleProperty class.
    `theObject` - The panel object on which to run the property change method.
    `theMethodName` - The name of the method to run. This method must be public, and it must take a PropertyChangeEvent as its sole parameter.
  See Also:
    `AbleProperty`

### getWorkingDirectory

    public java.lang.String getWorkingDirectory()

  Get the working directory.

  Returns:
    the working directory.

### setWorkingDirectory

    public void setWorkingDirectory(java.lang.String dir)

  Set the working directory.

  Parameters:
    `dir` - The working directory.

### getCancelButton

    public javax.swing.JButton getCancelButton()

  Return the Cancel button in case another customizer wants to add a listener.

  Returns:
    The Cancel button.

### getHelpButton

    public javax.swing.JButton getHelpButton()

  Return the Help button in case another customizer wants to add a listener.

  Returns:
    The Help button.

### getOKButton

    public javax.swing.JButton getOKButton()

  Return The OK button in case another customizer wants to add a listener.

  Returns:
    The OK button.

### getCustomizerButtonPanel

    public javax.swing.JPanel getCustomizerButtonPanel()

  Return the panel containing the control buttons in case additional buttons are to be added. Note that when this panel is initialized, the panel has a border layout and the ok, cancel, and help buttons are in a panel placed to the EAST.

  Returns:
    The bottom panel containing the buttons.

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