Kaydet (Commit) be36698f authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Revert bean part of "java: remove dead methods"

...34bcf9b4; bean is a client API, not dead
code.

Change-Id: Iea17b6306152b9a4f2968bed550a44917803d9ec
üst 3ff2e4dc
......@@ -27,6 +27,7 @@ $(eval $(call gb_Jar_add_sourcefiles,officebean,\
bean/com/sun/star/beans/NativeConnection \
bean/com/sun/star/beans/NativeService \
bean/com/sun/star/beans/OfficeConnection \
bean/com/sun/star/beans/OfficeWindow \
bean/com/sun/star/comp/beans/ContainerFactory \
bean/com/sun/star/comp/beans/Controller \
bean/com/sun/star/comp/beans/Frame \
......
......@@ -18,6 +18,8 @@
package com.sun.star.beans;
import java.awt.Container;
/**
* This interface reprecents an AWT container factory.
*
......@@ -27,5 +29,10 @@ package com.sun.star.beans;
public interface ContainerFactory
{
/**
* Creates an AWT container.
*
* @return An AWT container.
*/
Container createContainer();
}
......@@ -18,6 +18,7 @@
package com.sun.star.beans;
import java.awt.Container;
import java.io.File;
import java.util.Iterator;
import java.util.List;
......@@ -157,6 +158,19 @@ public class LocalOfficeConnection
return mContext;
}
/**
* Creates an office window.
* The window is either a sub-class of java.awt.Canvas (local) or
* java.awt.Container (RVP).
*
* @param container This is an AWT container.
* @return The office window instance.
*/
public OfficeWindow createOfficeWindow(Container container)
{
return new LocalOfficeWindow(this);
}
/**
* Closes the connection.
*/
......
......@@ -42,7 +42,7 @@ import com.sun.star.uno.XComponentContext;
*/
public class LocalOfficeWindow
extends java.awt.Canvas
implements XEventListener
implements OfficeWindow, XEventListener
{
private transient OfficeConnection mConnection;
private transient XWindowPeer mParentProxy;
......
......@@ -20,6 +20,7 @@ package com.sun.star.beans;
import com.sun.star.lang.XComponent;
import com.sun.star.uno.XComponentContext;
import java.awt.Container;
/**
* This abstract class reprecents a connection to the office
......@@ -37,7 +38,13 @@ public interface OfficeConnection
void setUnoUrl(String url)
throws java.net.MalformedURLException;
/**
* Sets an AWT container catory.
*
* @param containerFactory This is a application provided AWT container
* factory.
*/
void setContainerFactory(ContainerFactory containerFactory);
/**
* Retrieves the UNO component context.
......@@ -48,5 +55,15 @@ public interface OfficeConnection
*/
XComponentContext getComponentContext();
/**
* Creates an office window.
* The window is either a sub-class of java.awt.Canvas (local) or
* java.awt.Container (RVP).
*
* This method does not add add the office window to its container.
*
* @param container This is an AWT container.
* @return The office window instance.
*/
OfficeWindow createOfficeWindow(Container container);
}
/*
* 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 .
*/
package com.sun.star.beans;
import java.awt.Component;
import com.sun.star.awt.XWindowPeer;
/**
* The concreate implementation of the OfficeWindow extends an
* approperate type of visual component (java.awt.Canvas for local
* and java.awt.Container for remote).
* @deprecated
*/
public interface OfficeWindow
{
/**
* Retrieves an AWT component object associated with the OfficeWindow.
*
* @return The AWT component object associated with the OfficeWindow.
*/
Component getAWTComponent();
/**
* Retrieves an UNO XWindowPeer object associated with the OfficeWindow.
*
* @return The UNO XWindowPeer object associated with the OfficeWindow.
*/
XWindowPeer getUNOWindowPeer();
}
......@@ -18,6 +18,8 @@
package com.sun.star.comp.beans;
import java.awt.Container;
/**
* This interface represents an AWT container factory.
*
......@@ -27,5 +29,10 @@ package com.sun.star.comp.beans;
public interface ContainerFactory
{
/**
* Creates an AWT container.
*
* @return An AWT container.
*/
Container createContainer();
}
......@@ -83,7 +83,13 @@ public class Controller
// com.sun.star.frame.XDispatchProvider
public com.sun.star.frame.XDispatch queryDispatch(
/*IN*/ com.sun.star.util.URL aURL,
/*IN*/ String aTargetFrameName,
/*IN*/ int nSearchFlags )
{
return xDispatchProvider.queryDispatch( aURL, aTargetFrameName, nSearchFlags );
}
public com.sun.star.frame.XDispatch[] queryDispatches(
/*IN*/ com.sun.star.frame.DispatchDescriptor[] aRequests )
......
......@@ -40,7 +40,13 @@ public interface OfficeConnection
void setUnoUrl(String url)
throws java.net.MalformedURLException;
/**
* Sets an AWT container catory.
*
* @param containerFactory This is a application provided AWT container
* factory.
*/
void setContainerFactory(ContainerFactory containerFactory);
/**
* Retrieves the UNO component context.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment