interface XFrame in module com::sun::star::frame::

(Global Index)

Syntax

interface XFrame : com::sun::star::lang::XComponent ;

Description

makes it possible to control a Frame

Method Summary

initialize is called to initialize the frame within a window.

getContainerWindow provides access to the window of the frame.

setCreator sets the frame container that created this frame.

getCreator

getName

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.

getComponentWindow

getController

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 which was registered with XFrame::addFrameActionListener() .

Known Services Which Export this Interface

com::sun::star::frame::DesktopTask

com::sun::star::frame::Frame

Method Details



initialize

Syntax

void initialize (
com::sun::star::awt::XWindow xWindow );

Description

is called to initialize the frame within a window.

See also

XFrame::getContainerWindow

getContainerWindow

Syntax

com::sun::star::awt::XWindow getContainerWindow ();

Description

provides access to the window of the frame.

Normally this is used as the parent window of the controller window.

See also

XFrame::initialize

setCreator

Syntax

oneway void setCreator (
com::sun::star::frame::XFramesSupplier xCreator );

Description

sets the frame container that created this frame.

Only the creator is allowed to call this method.


getCreator

Syntax

com::sun::star::frame::XFramesSupplier getCreator ();

Returns

the frame container that created this frame.

getName

Syntax

string getName ();

Returns

the programmatic name of this frame.

See specification of HTML framesets for reference.


setName

Syntax

oneway void setName (
string aName );

Description

sets the name of the frame.

Normally the name of the frame is set initially.


findFrame

Syntax

com::sun::star::frame::XFrame findFrame (
string aTargetFrameName,
long nSearchFlags );

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", "_active" etc. nSearchFlags is ignored when comparing these names with aTargetFrameName ; further steps are controlled by nSearchFlags . 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 parent frame (if allowed).

If no frame with the given name is found, a new top frame is created; if this is not suppressed by a special FrameSearchFlag . The new frame also gets the desired name.


isTop

Syntax

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. If a frame returns true for this method, all calls to XDispatchProvider::queryDispatch have to stop the search at such a frame unless the flag FrameSearchFlag::TASKS is set.


activate

Syntax

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 , then it broadcasts a 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.


deactivate

Syntax

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 .


isActive

Syntax

boolean isActive ();

Description

determines if the frame is active.


setComponent

Syntax

boolean setComponent (
com::sun::star::awt::XWindow xComponentWindow,
com::sun::star::frame::XController xController );

Description

sets a new component into the frame.


getComponentWindow

Syntax

com::sun::star::awt::XWindow getComponentWindow ();

Returns

the current visible component in this frame.

The frame is the owner of the window.


getController

Syntax

com::sun::star::frame::XController getController ();

Returns

the current controller within this frame.

Normally it is set by a frame loader.


contextChanged

Syntax

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 with FrameAction::CONTEXT_CHANGED to all listeners which are registered using . For external controllers this event can be used to requery dispatches.


addFrameActionListener

Syntax

oneway void addFrameActionListener (
com::sun::star::frame::XFrameActionListener xListener );

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.


removeFrameActionListener

Syntax

oneway void removeFrameActionListener (
com::sun::star::frame::XFrameActionListener xListener );

Description

unregisters an event listener which was registered with XFrame::addFrameActionListener() .

Top of Page