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.editor
Class AbleViewObject

    java.lang.Object
      java.awt.Component
          java.awt.Container
              javax.swing.JComponent
                  javax.swing.JLabel
                      com.ibm.able.editor.AbleViewObject

All Implemented Interfaces:
  javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.beans.PropertyChangeListener, java.io.Serializable, javax.swing.SwingConstants

public class AbleViewObject
extends javax.swing.JLabel
implements java.awt.event.ActionListener, java.awt.event.MouseListener, java.beans.PropertyChangeListener, java.io.Serializable

This class provides function similar to the Wrapper class in the BDK. It introspects the underlying AbleBean and provides a GUI interface for manipulation in the AbleEditorCanvas. It is meant to be a design-time only object.

See Also:
  Serialized Form

Nested Class Summary

Nested classes inherited from class javax.swing.JLabel
`javax.swing.JLabel.AccessibleJLabel`

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 int` | `myBeanSlot`
`protected java.lang.String` | `myEventType`
`protected AbleBean` | `myUnderlyingAbleBean`
`protected java.lang.Object` | `myUnderlyingObject`
`protected boolean` | `myUnderlyingObjectIsAbleBean`

Fields inherited from class javax.swing.JLabel
`labelFor`

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 javax.swing.SwingConstants
`BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST`

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

Constructor Summary
`AbleViewObject(java.lang.Object theObject, AbleEditorFrame theFrame)` Construct a ViewObject over an AbleBean.

Method Summary
`void` | `actionPerformed(java.awt.event.ActionEvent theActionEvent)` Process action events -- usually context menu actions
`void` | `closeCustomizer()` Dispose of customizer windows.
`java.lang.Object[]` | `getArrayNames()` Return an array of array (indexed property) names
`java.util.Hashtable` | `getArrays()` Return a hashtable of arrays (indexed properties) (name and property descriptors)
`AbleBean` | `getBean()` Get the able bean that this view object is wrapping Note: could be AbleBeanAdaptor if myUnderlyingObject is not an AbleBean
`protected void` | `getBeanProperties()` Introspect the bean to get all of the members of this object and build a list of parameters and arrays.
`java.util.Vector` | `getBufferConnections()` Return the vector of source buffer connections to the object used for drawing the buffer connections.
`java.util.Hashtable` | `getCustomInspectorPanels()` Return the list of custom inspector panels, if any.
`java.util.Hashtable` | `getCustomInspectors()` Return the list of custom inspectors, if any.
`java.lang.String` | `getEventType()`
`java.awt.Point` | `getInputPos()` Return the left midpoint of the object for drawing a connection
`java.lang.String` | `getKey()` Return a key of the form "parentname.beanname", or "beanclass.currentTimeMillis" in the event of an error.
`java.lang.String` | `getName()` Return the object name for display purposes
`java.lang.Object` | `getObject()` Get the object that this view object is wrapping
`java.lang.String` | `getObjectName()` Return the object name for display purposes
`java.awt.Point` | `getOutputPos()` Return the right midpoint of the object for drawing a connection
`java.lang.Object[]` | `getParameterNames()` Return an array of parameter (non-indexed property) names
`java.util.Hashtable` | `getParameters()` Return a hashtable of parameters (name and property descriptors)
`javax.swing.JPopupMenu` | `getPopupMenu(java.awt.event.MouseEvent theEvent, AbleViewObject theView)`
`java.lang.Object[]` | `getProperties()` Return an array of all object property names
`int` | `getSlot()` Get the horizontal position on the canvas
`protected void` | `introspectBean()` Introspect the bean, get the customizer class (if any) the icon for display on the canvas, etc.
`void` | `mouseClicked(java.awt.event.MouseEvent theMouseEvent)`
`void` | `mouseEntered(java.awt.event.MouseEvent theMouseEvent)`
`void` | `mouseExited(java.awt.event.MouseEvent theMouseEvent)`
`void` | `mousePressed(java.awt.event.MouseEvent theMouseEvent)`
`void` | `mouseReleased(java.awt.event.MouseEvent theMouseEvent)`
`void` | `paintComponent(java.awt.Graphics theGraphics)` paint the icon for this bean on the canvas
`void` | `propertyChange(java.beans.PropertyChangeEvent theEvent)` Handle propertyChange events from underlying AbleBean.
`void` | `setSelected(boolean theSelectedState)`
`java.lang.String` | `toString()` Retrieve a string describing (the contents of) the object.

Methods inherited from class javax.swing.JLabel
`checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setDisplayedMnemonicIndex, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition, updateUI`

Methods inherited from class javax.swing.JComponent
`addAncestorListener, addNotify, addPropertyChangeListener, 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, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, 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, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, transferFocus, transferFocusUpCycle`

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

Field Detail

### myUnderlyingObject

    protected java.lang.Object myUnderlyingObject

### myUnderlyingAbleBean

    protected AbleBean myUnderlyingAbleBean

### myUnderlyingObjectIsAbleBean

    protected boolean myUnderlyingObjectIsAbleBean

### myEventType

    protected java.lang.String myEventType

### myBeanSlot

    protected int myBeanSlot

Constructor Detail

### AbleViewObject

    public AbleViewObject(java.lang.Object theObject,
                          AbleEditorFrame theFrame)

  Construct a ViewObject over an AbleBean. If it is not an AbleBean, then use a generic AbleBeanAdapter as a proxy.

Parameters:
  `theObject` - A JavaBean (usually AbleBean) object

  `theFrame` - An AbleEditorFrame reference used to modify its list of open view object customizers.

Method Detail

### actionPerformed

    public void actionPerformed(java.awt.event.ActionEvent theActionEvent)

  Process action events -- usually context menu actions

  Specified by:
    `actionPerformed` in interface `java.awt.event.ActionListener`
  Parameters:
    `theActionEvent` - An ActionEvent generated by user action

### mouseClicked

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

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

### mouseEntered

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

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

### mouseExited

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

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

### mousePressed

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

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

### mouseReleased

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

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

### propertyChange

    public void propertyChange(java.beans.PropertyChangeEvent theEvent)

  Handle propertyChange events from underlying AbleBean. If name is changed, update label text; if bean active state is changed, update icon

  Specified by:
    `propertyChange` in interface `java.beans.PropertyChangeListener`

### getObject

    public java.lang.Object getObject()

  Get the object that this view object is wrapping

### getBean

    public AbleBean getBean()

  Get the able bean that this view object is wrapping Note: could be AbleBeanAdaptor if myUnderlyingObject is not an AbleBean

### getName

    public java.lang.String getName()

  Return the object name for display purposes

### getKey

    public java.lang.String getKey()

  Return a key of the form "parentname.beanname", or "beanclass.currentTimeMillis" in the event of an error.

### getObjectName

    public java.lang.String getObjectName()

  Return the object name for display purposes

### getEventType

    public java.lang.String getEventType()

### getSlot

    public int getSlot()

  Get the horizontal position on the canvas

### getArrays

    public java.util.Hashtable getArrays()

  Return a hashtable of arrays (indexed properties) (name and property descriptors)

### getArrayNames

    public java.lang.Object[] getArrayNames()

  Return an array of array (indexed property) names

### getParameters

    public java.util.Hashtable getParameters()

  Return a hashtable of parameters (name and property descriptors)

### getParameterNames

    public java.lang.Object[] getParameterNames()

  Return an array of parameter (non-indexed property) names

### getProperties

    public java.lang.Object[] getProperties()

  Return an array of all object property names

### getCustomInspectors

    public java.util.Hashtable getCustomInspectors()

  Return the list of custom inspectors, if any. Return value may be null.

### getCustomInspectorPanels

    public java.util.Hashtable getCustomInspectorPanels()

  Return the list of custom inspector panels, if any. Return value may be null.

### getBufferConnections

    public java.util.Vector getBufferConnections()

  Return the vector of source buffer connections to the object used for drawing the buffer connections.

### setSelected

    public void setSelected(boolean theSelectedState)

### getOutputPos

    public java.awt.Point getOutputPos()

  Return the right midpoint of the object for drawing a connection

### getInputPos

    public java.awt.Point getInputPos()

  Return the left midpoint of the object for drawing a connection

### paintComponent

    public void paintComponent(java.awt.Graphics theGraphics)

  paint the icon for this bean on the canvas

### introspectBean

    protected void introspectBean()

  Introspect the bean, get the customizer class (if any) the icon for display on the canvas, etc.

### getBeanProperties

    protected void getBeanProperties()

  Introspect the bean to get all of the members of this object and build a list of parameters and arrays.

### getPopupMenu

    public javax.swing.JPopupMenu getPopupMenu(java.awt.event.MouseEvent theEvent,
                                               AbleViewObject theView)

  Returns:
    JPopupMenu the correct popup menu for the settings object

### toString

    public java.lang.String toString()

  Retrieve a string describing (the contents of) the object.

  Note that this implementation returns the underlying bean's name.

  Returns:
    A String containing the current contents of the object.

### closeCustomizer

    public void closeCustomizer()

  Dispose of customizer windows. Customizers that override dispose have the opportunity to remove listeners.

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