Overview | Module | Use | Devguide | Index

Methods' Summary | Methods' Details | Attributes' Summary | Attributes' Details

:: com :: sun :: star :: frame ::
interface XFrame
  Base Hierarchy
      ::com::sun::star::uno::XInterface
       |
       +-::com::sun::star::lang::XComponent
          |
          +-XFrame
Description a frame object can be considered to be an "anchor" object where a component can be attached to. A frame can be (it's not a must!) a part of a frame tree. If not this frame willn't be accessible by using the api. This mode make sense for previews. The root node of the tree can be a Desktop implementation. See also Desktop Developers Guide 6.1.1 Office Development - OpenOffice.org Application Environment - Overview - Framework API - Frame-Controller-Model Paradigm in OpenOffice.org 6.1.1 Office Development - OpenOffice.org Application Environment - Overview - Framework API - Frames - Linking Components and Windows 6.1.3 Office Development - OpenOffice.org Application Environment - Using the Component Framework - Getting Frames, Controllers and Models from Each Other 6.1.3 Office Development - OpenOffice.org Application Environment - Using the Component Framework - Frames - XFrame - Frame Setup 6.1.4 Office Development - OpenOffice.org Application Environment - Creating Frames Manually - Frame Creation

Methods' Summary
initialize | is called to initialize the frame within a window - the container window.
getContainerWindow | provides access to the container window of the frame.
setCreator | sets the frame container that created this frame.
getCreator | provides access to the creator (parent) of this frame
getName | access to the name property of this frame
setName | sets the name of the frame.
findFrame | searches for a frame with the specified name.
isTop | determines if the frame is a top frame.
activate | activates this frame and thus the component within.
deactivate | is called by the creator frame when another sub-frame gets activated.
isActive | determines if the frame is active.
setComponent | sets a new component into the frame or release an existing one from a frame.
getComponentWindow | provides access to the component window
getController | provides access to the controller
contextChanged | notifies the frame that the context of the controller within this frame changed (i.e. the selection).
addFrameActionListener | registers an event listener, which will be called when certain things happen to the components within this frame or within sub-frames of this frame.
removeFrameActionListener | unregisters an event listener

Methods' Details
initialize
void initialize( | [in] ::com::sun::star::awt::XWindow | Window );
Description is called to initialize the frame within a window - the container window. This window will be used as parent for the component window and to support some UI relevant features of the frame service. Note: Re-parenting mustn't supported by a real frame implementation! It's designed for initializing - not for setting. Parameter Window the new container window See also XFrame::getContainerWindow()
getContainerWindow
::com::sun::star::awt::XWindow getContainerWindow(); |  |
Description provides access to the container window of the frame. Normally this is used as the parent window of the component window. Returns the container window of this frame See also XFrame::initialize()
setCreator
[oneway] void setCreator( | [in] XFramesSupplier | Creator );
Description sets the frame container that created this frame. Only the creator is allowed to call this method. But creator doesn't mean the implementation which creates this instance ... it means the parent frame of the frame hierarchy. Because; normaly a frame should be created by using the api and is neccessary for searches inside the tree (e.g. XFrame::findFrame() ) Parameter Creator the creator (parent) of this frame See also XFrame::getCreator()
getCreator
XFramesSupplier getCreator(); |  |
Description provides access to the creator (parent) of this frame Returns the frame container that created and contains this frame. See also XFrame::setCreator()
getName
string getName(); |  |
Description access to the name property of this frame Returns the programmatic name of this frame. See also XFrame::setName()
setName
[oneway] void setName( | [in] string | Name );
Description sets the name of the frame. Normally the name of the frame is set initially (e.g. by the creator). The name of a frame will be used for identifying it if a frame search was started. These searches can be forced by: XFrame::findFrame() XDispatchProvider::queryDispatch() XComponentLoader::loadComponentFromURL() Note: Special targets like "_blank", "_self" etc. are not allowed. That's why frame names shouldn't start with a sign "_". Parameter Name the new programmatic name of this frame See also XFrame::findFrame() See also XFrame::getName() See also XDispatchProvider See also XComponentLoader
findFrame
XFrame findFrame( | [in] string [in] long | TargetFrameName, SearchFlags );
  Description searches for a frame with the specified name. Frames may contain other frames (e.g., a frameset) and may be contained in other frames. This hierarchy is searched with this method. First some special names are taken into account, i.e. "", "_self", "_top", "_blank" etc. SearchFlags is ignored when comparing these names with TargetFrameName ; further steps are controlled by SearchFlags . If allowed, the name of the frame itself is compared with the desired one, and then ( again if allowed ) the method is called for all children of the frame. Finally may be called for the siblings and then for parent frame (if allowed). List of special target names:
  ""/"_self" | address the starting frame itself
  "_parent" | address the direct parent frame only
  "_top" | address the top frame of this subtree of the frametree
  "_blank" | creates a new top frame
If no frame with the given name is found, a new top frame is created; if this is allowed by a special flag FrameSearchFlag::CREATE . The new frame also gets the desired name. Parameter TargetFrameName identify (a) a special target ("_blank","_self" ...) or (b) any well known frame to search it inside the current hierarchy Parameter SearchFlags optional parameter to regulate search if no special target was used for TargetFrameName See also FrameSearchFlag
isTop
boolean isTop(); |  |
Description determines if the frame is a top frame. In general a top frame is the frame which is a direct child of a task frame or which does not have a parent. Possible frame searches must stop the search at such a frame unless the flag FrameSearchFlag::TASKS is set. Returns true if frame supports top frame specification false otherwise
activate
[oneway] void activate(); |  |
Description activates this frame and thus the component within. At first the frame sets itself as the active frame of its creator by calling XFramesSupplier::setActiveFrame() , then it broadcasts an FrameActionEvent with FrameAction::FRAME_ACTIVATED . The component within this frame may listen to this event to grab the focus on activation; for simple components this can be done by the FrameLoader . Finally, most frames may grab the focus to one of its windows or forward the activation to a sub-frame. See also XFrame::deactivate() See also XFrame::isActive()
deactivate
[oneway] void deactivate(); |  |
Description is called by the creator frame when another sub-frame gets activated. At first the frame deactivates its active sub-frame, if any. Then broadcasts a FrameActionEvent with FrameAction::FRAME_DEACTIVATING . See also XFrame::activate() See also XFrame::isActive()
isActive
boolean isActive(); |  |
Description determines if the frame is active. Returns true for active or UI active frames false otherwise See also XFrame::activate() See also XFrame::deactivate()
setComponent
boolean setComponent( | [in] ::com::sun::star::awt::XWindow [in] XController | ComponentWindow, Controller );
Description sets a new component into the frame or release an existing one from a frame. Parameter ComponentWindow the window of the new component or NULL for release A valid component window should be a child of the frame container window. Parameter Controller the controller of the new component or NULL for release Simple components may implement a ::com::sun::star::awt::XWindow only. In this case no controller must be given here. Returns true if setting of new component or release of an existing one was successfully false otherwise (especialy, if an existing controller disagree within his XController::suspend() call) See also XFrame::getComponentWindow() See also XFrame::getContainerWindow() See also XFrame::getController()
getComponentWindow
::com::sun::star::awt::XWindow getComponentWindow(); |  |
Description provides access to the component window Note: Don't dispose this window - the frame is the owner of it. Returns the current visible component in this frame or NULL if no one currently exist See also XFrame::setComponent()
getController
XController getController(); |  |
Description provides access to the controller Note: Don't dispose it - the frame is the owner of it. Use XController::getFrame() to dispose the frame after you the controller agreed with a XController::suspend() call. Returns the current controller within this frame or NULL if no one currently exist See also XFrame::setComponent()
contextChanged
void contextChanged(); |  |
Description notifies the frame that the context of the controller within this frame changed (i.e. the selection). According to a call to this interface, the frame calls XFrameEventListener::frameAction with FrameAction::CONTEXT_CHANGED to all listeners which are registered using XFrame::addFrameActionListener . For external controllers this event can be used to requery dispatches. See also XFrameEventListener See also FrameAction See also XFrame::addFrameActionListener()
addFrameActionListener
[oneway] void addFrameActionListener( | [in] XFrameActionListener | Listener );
Description registers an event listener, which will be called when certain things happen to the components within this frame or within sub-frames of this frame. E.g., it is possible to determine instantiation/destruction and activation/deactivation of components. Parameter Listener specifies the listener which will be informed See also XFrame::removeFrameActionListener()
removeFrameActionListener
[oneway] void removeFrameActionListener( | [in] XFrameActionListener | Listener );
Description unregisters an event listener Parameter Listener specifies the listener which willn't be informed any longer See also XFrame::addFrameActionListener()

Top of Page

Copyright © 2003 Sun Microsystems, Inc.