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 AbleEditorCanvas

    java.lang.Object
      java.awt.Component
          java.awt.Container
              javax.swing.JComponent
                  javax.swing.JPanel
                      com.ibm.able.editor.AbleEditorCanvas

All Implemented Interfaces:
  javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, javax.swing.event.PopupMenuListener, java.io.Serializable

public class AbleEditorCanvas
extends javax.swing.JPanel
implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener, javax.swing.event.PopupMenuListener

This class is the main canvas class for Able Editor It supports drag/drop and connections of Able beans

See Also:
  Serialized Form

Nested Class Summary

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
`boolean` | `connectionInProgress`
`javax.swing.JFrame` | `frame`

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
`AbleEditorCanvas()`

Method Summary
`java.awt.Component` | `add(java.awt.Component c)` Add a component to the canvas.
`java.lang.Object` | `getAgent()` Get the container agent.
`AbleBean` | `getSelectedObject()` Get the selected bean object.
`AbleViewObject` | `getSelectedViewObject()` Get the selected view object.
`int` | `getViewType()`
`java.lang.String` | `getWorkingDirectory()`
`void` | `mouseClicked(java.awt.event.MouseEvent theEvent)` Handle mouseClicked event Select or deselect a tree node, object on canvas, or canvas.
`void` | `mouseDragged(java.awt.event.MouseEvent theEvent)` Handle mouseDragged event.
`void` | `mouseEntered(java.awt.event.MouseEvent theEvent)` Handle mouseEntered event.
`void` | `mouseExited(java.awt.event.MouseEvent theEvent)` Handle mouseExited event.
`void` | `mouseMoved(java.awt.event.MouseEvent theEvent)` Handle mouseMoved event.
`void` | `mousePressed(java.awt.event.MouseEvent theEvent)` Handle mousePressed event.
`void` | `mouseReleased(java.awt.event.MouseEvent theEvent)` Handle mouseReleased event.
`void` | `paintComponent(java.awt.Graphics g)` Paint the objects and their connections.
`void` | `popupMenuCanceled(javax.swing.event.PopupMenuEvent e)`
`void` | `popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent e)`
`void` | `popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent e)`
`void` | `remove(java.awt.Component c)` Remove a component from the canvas.
`static void` | `removeBean(java.lang.Object theBean)` Remove a bean from the container.
`void` | `removeListeners()`
`void` | `setAgentViewObject(AbleViewObject anAgentView)` Set the container agent.
`void` | `setFrame(javax.swing.JFrame theFrame)` Sets the frame.
`void` | `setNoSelectedViewObject()` Deselect the selected view object.
`void` | `setSelectedViewObject(AbleViewObject theViewObj, boolean setTreeToo)` Set the selected view object.
`void` | `setStatus(java.lang.String text)` Write text to the AbleEditor status line.
`void` | `setTreeView(javax.swing.JTree aTree)` Set the tree view.
`void` | `setViewType(int viewType)`
`void` | `setWorkingDirectory(java.lang.String theDir)`
`void` | `showPopup(java.awt.event.MouseEvent theEvent, AbleViewObject theViewObj)` Show the canvas (agent) or object context menu.

Methods inherited from class javax.swing.JPanel
`getAccessibleContext, getUI, getUIClassID, paramString, setUI, 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, 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, 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

### connectionInProgress

    public boolean connectionInProgress

### frame

    public javax.swing.JFrame frame

Constructor Detail

### AbleEditorCanvas

    public AbleEditorCanvas()

Method Detail

### setAgentViewObject

    public void setAgentViewObject(AbleViewObject anAgentView)

  Set the container agent.

  Parameters:
    `anAgentView` - A container agent object

### getAgent

    public java.lang.Object getAgent()

  Get the container agent.

  Returns:
    Object or AbleAgent? A container agent object

### setFrame

    public void setFrame(javax.swing.JFrame theFrame)

  Sets the frame. Frame is public, why???

  Parameters:
    `theFrame` -

### getViewType

    public int getViewType()

### setViewType

    public void setViewType(int viewType)

### setTreeView

    public void setTreeView(javax.swing.JTree aTree)

  Set the tree view.

  Parameters:
    `aTree` -

### removeBean

    public static void removeBean(java.lang.Object theBean)
                           throws AbleException

  Remove a bean from the container.

  Parameters:
    `theBean` - The AbleBean to remove.
  Throws:
    `AbleException`

### getSelectedObject

    public AbleBean getSelectedObject()

  Get the selected bean object.

  Returns:
    AbleBean

### add

    public java.awt.Component add(java.awt.Component c)

  Add a component to the canvas.

  Parameters:
    `c` - An AbleViewObject

### remove

    public void remove(java.awt.Component c)

  Remove a component from the canvas.

  Parameters:
    `c` - An AbleViewObject

### getSelectedViewObject

    public AbleViewObject getSelectedViewObject()

  Get the selected view object.

  Returns:
    AbleViewObject

### setSelectedViewObject

    public void setSelectedViewObject(AbleViewObject theViewObj,
                                      boolean setTreeToo)

  Set the selected view object.

  Parameters:
    `theViewObj` - An AbleViewObject

### setNoSelectedViewObject

    public void setNoSelectedViewObject()

  Deselect the selected view object.

### mouseClicked

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

  Handle mouseClicked event Select or deselect a tree node, object on canvas, or canvas.

  Specified by:
    `mouseClicked` in interface `java.awt.event.MouseListener`
  Parameters:
    `theEvent` - A MouseEvent

### mousePressed

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

  Handle mousePressed event.

  Specified by:
    `mousePressed` in interface `java.awt.event.MouseListener`
  Parameters:
    `theEvent` - A MouseEvent

### mouseReleased

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

  Handle mouseReleased event.

  Specified by:
    `mouseReleased` in interface `java.awt.event.MouseListener`
  Parameters:
    `theEvent` - A MouseEvent

### mouseEntered

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

  Handle mouseEntered event.

  Specified by:
    `mouseEntered` in interface `java.awt.event.MouseListener`
  Parameters:
    `theEvent` - A MouseEvent.

### mouseExited

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

  Handle mouseExited event.

  Specified by:
    `mouseExited` in interface `java.awt.event.MouseListener`
  Parameters:
    `theEvent` - A MouseEvent

### mouseDragged

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

  Handle mouseDragged event.

  Specified by:
    `mouseDragged` in interface `java.awt.event.MouseMotionListener`
  Parameters:
    `theEvent` - A MouseEvent

### mouseMoved

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

  Handle mouseMoved event.

  Specified by:
    `mouseMoved` in interface `java.awt.event.MouseMotionListener`
  Parameters:
    `theEvent` - A MouseEvent

### removeListeners

    public void removeListeners()

### showPopup

    public void showPopup(java.awt.event.MouseEvent theEvent,
                          AbleViewObject theViewObj)

  Show the canvas (agent) or object context menu.

  Parameters:
    `theEvent` - A MouseEvent
    `theViewObj` - An AbleView object

### popupMenuWillBecomeVisible

    public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent e)

  Specified by:
    `popupMenuWillBecomeVisible` in interface `javax.swing.event.PopupMenuListener`

### popupMenuWillBecomeInvisible

    public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent e)

  Specified by:
    `popupMenuWillBecomeInvisible` in interface `javax.swing.event.PopupMenuListener`

### popupMenuCanceled

    public void popupMenuCanceled(javax.swing.event.PopupMenuEvent e)

  Specified by:
    `popupMenuCanceled` in interface `javax.swing.event.PopupMenuListener`

### getWorkingDirectory

    public java.lang.String getWorkingDirectory()

### setWorkingDirectory

    public void setWorkingDirectory(java.lang.String theDir)

### paintComponent

    public void paintComponent(java.awt.Graphics g)

  Paint the objects and their connections.

  Parameters:
    `g` - A Graphics context

  Returns:
    void.

### setStatus

    public void setStatus(java.lang.String text)

  Write text to the AbleEditor status line.

  Parameters:
    `text` - The text to write to the status line

  Returns:
    void.

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