/* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
/** * For the cfgmgr2.OSetElement tests: dispose the owner element.
*/ publicvoid before() { // do not dispose this component, but parent instead
altDispose = (XComponent)tEnv.get("XComponent.DisposeThis");
}
/** * Adds two listeners. <p> * Has OK status if then the first listener will receive an event * on <code>dispose</code> method call.
*/ publicboolean _addEventListener() {
/** * Removes the second of two added listeners. <p> * Method tests to be completed successfully : * <ul> * <li> <code>addEventListener</code> : method must add two listeners. </li> * </ul> <p> * Has OK status if no events will be sent to the second listener on * <code>dispose</code> method call.
*/ publicboolean _removeEventListener() { if (disposed)
{
System.out.println("Hint: already disposed."); returnfalse;
} // the second listener should not be called
oObj.removeEventListener( listener2 );
System.out.println(Thread.currentThread() + " is removing EL " + listener2); returntrue;
} // finished _removeEventListener()
privateboolean disposed = false;
/** * Disposes the object and then check appropriate listeners were * called or not. <p> * Method tests to be completed successfully : * <ul> * <li> <code>removeEventListener</code> : method must remove one of two * listeners. </li> * </ul> <p> * Has OK status if liseter removed wasn't called and other listener * was.
*/ publicboolean _dispose() {
disposed = false;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.