com.sun.star.beans.PropertyVetoException Java Examples
The following examples show how to use
com.sun.star.beans.PropertyVetoException.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DialogHelper.java From libreoffice-starter-extension with MIT License | 5 votes |
public static void EnableButton(XDialog dialog, String componentId, boolean enable) { XControlContainer xDlgContainer = (XControlContainer) UnoRuntime.queryInterface(XControlContainer.class, dialog); // retrieve the control that we want to disable or enable XControl xControl = UnoRuntime.queryInterface(XControl.class, xDlgContainer.getControl(componentId)); XPropertySet xModelPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xControl.getModel()); try { xModelPropertySet.setPropertyValue("Enabled", Boolean.valueOf(enable)); } catch (IllegalArgumentException | UnknownPropertyException | PropertyVetoException | WrappedTargetException e) { return; } }
Example #2
Source File: DialogHelper.java From libreoffice-starter-extension with MIT License | 5 votes |
public static void setPosition(XDialog dialog, int posX, int posY) { XControlModel xDialogModel = UnoRuntime.queryInterface(XControl.class, dialog).getModel(); XPropertySet xPropSet = UnoRuntime.queryInterface(XPropertySet.class, xDialogModel); try { xPropSet.setPropertyValue("PositionX", posX); xPropSet.setPropertyValue("PositionY", posY); } catch (com.sun.star.lang.IllegalArgumentException | UnknownPropertyException | PropertyVetoException | WrappedTargetException e) { return; } }