Issue 76890 - WindowAttribute "Closable" does not work as expected
Summary: WindowAttribute "Closable" does not work as expected
Status: ACCEPTED
Alias: None
Product: General
Classification: Code
Component: scripting (show other issues)
Version: 680m201
Hardware: All All
: P3 Trivial (vote)
Target Milestone: AOO Later
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-03 09:46 UTC by berend.cornelius
Modified: 2013-02-07 21:54 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Sourcecode with the relevant method (6.92 KB, text/plain)
2007-05-03 09:48 UTC, berend.cornelius
no flags Details
Parent class of the sourcecode (71.76 KB, text/plain)
2007-05-03 09:49 UTC, berend.cornelius
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description berend.cornelius 2007-05-03 09:46:05 UTC
The created window contains a closing button, but clicking on it does not have
any effect. I will attach two source files from the awt examples in which such a
window is created. The relevant sourcecode is within the method "showTopWindow(
Rectangle _aRectangle)":

    // The Toolkit is the creator of all windows...
    Object oToolkit =
m_xMCF.createInstanceWithContext("com.sun.star.awt.Toolkit", m_xContext);
    XToolkit xToolkit = (XToolkit) UnoRuntime.queryInterface(XToolkit.class,
oToolkit);

    // set up a window description and create the window. A parent window is
always necessary for this...
    com.sun.star.awt.WindowDescriptor aWindowDescriptor = new
com.sun.star.awt.WindowDescriptor();
    // a TopWindow is contains a title bar and is able to inlude menus...
    aWindowDescriptor.Type = WindowClass.TOP; 
    // specify the position and height of the window on the parent window
    aWindowDescriptor.Bounds = _aRectangle;
    // set the window attributes...
    aWindowDescriptor.WindowAttributes = WindowAttribute.SHOW +
WindowAttribute.MOVEABLE + WindowAttribute.SIZEABLE + WindowAttribute.CLOSEABLE;
    
    // create the window...
    XWindowPeer xWindowPeer = xToolkit.createWindow(aWindowDescriptor);
    XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class,
xWindowPeer);

    // create a frame and initialize it with the created window...
    Object oFrame = m_xMCF.createInstanceWithContext("com.sun.star.frame.Frame",
m_xContext);
    m_xFrame = (XFrame) UnoRuntime.queryInterface(XFrame.class, oFrame);
    
    Object oDesktop =
m_xMCF.createInstanceWithContext("com.sun.star.frame.Desktop", m_xContext); 
    XFramesSupplier xFramesSupplier = (XFramesSupplier)
UnoRuntime.queryInterface(XFramesSupplier.class, oDesktop);
    m_xFrame.setCreator(xFramesSupplier);
    // get the XTopWindow interface..
    xTopWindow = (XTopWindow) UnoRuntime.queryInterface(XTopWindow.class, xWindow);
Comment 1 berend.cornelius 2007-05-03 09:48:06 UTC
Created attachment 44825 [details]
Sourcecode with the relevant method
Comment 2 berend.cornelius 2007-05-03 09:49:11 UTC
Created attachment 44826 [details]
Parent class of the sourcecode
Comment 3 carsten.driesner 2007-05-03 15:06:29 UTC
cd: Accepted.