1ef39d40dSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3ef39d40dSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4ef39d40dSAndrew Rist * or more contributor license agreements. See the NOTICE file 5ef39d40dSAndrew Rist * distributed with this work for additional information 6ef39d40dSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7ef39d40dSAndrew Rist * to you under the Apache License, Version 2.0 (the 8ef39d40dSAndrew Rist * "License"); you may not use this file except in compliance 9ef39d40dSAndrew Rist * with the License. You may obtain a copy of the License at 10ef39d40dSAndrew Rist * 11ef39d40dSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12ef39d40dSAndrew Rist * 13ef39d40dSAndrew Rist * Unless required by applicable law or agreed to in writing, 14ef39d40dSAndrew Rist * software distributed under the License is distributed on an 15ef39d40dSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16ef39d40dSAndrew Rist * KIND, either express or implied. See the License for the 17ef39d40dSAndrew Rist * specific language governing permissions and limitations 18ef39d40dSAndrew Rist * under the License. 19ef39d40dSAndrew Rist * 20ef39d40dSAndrew Rist *************************************************************/ 21ef39d40dSAndrew Rist 22ef39d40dSAndrew 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 */ PropertyHandlerImpl()38cdf0e10cSrcweir public PropertyHandlerImpl() { 39cdf0e10cSrcweir } 40cdf0e10cSrcweir 41cdf0e10cSrcweir /** 42*242829adSPedro Giffuni * This method currently does nothing 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 */ actuatingPropertyChanged( String ActuatingPropertyName, Object NewValue, Object OldValue, com.sun.star.inspection.XObjectInspectorUI InspectorUI, boolean FirstTimeInit)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 /** 63*242829adSPedro Giffuni * This method currently does nothing 64cdf0e10cSrcweir * @param xEventListener the listener to notify about changes 65cdf0e10cSrcweir */ addEventListener(com.sun.star.lang.XEventListener xEventListener)66cdf0e10cSrcweir public void addEventListener(com.sun.star.lang.XEventListener xEventListener) { 67cdf0e10cSrcweir } 68cdf0e10cSrcweir 69cdf0e10cSrcweir /** 70*242829adSPedro Giffuni * This method currently does nothing 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 */ addPropertyChangeListener(com.sun.star.beans.XPropertyChangeListener xPropertyChangeListener)74cdf0e10cSrcweir public void addPropertyChangeListener(com.sun.star.beans.XPropertyChangeListener xPropertyChangeListener) throws com.sun.star.lang.NullPointerException { 75cdf0e10cSrcweir } 76cdf0e10cSrcweir 77cdf0e10cSrcweir /** 78*242829adSPedro Giffuni * This method currently does nothing 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 */ convertToControlValue( String PropertyName, Object PropertyValue, com.sun.star.uno.Type ControlValueType)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 /** 96*242829adSPedro Giffuni * This method currently does nothing 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 */ convertToPropertyValue(String PropertyName, Object ControlValue)102cdf0e10cSrcweir public Object convertToPropertyValue(String PropertyName, Object ControlValue) throws com.sun.star.beans.UnknownPropertyException { 103cdf0e10cSrcweir return null; 104cdf0e10cSrcweir } 105cdf0e10cSrcweir 106cdf0e10cSrcweir /** 107*242829adSPedro Giffuni * This method currently does nothing 108cdf0e10cSrcweir * @param PropertyName the name of the property whose user interface is to be described 109cdf0e10cSrcweir * @param ControlFactory a factory for creating XPropertyControl instances. Must not be NULL . 110cdf0e10cSrcweir * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by this handler 111cdf0e10cSrcweir * 112cdf0e10cSrcweir * @throws com.sun.star.lang.NullPointerException ::com::sun::star::lang::NullPointerException if ControlFactory is NULL . 113cdf0e10cSrcweir */ describePropertyLine( String PropertyName, com.sun.star.inspection.XPropertyControlFactory ControlFactory)114cdf0e10cSrcweir public LineDescriptor describePropertyLine( 115cdf0e10cSrcweir String PropertyName, 116cdf0e10cSrcweir com.sun.star.inspection.XPropertyControlFactory ControlFactory) 117cdf0e10cSrcweir throws com.sun.star.beans.UnknownPropertyException, 118cdf0e10cSrcweir com.sun.star.lang.NullPointerException { 119cdf0e10cSrcweir return null; 120cdf0e10cSrcweir } 121cdf0e10cSrcweir 122cdf0e10cSrcweir /** 123*242829adSPedro Giffuni * This method currently does nothing 124cdf0e10cSrcweir */ dispose()125cdf0e10cSrcweir public void dispose() { 126cdf0e10cSrcweir } 127cdf0e10cSrcweir 128cdf0e10cSrcweir /** 129*242829adSPedro Giffuni * This method currently does nothing 130cdf0e10cSrcweir * @return null 131cdf0e10cSrcweir */ getActuatingProperties()132cdf0e10cSrcweir public String[] getActuatingProperties() { 133cdf0e10cSrcweir return null; 134cdf0e10cSrcweir } 135cdf0e10cSrcweir 136cdf0e10cSrcweir /** 137*242829adSPedro Giffuni * This method currently does nothing 138cdf0e10cSrcweir * @param PropertyName the name of the property whose state is to be retrieved 139cdf0e10cSrcweir * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler 140cdf0e10cSrcweir * @return null 141cdf0e10cSrcweir */ getPropertyState(String PropertyName)142cdf0e10cSrcweir public com.sun.star.beans.PropertyState getPropertyState(String PropertyName) 143cdf0e10cSrcweir throws com.sun.star.beans.UnknownPropertyException { 144cdf0e10cSrcweir return null; 145cdf0e10cSrcweir } 146cdf0e10cSrcweir 147cdf0e10cSrcweir /** 148*242829adSPedro Giffuni * This method currently does nothing 149cdf0e10cSrcweir * @param PropertyName the name of the property whose value is to be retrieved 150cdf0e10cSrcweir * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler 151cdf0e10cSrcweir * @return null 152cdf0e10cSrcweir */ getPropertyValue(String PropertyName)153cdf0e10cSrcweir public Object getPropertyValue(String PropertyName) throws com.sun.star.beans.UnknownPropertyException { 154cdf0e10cSrcweir return null; 155cdf0e10cSrcweir } 156cdf0e10cSrcweir 157cdf0e10cSrcweir /** 158*242829adSPedro Giffuni * This method currently does nothing 159cdf0e10cSrcweir * @return null 160cdf0e10cSrcweir */ getSupersededProperties()161cdf0e10cSrcweir public String[] getSupersededProperties() { 162cdf0e10cSrcweir return null; 163cdf0e10cSrcweir } 164cdf0e10cSrcweir 165cdf0e10cSrcweir /** 166*242829adSPedro Giffuni * This method currently does nothing 167cdf0e10cSrcweir * @return null 168cdf0e10cSrcweir */ getSupportedProperties()169cdf0e10cSrcweir public com.sun.star.beans.Property[] getSupportedProperties() { 170cdf0e10cSrcweir return null; 171cdf0e10cSrcweir } 172cdf0e10cSrcweir 173cdf0e10cSrcweir /** 174*242829adSPedro Giffuni * This method currently does nothing 175cdf0e10cSrcweir * @param Component the component to inspect. Must not be NULL 176cdf0e10cSrcweir * @throws com.sun.star.lang.NullPointerException com::sun::star::lang::NullPointerException if the component is NULL 177cdf0e10cSrcweir */ inspect(Object Component)178cdf0e10cSrcweir public void inspect(Object Component) throws com.sun.star.lang.NullPointerException { 179cdf0e10cSrcweir } 180cdf0e10cSrcweir 181cdf0e10cSrcweir /** 182*242829adSPedro Giffuni * This method currently does nothing 183cdf0e10cSrcweir * @param PropertyName the name of the property whose composability is to be determined 184cdf0e10cSrcweir * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler 185cdf0e10cSrcweir * 186cdf0e10cSrcweir * 187cdf0e10cSrcweir * @return null 188cdf0e10cSrcweir */ isComposable(String PropertyName)189cdf0e10cSrcweir public boolean isComposable(String PropertyName) throws com.sun.star.beans.UnknownPropertyException { 190cdf0e10cSrcweir return false; 191cdf0e10cSrcweir } 192cdf0e10cSrcweir 193cdf0e10cSrcweir /** 194*242829adSPedro Giffuni * This method currently does nothing 195cdf0e10cSrcweir * @param PropertyName The name of the property whose browse button has been clicked 196cdf0e10cSrcweir * @param Primary true if and only if the primary button has been clicked, false otherwise 197cdf0e10cSrcweir * @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. 198cdf0e10cSrcweir * @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. 199cdf0e10cSrcweir * 200cdf0e10cSrcweir * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler 201cdf0e10cSrcweir * @throws com.sun.star.lang.NullPointerException ::com::sun::star::lang::NullPointerException if InspectorUI is NULL 202cdf0e10cSrcweir * @return null 203cdf0e10cSrcweir */ onInteractivePropertySelection( String PropertyName, boolean Primary, Object[] out_Data, com.sun.star.inspection.XObjectInspectorUI InspectorUI)204cdf0e10cSrcweir public com.sun.star.inspection.InteractiveSelectionResult onInteractivePropertySelection( 205cdf0e10cSrcweir String PropertyName, 206cdf0e10cSrcweir boolean Primary, 207cdf0e10cSrcweir Object[] out_Data, 208cdf0e10cSrcweir com.sun.star.inspection.XObjectInspectorUI InspectorUI) 209cdf0e10cSrcweir throws com.sun.star.beans.UnknownPropertyException, 210cdf0e10cSrcweir com.sun.star.lang.NullPointerException { 211cdf0e10cSrcweir return null; 212cdf0e10cSrcweir } 213cdf0e10cSrcweir 214cdf0e10cSrcweir /** 215*242829adSPedro Giffuni * This method currently does nothing 216cdf0e10cSrcweir * @param xEventListener the listener to be revoked 217cdf0e10cSrcweir */ removeEventListener(com.sun.star.lang.XEventListener xEventListener)218cdf0e10cSrcweir public void removeEventListener(com.sun.star.lang.XEventListener xEventListener) { 219cdf0e10cSrcweir } 220cdf0e10cSrcweir 221cdf0e10cSrcweir /** 222*242829adSPedro Giffuni * This method currently does nothing 223cdf0e10cSrcweir * @param xPropertyChangeListener the listener to be revoke 224cdf0e10cSrcweir */ removePropertyChangeListener(com.sun.star.beans.XPropertyChangeListener xPropertyChangeListener)225cdf0e10cSrcweir public void removePropertyChangeListener(com.sun.star.beans.XPropertyChangeListener xPropertyChangeListener) { 226cdf0e10cSrcweir } 227cdf0e10cSrcweir 228cdf0e10cSrcweir /** 229*242829adSPedro Giffuni * This method currently does nothing 230cdf0e10cSrcweir * @param PropertyName the name of the property whose value is to be set 231cdf0e10cSrcweir * @param Value the property value to set 232cdf0e10cSrcweir * @throws com.sun.star.beans.UnknownPropertyException ::com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler 233cdf0e10cSrcweir */ setPropertyValue(String PropertyName, Object Value)234cdf0e10cSrcweir public void setPropertyValue(String PropertyName, Object Value) throws com.sun.star.beans.UnknownPropertyException { 235cdf0e10cSrcweir } 236cdf0e10cSrcweir 237cdf0e10cSrcweir /** 238*242829adSPedro Giffuni * This method currently does nothing 239cdf0e10cSrcweir * @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. 240cdf0e10cSrcweir * @return false 241cdf0e10cSrcweir */ suspend(boolean Suspend)242cdf0e10cSrcweir public boolean suspend(boolean Suspend) { 243cdf0e10cSrcweir return false; 244cdf0e10cSrcweir } 245cdf0e10cSrcweir 246cdf0e10cSrcweir /** 247*242829adSPedro Giffuni * This method currently does nothing 248cdf0e10cSrcweir */ 249cdf0e10cSrcweir describePropertyLine(String string, LineDescriptor[] lineDescriptor, XPropertyControlFactory xPropertyControlFactory)250cdf0e10cSrcweir public void describePropertyLine(String string, LineDescriptor[] lineDescriptor, XPropertyControlFactory xPropertyControlFactory) throws UnknownPropertyException, com.sun.star.lang.NullPointerException { 251cdf0e10cSrcweir } 252cdf0e10cSrcweir 253cdf0e10cSrcweir } 254