|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Canvas
com.jniwrapper.win32.automation.OleContainer
com.jniwrapper.win32.automation.OfficeContainer
public class OfficeContainer
This class enables to embed OLE/ActiveX MS Office controls into java application.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.jniwrapper.win32.automation.OleContainer |
|---|
OleContainer.AutoActivateMode, OleContainer.SizeMode |
| Nested classes/interfaces inherited from class java.awt.Canvas |
|---|
java.awt.Canvas.AccessibleAWTCanvas |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary |
|---|
| 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 | |
|---|---|
OfficeContainer()
Creates OLE container for MS Office components. |
|
OfficeContainer(OleMessageLoop messageLoop)
Creates OLE container for MS Office components. |
|
| Method Summary | |
|---|---|
void |
activate()
Activates embedded document. |
void |
createObject(CLSID clsid)
Creates an object in the container by CLSID. |
void |
createObject(java.io.File file)
Creates an object in the container by association specified by the file name. |
void |
createObject(java.lang.String oleClassName)
Creates an object in the container by class name. |
void |
deactivate()
Deactivates embedded document. |
void |
destroyObject()
Destroys the previously created OleObject. |
protected void |
drawScreenshot(java.awt.Graphics g)
Default method for drawing an embedded component which is in inactive state. |
protected void |
focusSetToContainerWindow(Wnd containerWindow)
|
protected boolean |
gainedFocus()
|
CLSID |
getContainedObjectCLSID()
Retrieves CLSID of the object embedded into OLE container |
protected int |
getProcessID()
|
protected boolean |
gotSameRoots(Wnd wnd1,
Wnd wnd2)
|
protected boolean |
isActive()
Returns UI state |
boolean |
isStaticMode()
Returns true if the embedded object is displayed in a static mode and false in a UI active mode. |
protected void |
makeContainerWindowFocused()
|
void |
paint(java.awt.Graphics g)
|
protected void |
resizeWindow()
|
HResult |
save(java.io.File file)
Saves an OLE object to file. |
protected void |
setActivatedWindow(Wnd activatedWindow)
|
protected void |
setActive(boolean active)
|
protected void |
setFocusToContainer(Wnd activatedWindow)
|
protected void |
setProcessID(int processID)
|
void |
setStaticMode(boolean value)
Changes the embedded workbook displaying mode. |
| Methods inherited from class java.awt.Canvas |
|---|
addNotify, 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, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, 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, getMousePosition, 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, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public OfficeContainer()
public OfficeContainer(OleMessageLoop messageLoop)
messageLoop - - Ole Message Loop specific for this container.
Shall be started before creating an object.| Method Detail |
|---|
protected void setActivatedWindow(Wnd activatedWindow)
setActivatedWindow in class OleContainer
public void createObject(CLSID clsid)
throws ComException
createObject in class OleContainerclsid - - CLSID of the object to be created
ComException
public void createObject(java.io.File file)
throws ComException
createObject in class OleContainerfile - - source(storage) file of the object to be created
ComException
public void createObject(java.lang.String oleClassName)
throws ComException
createObject in class OleContaineroleClassName - - class name of the object to be created
ComExceptionprotected void resizeWindow()
resizeWindow in class OleContainerpublic HResult save(java.io.File file)
OleContainer
save in class OleContainerfile - for saving
HResult.S_OK,
HResult.S_FALSEpublic void activate()
activate in class OleContainerpublic void deactivate()
protected void focusSetToContainerWindow(Wnd containerWindow)
focusSetToContainerWindow in class OleContainerprotected void drawScreenshot(java.awt.Graphics g)
public void destroyObject()
destroyObject in class OleContainerpublic void paint(java.awt.Graphics g)
paint in class OleContainerprotected boolean isActive()
true - UI activated; false - UI deactivatedprotected void setActive(boolean active)
active - - true - UI activated, other components addressing the same server may
loose the UI controls; false - UI deactivated, UI controls free for
usage in other components.protected boolean gainedFocus()
gainedFocus in class OleContainerpublic void setStaticMode(boolean value)
value - if true the workbook is displayed in a static mode, otherwise in a UI active mode.public boolean isStaticMode()
true if the embedded object is displayed in a static mode and false in a UI active mode.
true if the embedded object is displayed in a static mode and false in a UI active mode.public CLSID getContainedObjectCLSID()
protected boolean gotSameRoots(Wnd wnd1,
Wnd wnd2)
gotSameRoots in class OleContainerprotected int getProcessID()
protected void setProcessID(int processID)
protected void makeContainerWindowFocused()
makeContainerWindowFocused in class OleContainerprotected void setFocusToContainer(Wnd activatedWindow)
setFocusToContainer in class OleContainer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||