bump product version to 4.2.0.1
[LibreOffice.git] / qadevOOo / runner / helper / PropertyHandlerImpl.java
blob01223bdd1f54d10f26095d5da3168bf7612a2cef
1 /*
2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 package helper;
20 import com.sun.star.beans.UnknownPropertyException;
21 import com.sun.star.inspection.LineDescriptor;
22 import com.sun.star.inspection.XPropertyControlFactory;
23 import com.sun.star.inspection.XPropertyHandler;
25 /**
26 * This implementation of <CODE>PropertyHandler</CODE> does currently nothing.
27 * All methods are implemented, but not filled with content.
28 * @see com.sun.star.inspection.XPropertyHandler
30 public class PropertyHandlerImpl implements XPropertyHandler{
32 /** Creates a new instance of PropertyHandlerImpl */
33 public PropertyHandlerImpl() {
36 /**
37 * This method currently does nothing
38 * @param ActuatingPropertyName the id of the actuating property.
39 * @param NewValue the new value of the property
40 * @param OldValue the old value of the property
41 * @param InspectorUI a callback for updating the object inspector UI
42 * @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.
43 * If false , there was a real ::com::sun::star::beans::XPropertyChangeListener::propertyChange event which triggered the call.
45 * 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 definitely not do this when FirstTimeInit is true .
46 * @throws com.sun.star.lang.NullPointerException ::com::sun::star::lang::NullPointerException if InspectorUI is NULL
48 public void actuatingPropertyChanged(
49 String ActuatingPropertyName,
50 Object NewValue,
51 Object OldValue,
52 com.sun.star.inspection.XObjectInspectorUI InspectorUI,
53 boolean FirstTimeInit)
54 throws com.sun.star.lang.NullPointerException {
57 /**
58 * This method currently does nothing
59 * @param xEventListener the listener to notify about changes
61 public void addEventListener(com.sun.star.lang.XEventListener xEventListener) {
64 /**
65 * This method currently does nothing
66 * @param xPropertyChangeListener the listener to notify about property changes
67 * @throws com.sun.star.lang.NullPointerException com::sun::star::lang::NullPointerException if the listener is NULL
69 public void addPropertyChangeListener(com.sun.star.beans.XPropertyChangeListener xPropertyChangeListener) throws com.sun.star.lang.NullPointerException {
72 /**
73 * This method currently does nothing
74 * @param PropertyName The name of the property whose value is to be converted.
75 * @param PropertyValue The to-be-converted property value.
76 * @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 .
77 * 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 .
79 * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler
80 * @return null
82 public Object convertToControlValue(
83 String PropertyName,
84 Object PropertyValue,
85 com.sun.star.uno.Type ControlValueType)
86 throws com.sun.star.beans.UnknownPropertyException {
87 return null;
90 /**
91 * This method currently does nothing
92 * @param PropertyName The name of the conversion's target property.
93 * @param ControlValue The to-be-converted control value. This value has been obtained from an XPropertyControl , using its Value attribute.
94 * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler
95 * @return null
97 public Object convertToPropertyValue(String PropertyName, Object ControlValue) throws com.sun.star.beans.UnknownPropertyException {
98 return null;
102 * This method currently does nothing
103 * @param PropertyName the name of the property whose user interface is to be described
104 * @param ControlFactory a factory for creating XPropertyControl instances. Must not be NULL .
105 * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by this handler
106 * @throws com.sun.star.lang.NullPointerException ::com::sun::star::lang::NullPointerException if ControlFactory is NULL .
108 public LineDescriptor describePropertyLine(
109 String PropertyName,
110 com.sun.star.inspection.XPropertyControlFactory ControlFactory)
111 throws com.sun.star.beans.UnknownPropertyException,
112 com.sun.star.lang.NullPointerException {
113 return null;
117 * This method currently does nothing
119 public void dispose() {
123 * This method currently does nothing
124 * @return null
126 public String[] getActuatingProperties() {
127 return null;
131 * This method currently does nothing
132 * @param PropertyName the name of the property whose state is to be retrieved
133 * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler
134 * @return null
136 public com.sun.star.beans.PropertyState getPropertyState(String PropertyName)
137 throws com.sun.star.beans.UnknownPropertyException {
138 return null;
142 * This method currently does nothing
143 * @param PropertyName the name of the property whose value is to be retrieved
144 * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler
145 * @return null
147 public Object getPropertyValue(String PropertyName) throws com.sun.star.beans.UnknownPropertyException {
148 return null;
152 * This method currently does nothing
153 * @return null
155 public String[] getSupersededProperties() {
156 return null;
160 * This method currently does nothing
161 * @return null
163 public com.sun.star.beans.Property[] getSupportedProperties() {
164 return null;
168 * This method currently does nothing
169 * @param Component the component to inspect. Must not be NULL
170 * @throws com.sun.star.lang.NullPointerException com::sun::star::lang::NullPointerException if the component is NULL
172 public void inspect(Object Component) throws com.sun.star.lang.NullPointerException {
176 * This method currently does nothing
177 * @param PropertyName the name of the property whose composability is to be determined
178 * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler
181 * @return null
183 public boolean isComposable(String PropertyName) throws com.sun.star.beans.UnknownPropertyException {
184 return false;
188 * This method currently does nothing
189 * @param PropertyName The name of the property whose browse button has been clicked
190 * @param Primary true if and only if the primary button has been clicked, false otherwise
191 * @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.
192 * @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.
194 * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler
195 * @throws com.sun.star.lang.NullPointerException ::com::sun::star::lang::NullPointerException if InspectorUI is NULL
196 * @return null
198 public com.sun.star.inspection.InteractiveSelectionResult onInteractivePropertySelection(
199 String PropertyName,
200 boolean Primary,
201 Object[] out_Data,
202 com.sun.star.inspection.XObjectInspectorUI InspectorUI)
203 throws com.sun.star.beans.UnknownPropertyException,
204 com.sun.star.lang.NullPointerException {
205 return null;
209 * This method currently does nothing
210 * @param xEventListener the listener to be revoked
212 public void removeEventListener(com.sun.star.lang.XEventListener xEventListener) {
216 * This method currently does nothing
217 * @param xPropertyChangeListener the listener to be revoke
219 public void removePropertyChangeListener(com.sun.star.beans.XPropertyChangeListener xPropertyChangeListener) {
223 * This method currently does nothing
224 * @param PropertyName the name of the property whose value is to be set
225 * @param Value the property value to set
226 * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler
228 public void setPropertyValue(String PropertyName, Object Value) throws com.sun.star.beans.UnknownPropertyException {
232 * This method currently does nothing
233 * @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.
234 * @return false
236 public boolean suspend(boolean Suspend) {
237 return false;
241 * This method currently does nothing
243 public void describePropertyLine(String string, LineDescriptor[] lineDescriptor, XPropertyControlFactory xPropertyControlFactory) throws UnknownPropertyException, com.sun.star.lang.NullPointerException {