update dev300-m58
[ooovba.git] / qadevOOo / runner / helper / PropertyHandlerImpl.java
blob6705889cc282a812944404709f96b09b0e24d638
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: PropertyHandlerImpl.java,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 package helper;
32 import com.sun.star.beans.UnknownPropertyException;
33 import com.sun.star.inspection.LineDescriptor;
34 import com.sun.star.inspection.XPropertyControlFactory;
35 import com.sun.star.inspection.XPropertyHandler;
37 /**
38 * This implementation of <CODE>PropertyHandler</CODE> do currently nothig.
39 * All methods are implemented, but not filled with content.
40 * @see com.sun.star.inspection.XPropertyHandler
42 public class PropertyHandlerImpl implements XPropertyHandler{
44 /** Creates a new instance of PropertyHandlerImpl */
45 public PropertyHandlerImpl() {
48 /**
49 * This method currently do nothig
50 * @param ActuatingPropertyName the id of the actuating property.
51 * @param NewValue the new value of the property
52 * @param OldValue the old value of the property
53 * @param InspectorUI a callback for updating the object inspector UI
54 * @param FirstTimeInit If true , the method is called for the first-time update of the respective property, that is, when the property browser is just initializing with the properties of the introspected object.
55 * If false , there was a real ::com::sun::star::beans::XPropertyChangeListener::propertyChange event which triggered the call.
57 * In some cases it may be necessary to differentiate between both situations. For instance, if you want to set the value of another property when an actuating property's value changed, you should definately not do this when FirstTimeInit is true .
58 * @throws com.sun.star.lang.NullPointerException ::com::sun::star::lang::NullPointerException if InspectorUI is NULL
60 public void actuatingPropertyChanged(
61 String ActuatingPropertyName,
62 Object NewValue,
63 Object OldValue,
64 com.sun.star.inspection.XObjectInspectorUI InspectorUI,
65 boolean FirstTimeInit)
66 throws com.sun.star.lang.NullPointerException {
69 /**
70 * This method currently do nothig
71 * @param xEventListener the listener to notify about changes
73 public void addEventListener(com.sun.star.lang.XEventListener xEventListener) {
76 /**
77 * This method currently do nothig
78 * @param xPropertyChangeListener the listener to notify about property changes
79 * @throws com.sun.star.lang.NullPointerException com::sun::star::lang::NullPointerException if the listener is NULL
81 public void addPropertyChangeListener(com.sun.star.beans.XPropertyChangeListener xPropertyChangeListener) throws com.sun.star.lang.NullPointerException {
84 /**
85 * This method currently do nothig
86 * @param PropertyName The name of the property whose value is to be converted.
87 * @param PropertyValue The to-be-converted property value.
88 * @param ControlValueType The target type of the conversion. This type is determined by the control which is used to display the property, which in turn is determined by the handler itself in describePropertyLine .
89 * Speaking strictly, this is passed for convenience only, since every XPropertyHandler implementation should know exactly which type to expect, since it implicitly determined this type in describePropertyLine by creating an appropriate XPropertyControl .
91 * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler
92 * @return null
94 public Object convertToControlValue(
95 String PropertyName,
96 Object PropertyValue,
97 com.sun.star.uno.Type ControlValueType)
98 throws com.sun.star.beans.UnknownPropertyException {
99 return null;
103 * This method currently do nothig
104 * @param PropertyName The name of the conversion's target property.
105 * @param ControlValue The to-be-converted control value. This value has been obtained from an XPropertyControl , using its Value attribute.
106 * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler
107 * @return null
109 public Object convertToPropertyValue(String PropertyName, Object ControlValue) throws com.sun.star.beans.UnknownPropertyException {
110 return null;
114 * This method currently do nothig
115 * @param PropertyName the name of the property whose user interface is to be described
116 * @param out_Descriptor the descriptor of the property line, to be filled by the XPropertyHandler implementation
117 * @param ControlFactory a factory for creating XPropertyControl instances. Must not be NULL .
118 * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by this handler
120 * @throws com.sun.star.lang.NullPointerException ::com::sun::star::lang::NullPointerException if ControlFactory is NULL .
122 public LineDescriptor describePropertyLine(
123 String PropertyName,
124 com.sun.star.inspection.XPropertyControlFactory ControlFactory)
125 throws com.sun.star.beans.UnknownPropertyException,
126 com.sun.star.lang.NullPointerException {
127 return null;
131 * This method currently do nothig
133 public void dispose() {
137 * This method currently do nothig
138 * @return null
140 public String[] getActuatingProperties() {
141 return null;
145 * This method currently do nothig
146 * @param PropertyName the name of the property whose state is to be retrieved
147 * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler
148 * @return null
150 public com.sun.star.beans.PropertyState getPropertyState(String PropertyName)
151 throws com.sun.star.beans.UnknownPropertyException {
152 return null;
156 * This method currently do nothig
157 * @param PropertyName the name of the property whose value is to be retrieved
158 * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler
159 * @return null
161 public Object getPropertyValue(String PropertyName) throws com.sun.star.beans.UnknownPropertyException {
162 return null;
166 * This method currently do nothig
167 * @return null
169 public String[] getSupersededProperties() {
170 return null;
174 * This method currently do nothig
175 * @return null
177 public com.sun.star.beans.Property[] getSupportedProperties() {
178 return null;
182 * This method currently do nothig
183 * @param Component the component to inspect. Must not be NULL
184 * @throws com.sun.star.lang.NullPointerException com::sun::star::lang::NullPointerException if the component is NULL
186 public void inspect(Object Component) throws com.sun.star.lang.NullPointerException {
190 * This method currently do nothig
191 * @param PropertyName the name of the property whose composability is to be determined
192 * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler
195 * @return null
197 public boolean isComposable(String PropertyName) throws com.sun.star.beans.UnknownPropertyException {
198 return false;
202 * This method currently do nothig
203 * @param PropertyName The name of the property whose browse button has been clicked
204 * @param Primary true if and only if the primary button has been clicked, false otherwise
205 * @param out_Data If the method returns InteractiveSelectionResult::ObtainedValue , then _rData contains the value which has been interactively obtained from the user, and which still needs to be set at the inspected component.
206 * @param InspectorUI provides access to the object inspector UI. Implementations should use this if the property selection requires non-modal user input. In those cases, onInteractivePropertySelection should return InteractiveSelectionResult::Pending , and the UI for (at least) the property whose input is still pending should be disabled.
208 * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler
209 * @throws com.sun.star.lang.NullPointerException ::com::sun::star::lang::NullPointerException if InspectorUI is NULL
210 * @return null
212 public com.sun.star.inspection.InteractiveSelectionResult onInteractivePropertySelection(
213 String PropertyName,
214 boolean Primary,
215 Object[] out_Data,
216 com.sun.star.inspection.XObjectInspectorUI InspectorUI)
217 throws com.sun.star.beans.UnknownPropertyException,
218 com.sun.star.lang.NullPointerException {
219 return null;
223 * This method currently do nothig
224 * @param xEventListener the listener to be revoked
226 public void removeEventListener(com.sun.star.lang.XEventListener xEventListener) {
230 * This method currently do nothig
231 * @param xPropertyChangeListener the listener to be revoke
233 public void removePropertyChangeListener(com.sun.star.beans.XPropertyChangeListener xPropertyChangeListener) {
237 * This method currently do nothig
238 * @param PropertyName the name of the property whose value is to be set
239 * @param Value the property value to set
240 * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler
242 public void setPropertyValue(String PropertyName, Object Value) throws com.sun.star.beans.UnknownPropertyException {
246 * This method currently do nothig
247 * @param Suspend Whether the handler is to be suspended true or reactivated ( false ). The latter happens if a handler was successfully suspended, but an external instance vetoed the whole suspension process.
248 * @return false
250 public boolean suspend(boolean Suspend) {
251 return false;
255 * This method currently do nothig
258 public void describePropertyLine(String string, LineDescriptor[] lineDescriptor, XPropertyControlFactory xPropertyControlFactory) throws UnknownPropertyException, com.sun.star.lang.NullPointerException {