1*ef39d40dSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*ef39d40dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*ef39d40dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*ef39d40dSAndrew Rist  * distributed with this work for additional information
6*ef39d40dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*ef39d40dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*ef39d40dSAndrew Rist  * "License"); you may not use this file except in compliance
9*ef39d40dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*ef39d40dSAndrew Rist  *
11*ef39d40dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*ef39d40dSAndrew Rist  *
13*ef39d40dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*ef39d40dSAndrew Rist  * software distributed under the License is distributed on an
15*ef39d40dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*ef39d40dSAndrew Rist  * KIND, either express or implied.  See the License for the
17*ef39d40dSAndrew Rist  * specific language governing permissions and limitations
18*ef39d40dSAndrew Rist  * under the License.
19*ef39d40dSAndrew Rist  *
20*ef39d40dSAndrew Rist  *************************************************************/
21*ef39d40dSAndrew Rist 
22*ef39d40dSAndrew Rist 
23cdf0e10cSrcweir package helper;
24cdf0e10cSrcweir 
25cdf0e10cSrcweir import com.sun.star.beans.UnknownPropertyException;
26cdf0e10cSrcweir import com.sun.star.inspection.LineDescriptor;
27cdf0e10cSrcweir import com.sun.star.inspection.XPropertyControlFactory;
28cdf0e10cSrcweir import com.sun.star.inspection.XPropertyHandler;
29cdf0e10cSrcweir 
30cdf0e10cSrcweir /**
31cdf0e10cSrcweir  * This implementation of <CODE>PropertyHandler</CODE> do currently nothig.
32cdf0e10cSrcweir  * All methods are implemented, but not filled with content.
33cdf0e10cSrcweir  * @see com.sun.star.inspection.XPropertyHandler
34cdf0e10cSrcweir  */
35cdf0e10cSrcweir public class PropertyHandlerImpl implements XPropertyHandler{
36cdf0e10cSrcweir 
37cdf0e10cSrcweir     /** Creates a new instance of PropertyHandlerImpl */
38cdf0e10cSrcweir     public PropertyHandlerImpl() {
39cdf0e10cSrcweir     }
40cdf0e10cSrcweir 
41cdf0e10cSrcweir     /**
42cdf0e10cSrcweir      * This method currently do nothig
43cdf0e10cSrcweir      * @param ActuatingPropertyName the id of the actuating property.
44cdf0e10cSrcweir      * @param NewValue the new value of the property
45cdf0e10cSrcweir      * @param OldValue the old value of the property
46cdf0e10cSrcweir      * @param InspectorUI a callback for updating the object inspector UI
47cdf0e10cSrcweir      * @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.
48cdf0e10cSrcweir      * If false , there was a real ::com::sun::star::beans::XPropertyChangeListener::propertyChange event which triggered the call.
49cdf0e10cSrcweir      *
50cdf0e10cSrcweir      * 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 .
51cdf0e10cSrcweir      * @throws com.sun.star.lang.NullPointerException ::com::sun::star::lang::NullPointerException if InspectorUI is NULL
52cdf0e10cSrcweir      */
53cdf0e10cSrcweir     public void actuatingPropertyChanged(
54cdf0e10cSrcweir             String ActuatingPropertyName,
55cdf0e10cSrcweir             Object NewValue,
56cdf0e10cSrcweir             Object OldValue,
57cdf0e10cSrcweir             com.sun.star.inspection.XObjectInspectorUI InspectorUI,
58cdf0e10cSrcweir             boolean FirstTimeInit)
59cdf0e10cSrcweir             throws com.sun.star.lang.NullPointerException {
60cdf0e10cSrcweir     }
61cdf0e10cSrcweir 
62cdf0e10cSrcweir     /**
63cdf0e10cSrcweir      * This method currently do nothig
64cdf0e10cSrcweir      * @param xEventListener the listener to notify about changes
65cdf0e10cSrcweir      */
66cdf0e10cSrcweir     public void addEventListener(com.sun.star.lang.XEventListener xEventListener) {
67cdf0e10cSrcweir     }
68cdf0e10cSrcweir 
69cdf0e10cSrcweir     /**
70cdf0e10cSrcweir      * This method currently do nothig
71cdf0e10cSrcweir      * @param xPropertyChangeListener the listener to notify about property changes
72cdf0e10cSrcweir      * @throws com.sun.star.lang.NullPointerException com::sun::star::lang::NullPointerException if the listener is NULL
73cdf0e10cSrcweir      */
74cdf0e10cSrcweir     public void addPropertyChangeListener(com.sun.star.beans.XPropertyChangeListener xPropertyChangeListener) throws com.sun.star.lang.NullPointerException {
75cdf0e10cSrcweir     }
76cdf0e10cSrcweir 
77cdf0e10cSrcweir     /**
78cdf0e10cSrcweir      * This method currently do nothig
79cdf0e10cSrcweir      * @param PropertyName The name of the property whose value is to be converted.
80cdf0e10cSrcweir      * @param PropertyValue The to-be-converted property value.
81cdf0e10cSrcweir      * @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 .
82cdf0e10cSrcweir      *    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 .
83cdf0e10cSrcweir      *
84cdf0e10cSrcweir      * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler
85cdf0e10cSrcweir      * @return null
86cdf0e10cSrcweir      */
87cdf0e10cSrcweir     public Object convertToControlValue(
88cdf0e10cSrcweir             String PropertyName,
89cdf0e10cSrcweir             Object PropertyValue,
90cdf0e10cSrcweir             com.sun.star.uno.Type ControlValueType)
91cdf0e10cSrcweir             throws com.sun.star.beans.UnknownPropertyException {
92cdf0e10cSrcweir         return null;
93cdf0e10cSrcweir     }
94cdf0e10cSrcweir 
95cdf0e10cSrcweir     /**
96cdf0e10cSrcweir      * This method currently do nothig
97cdf0e10cSrcweir      * @param PropertyName The name of the conversion's target property.
98cdf0e10cSrcweir      * @param ControlValue The to-be-converted control value. This value has been obtained from an XPropertyControl , using its Value attribute.
99cdf0e10cSrcweir      * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler
100cdf0e10cSrcweir      * @return null
101cdf0e10cSrcweir      */
102cdf0e10cSrcweir     public Object convertToPropertyValue(String PropertyName, Object ControlValue) throws com.sun.star.beans.UnknownPropertyException {
103cdf0e10cSrcweir         return null;
104cdf0e10cSrcweir     }
105cdf0e10cSrcweir 
106cdf0e10cSrcweir     /**
107cdf0e10cSrcweir      * This method currently do nothig
108cdf0e10cSrcweir      * @param PropertyName the name of the property whose user interface is to be described
109cdf0e10cSrcweir      * @param  out_Descriptor the descriptor of the property line, to be filled by the XPropertyHandler implementation
110cdf0e10cSrcweir      * @param ControlFactory a factory for creating XPropertyControl instances. Must not be NULL .
111cdf0e10cSrcweir      * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by this handler
112cdf0e10cSrcweir      *
113cdf0e10cSrcweir      * @throws com.sun.star.lang.NullPointerException ::com::sun::star::lang::NullPointerException if ControlFactory is NULL .
114cdf0e10cSrcweir      */
115cdf0e10cSrcweir     public LineDescriptor describePropertyLine(
116cdf0e10cSrcweir             String PropertyName,
117cdf0e10cSrcweir             com.sun.star.inspection.XPropertyControlFactory ControlFactory)
118cdf0e10cSrcweir             throws com.sun.star.beans.UnknownPropertyException,
119cdf0e10cSrcweir             com.sun.star.lang.NullPointerException {
120cdf0e10cSrcweir         return null;
121cdf0e10cSrcweir     }
122cdf0e10cSrcweir 
123cdf0e10cSrcweir     /**
124cdf0e10cSrcweir      * This method currently do nothig
125cdf0e10cSrcweir      */
126cdf0e10cSrcweir     public void dispose() {
127cdf0e10cSrcweir     }
128cdf0e10cSrcweir 
129cdf0e10cSrcweir     /**
130cdf0e10cSrcweir      * This method currently do nothig
131cdf0e10cSrcweir      * @return null
132cdf0e10cSrcweir      */
133cdf0e10cSrcweir     public String[] getActuatingProperties() {
134cdf0e10cSrcweir         return null;
135cdf0e10cSrcweir     }
136cdf0e10cSrcweir 
137cdf0e10cSrcweir     /**
138cdf0e10cSrcweir      * This method currently do nothig
139cdf0e10cSrcweir      * @param PropertyName the name of the property whose state is to be retrieved
140cdf0e10cSrcweir      * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler
141cdf0e10cSrcweir      * @return null
142cdf0e10cSrcweir      */
143cdf0e10cSrcweir     public com.sun.star.beans.PropertyState getPropertyState(String PropertyName)
144cdf0e10cSrcweir     throws com.sun.star.beans.UnknownPropertyException {
145cdf0e10cSrcweir         return null;
146cdf0e10cSrcweir     }
147cdf0e10cSrcweir 
148cdf0e10cSrcweir     /**
149cdf0e10cSrcweir      * This method currently do nothig
150cdf0e10cSrcweir      * @param PropertyName the name of the property whose value is to be retrieved
151cdf0e10cSrcweir      * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler
152cdf0e10cSrcweir      * @return null
153cdf0e10cSrcweir      */
154cdf0e10cSrcweir     public Object getPropertyValue(String PropertyName) throws com.sun.star.beans.UnknownPropertyException {
155cdf0e10cSrcweir         return null;
156cdf0e10cSrcweir     }
157cdf0e10cSrcweir 
158cdf0e10cSrcweir     /**
159cdf0e10cSrcweir      * This method currently do nothig
160cdf0e10cSrcweir      * @return null
161cdf0e10cSrcweir      */
162cdf0e10cSrcweir     public String[] getSupersededProperties() {
163cdf0e10cSrcweir         return null;
164cdf0e10cSrcweir     }
165cdf0e10cSrcweir 
166cdf0e10cSrcweir     /**
167cdf0e10cSrcweir      * This method currently do nothig
168cdf0e10cSrcweir      * @return null
169cdf0e10cSrcweir      */
170cdf0e10cSrcweir     public com.sun.star.beans.Property[] getSupportedProperties() {
171cdf0e10cSrcweir         return null;
172cdf0e10cSrcweir     }
173cdf0e10cSrcweir 
174cdf0e10cSrcweir     /**
175cdf0e10cSrcweir      * This method currently do nothig
176cdf0e10cSrcweir      * @param Component the component to inspect. Must not be NULL
177cdf0e10cSrcweir      * @throws com.sun.star.lang.NullPointerException com::sun::star::lang::NullPointerException if the component is NULL
178cdf0e10cSrcweir      */
179cdf0e10cSrcweir     public void inspect(Object Component) throws com.sun.star.lang.NullPointerException {
180cdf0e10cSrcweir     }
181cdf0e10cSrcweir 
182cdf0e10cSrcweir     /**
183cdf0e10cSrcweir      * This method currently do nothig
184cdf0e10cSrcweir      * @param PropertyName the name of the property whose composability is to be determined
185cdf0e10cSrcweir      * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler
186cdf0e10cSrcweir      *
187cdf0e10cSrcweir      *
188cdf0e10cSrcweir      * @return null
189cdf0e10cSrcweir      */
190cdf0e10cSrcweir     public boolean isComposable(String PropertyName) throws com.sun.star.beans.UnknownPropertyException {
191cdf0e10cSrcweir         return false;
192cdf0e10cSrcweir     }
193cdf0e10cSrcweir 
194cdf0e10cSrcweir     /**
195cdf0e10cSrcweir      * This method currently do nothig
196cdf0e10cSrcweir      * @param PropertyName The name of the property whose browse button has been clicked
197cdf0e10cSrcweir      * @param Primary true if and only if the primary button has been clicked, false otherwise
198cdf0e10cSrcweir      * @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.
199cdf0e10cSrcweir      * @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.
200cdf0e10cSrcweir      *
201cdf0e10cSrcweir      * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler
202cdf0e10cSrcweir      * @throws com.sun.star.lang.NullPointerException ::com::sun::star::lang::NullPointerException if InspectorUI is NULL
203cdf0e10cSrcweir      * @return null
204cdf0e10cSrcweir      */
205cdf0e10cSrcweir     public com.sun.star.inspection.InteractiveSelectionResult onInteractivePropertySelection(
206cdf0e10cSrcweir             String PropertyName,
207cdf0e10cSrcweir             boolean Primary,
208cdf0e10cSrcweir             Object[] out_Data,
209cdf0e10cSrcweir             com.sun.star.inspection.XObjectInspectorUI InspectorUI)
210cdf0e10cSrcweir             throws com.sun.star.beans.UnknownPropertyException,
211cdf0e10cSrcweir             com.sun.star.lang.NullPointerException {
212cdf0e10cSrcweir         return null;
213cdf0e10cSrcweir     }
214cdf0e10cSrcweir 
215cdf0e10cSrcweir     /**
216cdf0e10cSrcweir      * This method currently do nothig
217cdf0e10cSrcweir      * @param xEventListener the listener to be revoked
218cdf0e10cSrcweir      */
219cdf0e10cSrcweir     public void removeEventListener(com.sun.star.lang.XEventListener xEventListener) {
220cdf0e10cSrcweir     }
221cdf0e10cSrcweir 
222cdf0e10cSrcweir     /**
223cdf0e10cSrcweir      * This method currently do nothig
224cdf0e10cSrcweir      * @param xPropertyChangeListener the listener to be revoke
225cdf0e10cSrcweir      */
226cdf0e10cSrcweir     public void removePropertyChangeListener(com.sun.star.beans.XPropertyChangeListener xPropertyChangeListener) {
227cdf0e10cSrcweir     }
228cdf0e10cSrcweir 
229cdf0e10cSrcweir     /**
230cdf0e10cSrcweir      * This method currently do nothig
231cdf0e10cSrcweir      * @param PropertyName the name of the property whose value is to be set
232cdf0e10cSrcweir      * @param Value the property value to set
233cdf0e10cSrcweir      * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler
234cdf0e10cSrcweir      */
235cdf0e10cSrcweir     public void setPropertyValue(String PropertyName, Object Value) throws com.sun.star.beans.UnknownPropertyException {
236cdf0e10cSrcweir     }
237cdf0e10cSrcweir 
238cdf0e10cSrcweir     /**
239cdf0e10cSrcweir      * This method currently do nothig
240cdf0e10cSrcweir      * @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.
241cdf0e10cSrcweir      * @return false
242cdf0e10cSrcweir      */
243cdf0e10cSrcweir     public boolean suspend(boolean Suspend) {
244cdf0e10cSrcweir         return false;
245cdf0e10cSrcweir     }
246cdf0e10cSrcweir 
247cdf0e10cSrcweir     /**
248cdf0e10cSrcweir      * This method currently do nothig
249cdf0e10cSrcweir      */
250cdf0e10cSrcweir 
251cdf0e10cSrcweir     public void describePropertyLine(String string, LineDescriptor[] lineDescriptor, XPropertyControlFactory xPropertyControlFactory) throws UnknownPropertyException, com.sun.star.lang.NullPointerException {
252cdf0e10cSrcweir     }
253cdf0e10cSrcweir 
254cdf0e10cSrcweir }
255