com.develop.jawin
Class AXComponent

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Canvas
          extended bycom.develop.jawin.AXComponent
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ComponentListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class AXComponent
extends java.awt.Canvas
implements java.awt.event.ComponentListener

ActiveX holder component. Should be inherited by developer class. Creates ActiveX container.

Author:
Vitally Shelest
See Also:
Serialized Form

Field Summary
 int host
          container object
 int hwnd
          canvas (base component) window handle
 
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
AXComponent(GUID iid)
          Creates a new instance of AXComponent
AXComponent(java.lang.String coClass)
          Creates a new instance of AXComponent
 
Method Summary
 void addEventListener(java.lang.Class itf, java.lang.Object impl)
          Adds listener to COM Object
 void addNotify()
          Creates ActiveX
static void callInit(AXComponent obj)
          For internal use
 void componentHidden(java.awt.event.ComponentEvent componentEvent)
          Canvas listener function
 void componentMoved(java.awt.event.ComponentEvent componentEvent)
          Canvas listener function
 void componentResized(java.awt.event.ComponentEvent componentEvent)
          Canvas listener function
 void componentShown(java.awt.event.ComponentEvent componentEvent)
          Canvas listener function
static int createControl(AXComponent obj)
          For internal usage
 void invalidate(boolean eraseBkg)
           
static int newHost(AXComponent obj, byte[] guid)
          For internal usage
static int newHost(AXComponent obj, java.lang.String guid)
          For internal usage
 void onWindowMsg(int msgID, long w, long l)
           
 void paint(java.awt.Graphics g)
           
 void preCreateInit()
          For internal usage
 void removeNotify()
           
 void setBounds(int x, int y, int w, int h)
           
 
Methods inherited from class java.awt.Canvas
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

hwnd

public int hwnd
canvas (base component) window handle


host

public int host
container object

Constructor Detail

AXComponent

public AXComponent(GUID iid)
            throws COMException
Creates a new instance of AXComponent

Parameters:
iid - ActiveX GUID
Throws:
COMException - JNI/COM error

AXComponent

public AXComponent(java.lang.String coClass)
            throws COMException
Creates a new instance of AXComponent

Parameters:
coClass - COM ProgID
Throws:
COMException - JNI/COM error
Method Detail

addEventListener

public final void addEventListener(java.lang.Class itf,
                                   java.lang.Object impl)
                            throws COMException
Adds listener to COM Object

Parameters:
itf - class object of interface implemented
impl - object which implements interface
Throws:
COMException - JNI/COM error

preCreateInit

public final void preCreateInit()
                         throws COMException
For internal usage

Throws:
COMException - JNI/COM error

componentHidden

public void componentHidden(java.awt.event.ComponentEvent componentEvent)
Canvas listener function

Specified by:
componentHidden in interface java.awt.event.ComponentListener
Parameters:
componentEvent - canvas event

componentMoved

public void componentMoved(java.awt.event.ComponentEvent componentEvent)
Canvas listener function

Specified by:
componentMoved in interface java.awt.event.ComponentListener
Parameters:
componentEvent - canvas event

componentResized

public void componentResized(java.awt.event.ComponentEvent componentEvent)
Canvas listener function

Specified by:
componentResized in interface java.awt.event.ComponentListener
Parameters:
componentEvent - canvas event

componentShown

public void componentShown(java.awt.event.ComponentEvent componentEvent)
Canvas listener function

Specified by:
componentShown in interface java.awt.event.ComponentListener
Parameters:
componentEvent - canvas event

setBounds

public void setBounds(int x,
                      int y,
                      int w,
                      int h)

addNotify

public void addNotify()
Creates ActiveX


removeNotify

public void removeNotify()

newHost

public static int newHost(AXComponent obj,
                          byte[] guid)
                   throws COMException
For internal usage

Parameters:
obj -
guid -
Returns:
Throws:
COMException - JNI/COM error

newHost

public static int newHost(AXComponent obj,
                          java.lang.String guid)
For internal usage

Parameters:
obj -
guid -
Returns:

createControl

public static int createControl(AXComponent obj)
                         throws COMException
For internal usage

Parameters:
obj -
Returns:
Throws:
COMException - JNI/COM error

callInit

public static void callInit(AXComponent obj)
                     throws COMException
For internal use

Parameters:
obj -
Throws:
COMException - JNI/COM error

invalidate

public final void invalidate(boolean eraseBkg)

onWindowMsg

public void onWindowMsg(int msgID,
                        long w,
                        long l)

paint

public void paint(java.awt.Graphics g)


Composia Soft Ltd. Designed by Vitally Shelest. .