1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * The Contents of this file are made available subject to the terms of 4*cdf0e10cSrcweir * the BSD license. 5*cdf0e10cSrcweir * 6*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 7*cdf0e10cSrcweir * All rights reserved. 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * Redistribution and use in source and binary forms, with or without 10*cdf0e10cSrcweir * modification, are permitted provided that the following conditions 11*cdf0e10cSrcweir * are met: 12*cdf0e10cSrcweir * 1. Redistributions of source code must retain the above copyright 13*cdf0e10cSrcweir * notice, this list of conditions and the following disclaimer. 14*cdf0e10cSrcweir * 2. Redistributions in binary form must reproduce the above copyright 15*cdf0e10cSrcweir * notice, this list of conditions and the following disclaimer in the 16*cdf0e10cSrcweir * documentation and/or other materials provided with the distribution. 17*cdf0e10cSrcweir * 3. Neither the name of Sun Microsystems, Inc. nor the names of its 18*cdf0e10cSrcweir * contributors may be used to endorse or promote products derived 19*cdf0e10cSrcweir * from this software without specific prior written permission. 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22*cdf0e10cSrcweir * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23*cdf0e10cSrcweir * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24*cdf0e10cSrcweir * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25*cdf0e10cSrcweir * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26*cdf0e10cSrcweir * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27*cdf0e10cSrcweir * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 28*cdf0e10cSrcweir * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 29*cdf0e10cSrcweir * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 30*cdf0e10cSrcweir * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 31*cdf0e10cSrcweir * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32*cdf0e10cSrcweir * 33*cdf0e10cSrcweir *************************************************************************/ 34*cdf0e10cSrcweir 35*cdf0e10cSrcweir import com.sun.star.reflection.ParamInfo; 36*cdf0e10cSrcweir import com.sun.star.reflection.XIdlMethod; 37*cdf0e10cSrcweir import com.sun.star.uno.TypeClass; 38*cdf0e10cSrcweir import java.awt.BorderLayout; 39*cdf0e10cSrcweir import java.awt.event.ActionEvent; 40*cdf0e10cSrcweir import java.awt.event.ActionListener; 41*cdf0e10cSrcweir import java.awt.event.KeyAdapter; 42*cdf0e10cSrcweir import java.awt.event.KeyEvent; 43*cdf0e10cSrcweir import java.awt.event.WindowAdapter; 44*cdf0e10cSrcweir import java.awt.event.WindowEvent; 45*cdf0e10cSrcweir import java.util.Vector; 46*cdf0e10cSrcweir import javax.swing.JButton; 47*cdf0e10cSrcweir import javax.swing.JComboBox; 48*cdf0e10cSrcweir import javax.swing.JComponent; 49*cdf0e10cSrcweir import javax.swing.JDialog; 50*cdf0e10cSrcweir import javax.swing.JFrame; 51*cdf0e10cSrcweir import javax.swing.JLabel; 52*cdf0e10cSrcweir import javax.swing.JPanel; 53*cdf0e10cSrcweir import javax.swing.JTextField; 54*cdf0e10cSrcweir 55*cdf0e10cSrcweir /** 56*cdf0e10cSrcweir * @author bc93774 57*cdf0e10cSrcweir */ 58*cdf0e10cSrcweir public class MethodParametersDialog extends JDialog{ 59*cdf0e10cSrcweir private javax.swing.JPanel jPnlParamContainer; 60*cdf0e10cSrcweir private ParameterPanel[] m_aParameterPanels; 61*cdf0e10cSrcweir private ParamInfo[] m_aParamInfo; 62*cdf0e10cSrcweir private XIdlMethod m_xIdlMethod; 63*cdf0e10cSrcweir private ActionListener oActionListener; 64*cdf0e10cSrcweir private JButton jHelpButton = new JButton("Help"); 65*cdf0e10cSrcweir private JButton jOKButton = new JButton("Ok"); 66*cdf0e10cSrcweir private JButton jInvokeButton = new JButton("Invoke"); 67*cdf0e10cSrcweir private Object m_oReturnButton = null; 68*cdf0e10cSrcweir private Object m_oUnoObject = null; 69*cdf0e10cSrcweir private Object m_oUnoReturnObject = null; 70*cdf0e10cSrcweir private JLabel jLblResult; 71*cdf0e10cSrcweir private JPanel jResultPanel = null; 72*cdf0e10cSrcweir private boolean bisdiposed = false; 73*cdf0e10cSrcweir private XUnoMethodNode m_xUnoMethodNode; 74*cdf0e10cSrcweir 75*cdf0e10cSrcweir 76*cdf0e10cSrcweir public MethodParametersDialog(XUnoMethodNode _xUnoMethodNode){ 77*cdf0e10cSrcweir m_xUnoMethodNode = _xUnoMethodNode; 78*cdf0e10cSrcweir m_xIdlMethod = _xUnoMethodNode.getXIdlMethod(); 79*cdf0e10cSrcweir m_aParamInfo = m_xIdlMethod.getParameterInfos(); 80*cdf0e10cSrcweir m_oUnoObject = m_xUnoMethodNode.getUnoObject(); 81*cdf0e10cSrcweir Object[] m_aParameterObjects = new Object[m_aParamInfo.length]; 82*cdf0e10cSrcweir } 83*cdf0e10cSrcweir 84*cdf0e10cSrcweir 85*cdf0e10cSrcweir public Vector getMethodObjects() { 86*cdf0e10cSrcweir super.setModal(true); 87*cdf0e10cSrcweir addBorderPanel(getContentPane(), BorderLayout.NORTH); 88*cdf0e10cSrcweir addBorderPanel(getContentPane(), BorderLayout.WEST); 89*cdf0e10cSrcweir addBorderPanel(getContentPane(), BorderLayout.EAST); 90*cdf0e10cSrcweir jPnlParamContainer = new JPanel(); 91*cdf0e10cSrcweir jPnlParamContainer.setLayout(new javax.swing.BoxLayout(jPnlParamContainer, javax.swing.BoxLayout.Y_AXIS)); 92*cdf0e10cSrcweir JPanel jHeaderPanel = new JPanel(new BorderLayout()); 93*cdf0e10cSrcweir JLabel jLblHeader = new JLabel(); 94*cdf0e10cSrcweir jLblHeader.setText("Please insert the values for the given Parameters of the method '" + m_xIdlMethod.getName() + "'"); 95*cdf0e10cSrcweir jHeaderPanel.add(jLblHeader,BorderLayout.WEST); 96*cdf0e10cSrcweir jPnlParamContainer.add(jHeaderPanel); 97*cdf0e10cSrcweir 98*cdf0e10cSrcweir m_aParameterPanels = new ParameterPanel[m_aParamInfo.length]; 99*cdf0e10cSrcweir for (int i = 0; i < m_aParameterPanels.length; i++){ 100*cdf0e10cSrcweir m_aParameterPanels[i] = new ParameterPanel(m_aParamInfo[i]); 101*cdf0e10cSrcweir jPnlParamContainer.add(m_aParameterPanels[i]); 102*cdf0e10cSrcweir } 103*cdf0e10cSrcweir jPnlParamContainer.add(new ButtonPanel(), java.awt.BorderLayout.SOUTH); 104*cdf0e10cSrcweir getContentPane().add(jPnlParamContainer, java.awt.BorderLayout.CENTER); 105*cdf0e10cSrcweir pack(); 106*cdf0e10cSrcweir setLocation(350, 350); 107*cdf0e10cSrcweir setTitle("Object Inspector - Parameter Values of '" + m_xIdlMethod.getName() + "'"); 108*cdf0e10cSrcweir super.setFocusable(true); 109*cdf0e10cSrcweir super.setFocusableWindowState(true); 110*cdf0e10cSrcweir super.requestFocus(); 111*cdf0e10cSrcweir m_aParameterPanels[0].getInputComponent().requestFocusInWindow(); 112*cdf0e10cSrcweir setVisible(true); 113*cdf0e10cSrcweir if (!bisdiposed){ 114*cdf0e10cSrcweir Vector aMethodObjects = new Vector(); 115*cdf0e10cSrcweir for (int i = 0; i < m_aParameterPanels.length; i++){ 116*cdf0e10cSrcweir aMethodObjects.add(m_aParameterPanels[i].getValue()); 117*cdf0e10cSrcweir } 118*cdf0e10cSrcweir aMethodObjects.add(m_oUnoReturnObject); 119*cdf0e10cSrcweir return aMethodObjects; 120*cdf0e10cSrcweir } 121*cdf0e10cSrcweir else{ 122*cdf0e10cSrcweir return null; 123*cdf0e10cSrcweir } 124*cdf0e10cSrcweir } 125*cdf0e10cSrcweir 126*cdf0e10cSrcweir 127*cdf0e10cSrcweir private void insertResultPanel(Exception _oInvocationException){ 128*cdf0e10cSrcweir boolean bAddPanel = false; 129*cdf0e10cSrcweir if (jResultPanel == null){ 130*cdf0e10cSrcweir jResultPanel = new JPanel(new BorderLayout()); 131*cdf0e10cSrcweir bAddPanel = true; 132*cdf0e10cSrcweir } 133*cdf0e10cSrcweir else{ 134*cdf0e10cSrcweir jResultPanel.removeAll(); 135*cdf0e10cSrcweir } 136*cdf0e10cSrcweir jLblResult = new JLabel(); 137*cdf0e10cSrcweir jLblResult.setMaximumSize(new java.awt.Dimension(getSize().width - 20, 57)); 138*cdf0e10cSrcweir if (_oInvocationException != null){ 139*cdf0e10cSrcweir jLblResult.setText("<html>Invoking the method cause an exception: <br>" + _oInvocationException.toString() + "</html>"); 140*cdf0e10cSrcweir } 141*cdf0e10cSrcweir else{ 142*cdf0e10cSrcweir jLblResult.setText("<html>The invocation of the method did not produce any error</html>"); 143*cdf0e10cSrcweir } 144*cdf0e10cSrcweir jResultPanel.add(jLblResult,BorderLayout.WEST); 145*cdf0e10cSrcweir if (bAddPanel){ 146*cdf0e10cSrcweir int nPos = jPnlParamContainer.getComponentCount() - 1; 147*cdf0e10cSrcweir jPnlParamContainer.add(jResultPanel, nPos); 148*cdf0e10cSrcweir } 149*cdf0e10cSrcweir super.pack(); 150*cdf0e10cSrcweir super.validate(); 151*cdf0e10cSrcweir } 152*cdf0e10cSrcweir 153*cdf0e10cSrcweir 154*cdf0e10cSrcweir private Object[] getParameterValues(){ 155*cdf0e10cSrcweir Object[] oParameterValues = new Object[m_aParameterPanels.length]; 156*cdf0e10cSrcweir for (int i = 0; i < m_aParameterPanels.length; i++){ 157*cdf0e10cSrcweir oParameterValues[i] = m_aParameterPanels[i].getValue(); 158*cdf0e10cSrcweir } 159*cdf0e10cSrcweir return oParameterValues; 160*cdf0e10cSrcweir } 161*cdf0e10cSrcweir 162*cdf0e10cSrcweir 163*cdf0e10cSrcweir private boolean isCompleted(){ 164*cdf0e10cSrcweir boolean bIsCompleted = true; 165*cdf0e10cSrcweir for (int i = 0; i < m_aParameterPanels.length; i++){ 166*cdf0e10cSrcweir bIsCompleted = m_aParameterPanels[i].isCompleted(); 167*cdf0e10cSrcweir if (!bIsCompleted){ 168*cdf0e10cSrcweir break; 169*cdf0e10cSrcweir } 170*cdf0e10cSrcweir } 171*cdf0e10cSrcweir return bIsCompleted; 172*cdf0e10cSrcweir } 173*cdf0e10cSrcweir 174*cdf0e10cSrcweir 175*cdf0e10cSrcweir private void addBorderPanel(java.awt.Container _jContainer, String _sLayout){ 176*cdf0e10cSrcweir JPanel jPnlBorder = new JPanel(); 177*cdf0e10cSrcweir jPnlBorder.setPreferredSize(new java.awt.Dimension(10, 10)); 178*cdf0e10cSrcweir _jContainer.add(jPnlBorder, _sLayout); 179*cdf0e10cSrcweir } 180*cdf0e10cSrcweir 181*cdf0e10cSrcweir private void addGapPanel(java.awt.Container _jContainer){ 182*cdf0e10cSrcweir JPanel jPnlBorder = new JPanel(); 183*cdf0e10cSrcweir jPnlBorder.setPreferredSize(new java.awt.Dimension(10, 10)); 184*cdf0e10cSrcweir jPnlBorder.setMaximumSize(new java.awt.Dimension(10, 10)); 185*cdf0e10cSrcweir _jContainer.add(jPnlBorder); 186*cdf0e10cSrcweir } 187*cdf0e10cSrcweir 188*cdf0e10cSrcweir 189*cdf0e10cSrcweir private class ParameterPanel extends JPanel{ 190*cdf0e10cSrcweir private JComponent m_jComponent; 191*cdf0e10cSrcweir private TypeClass m_aTypeClass = null; 192*cdf0e10cSrcweir 193*cdf0e10cSrcweir public ParameterPanel(ParamInfo _aParamInfo){ 194*cdf0e10cSrcweir JTextField jTextField = new JTextField(); 195*cdf0e10cSrcweir JComboBox jComboBox = new JComboBox(); 196*cdf0e10cSrcweir m_aTypeClass = _aParamInfo.aType.getTypeClass(); 197*cdf0e10cSrcweir setLayout(new java.awt.BorderLayout()); 198*cdf0e10cSrcweir addBorderPanel(this, BorderLayout.NORTH); 199*cdf0e10cSrcweir addBorderPanel(this, BorderLayout.SOUTH); 200*cdf0e10cSrcweir JPanel jPnlCenter1 = new javax.swing.JPanel(); 201*cdf0e10cSrcweir jPnlCenter1.setLayout(new javax.swing.BoxLayout(jPnlCenter1, javax.swing.BoxLayout.X_AXIS)); 202*cdf0e10cSrcweir JLabel jLabel1 = new JLabel(); 203*cdf0e10cSrcweir jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); 204*cdf0e10cSrcweir String sParamText = _aParamInfo.aName + " (" + _aParamInfo.aType.getName() +")"; 205*cdf0e10cSrcweir jLabel1.setText(sParamText); 206*cdf0e10cSrcweir jPnlCenter1.add(jLabel1); 207*cdf0e10cSrcweir addGapPanel(jPnlCenter1); 208*cdf0e10cSrcweir switch (m_aTypeClass.getValue()){ 209*cdf0e10cSrcweir case TypeClass.BOOLEAN_value: 210*cdf0e10cSrcweir jComboBox.setBackground(new java.awt.Color(255, 255, 255)); 211*cdf0e10cSrcweir jComboBox.setPreferredSize(new java.awt.Dimension(50, 19)); 212*cdf0e10cSrcweir jComboBox.addItem("True"); 213*cdf0e10cSrcweir jComboBox.addItem("False"); 214*cdf0e10cSrcweir jComboBox.addKeyListener(new UpdateUIAdapter()); 215*cdf0e10cSrcweir jPnlCenter1.add(jComboBox); 216*cdf0e10cSrcweir m_jComponent = jComboBox; 217*cdf0e10cSrcweir break; 218*cdf0e10cSrcweir case TypeClass.BYTE_value: 219*cdf0e10cSrcweir case TypeClass.CHAR_value: 220*cdf0e10cSrcweir case TypeClass.DOUBLE_value: 221*cdf0e10cSrcweir case TypeClass.ENUM_value: 222*cdf0e10cSrcweir case TypeClass.FLOAT_value: 223*cdf0e10cSrcweir case TypeClass.HYPER_value: 224*cdf0e10cSrcweir case TypeClass.LONG_value: 225*cdf0e10cSrcweir case TypeClass.SHORT_value: 226*cdf0e10cSrcweir case TypeClass.STRING_value: 227*cdf0e10cSrcweir case TypeClass.UNSIGNED_HYPER_value: 228*cdf0e10cSrcweir case TypeClass.UNSIGNED_LONG_value: 229*cdf0e10cSrcweir case TypeClass.UNSIGNED_SHORT_value: 230*cdf0e10cSrcweir jTextField.setPreferredSize(new java.awt.Dimension(50, 19)); 231*cdf0e10cSrcweir jTextField.addKeyListener(new UpdateUIAdapter()); 232*cdf0e10cSrcweir jPnlCenter1.add(jTextField); 233*cdf0e10cSrcweir m_jComponent = jTextField; 234*cdf0e10cSrcweir break; 235*cdf0e10cSrcweir default: 236*cdf0e10cSrcweir System.out.println("Type " + m_aTypeClass.getValue() + " not yet defined in 'ParameterPanel()'"); 237*cdf0e10cSrcweir } 238*cdf0e10cSrcweir add(jPnlCenter1, java.awt.BorderLayout.CENTER); 239*cdf0e10cSrcweir JPanel jPnlEast = new JPanel(); 240*cdf0e10cSrcweir add(jPnlEast, BorderLayout.EAST); 241*cdf0e10cSrcweir } 242*cdf0e10cSrcweir 243*cdf0e10cSrcweir private JComponent getInputComponent(){ 244*cdf0e10cSrcweir return m_jComponent; 245*cdf0e10cSrcweir } 246*cdf0e10cSrcweir 247*cdf0e10cSrcweir public Object getValue(){ 248*cdf0e10cSrcweir Object oReturn = null; 249*cdf0e10cSrcweir if (m_jComponent instanceof JTextField){ 250*cdf0e10cSrcweir String sText = ((JTextField) m_jComponent).getText(); 251*cdf0e10cSrcweir oReturn = Introspector.getIntrospector().getValueOfText(m_aTypeClass, sText); 252*cdf0e10cSrcweir } 253*cdf0e10cSrcweir else{ 254*cdf0e10cSrcweir JComboBox jComboBox = ((JComboBox) m_jComponent); 255*cdf0e10cSrcweir oReturn = Boolean.valueOf(jComboBox.getSelectedIndex() == 0); 256*cdf0e10cSrcweir } 257*cdf0e10cSrcweir return oReturn; 258*cdf0e10cSrcweir } 259*cdf0e10cSrcweir 260*cdf0e10cSrcweir 261*cdf0e10cSrcweir public boolean isCompleted(){ 262*cdf0e10cSrcweir if (m_jComponent instanceof JTextField){ 263*cdf0e10cSrcweir return !((JTextField) m_jComponent).getText().equals(""); 264*cdf0e10cSrcweir } 265*cdf0e10cSrcweir else{ 266*cdf0e10cSrcweir return true; 267*cdf0e10cSrcweir } 268*cdf0e10cSrcweir } 269*cdf0e10cSrcweir } 270*cdf0e10cSrcweir 271*cdf0e10cSrcweir 272*cdf0e10cSrcweir private class UpdateUIAdapter extends KeyAdapter{ 273*cdf0e10cSrcweir public void keyReleased(KeyEvent e){ 274*cdf0e10cSrcweir boolean bIsCompleted = isCompleted(); 275*cdf0e10cSrcweir jOKButton.setEnabled(bIsCompleted); 276*cdf0e10cSrcweir jInvokeButton.setEnabled(bIsCompleted); 277*cdf0e10cSrcweir if (jLblResult != null){ 278*cdf0e10cSrcweir jLblResult.setEnabled(false); 279*cdf0e10cSrcweir jLblResult.invalidate(); 280*cdf0e10cSrcweir } 281*cdf0e10cSrcweir } 282*cdf0e10cSrcweir } 283*cdf0e10cSrcweir 284*cdf0e10cSrcweir 285*cdf0e10cSrcweir 286*cdf0e10cSrcweir private class ButtonPanel extends JPanel{ 287*cdf0e10cSrcweir public ButtonPanel(){ 288*cdf0e10cSrcweir super(); 289*cdf0e10cSrcweir setLayout(new BorderLayout()); 290*cdf0e10cSrcweir addBorderPanel(this, BorderLayout.NORTH); 291*cdf0e10cSrcweir addBorderPanel(this, BorderLayout.SOUTH); 292*cdf0e10cSrcweir JPanel jPnlBottomCenter = new JPanel(); 293*cdf0e10cSrcweir jPnlBottomCenter.setLayout(new javax.swing.BoxLayout(jPnlBottomCenter, javax.swing.BoxLayout.X_AXIS)); 294*cdf0e10cSrcweir jHelpButton.addActionListener(new ActionListener() { 295*cdf0e10cSrcweir public void actionPerformed(ActionEvent e) { 296*cdf0e10cSrcweir oActionListener.actionPerformed(e); 297*cdf0e10cSrcweir } 298*cdf0e10cSrcweir }); 299*cdf0e10cSrcweir jHelpButton.setEnabled(oActionListener != null); 300*cdf0e10cSrcweir jPnlBottomCenter.add(jHelpButton); 301*cdf0e10cSrcweir addGapPanel(jPnlBottomCenter); 302*cdf0e10cSrcweir jOKButton.setEnabled(false); 303*cdf0e10cSrcweir jOKButton.addActionListener(new ActionListener() { 304*cdf0e10cSrcweir public void actionPerformed(ActionEvent e) { 305*cdf0e10cSrcweir invokeParameterMethod(); 306*cdf0e10cSrcweir dispose(); 307*cdf0e10cSrcweir } 308*cdf0e10cSrcweir }); 309*cdf0e10cSrcweir jOKButton.setEnabled(isCompleted()); 310*cdf0e10cSrcweir jInvokeButton.setEnabled(isCompleted()); 311*cdf0e10cSrcweir jInvokeButton.addActionListener(new ActionListener() { 312*cdf0e10cSrcweir public void actionPerformed(ActionEvent e) { 313*cdf0e10cSrcweir invokeParameterMethod(); 314*cdf0e10cSrcweir } 315*cdf0e10cSrcweir }); 316*cdf0e10cSrcweir 317*cdf0e10cSrcweir jPnlBottomCenter.add(jOKButton); 318*cdf0e10cSrcweir addGapPanel(jPnlBottomCenter); 319*cdf0e10cSrcweir jPnlBottomCenter.add(jInvokeButton); 320*cdf0e10cSrcweir addGapPanel(jPnlBottomCenter); 321*cdf0e10cSrcweir JButton jCancelButton = new JButton("Cancel"); 322*cdf0e10cSrcweir jCancelButton.setFocusCycleRoot(true); 323*cdf0e10cSrcweir jCancelButton.setFocusPainted(true); 324*cdf0e10cSrcweir jCancelButton.addActionListener(new ActionListener(){ 325*cdf0e10cSrcweir public void actionPerformed(java.awt.event.ActionEvent evt) { 326*cdf0e10cSrcweir bisdiposed = true; 327*cdf0e10cSrcweir dispose(); 328*cdf0e10cSrcweir } 329*cdf0e10cSrcweir }); 330*cdf0e10cSrcweir 331*cdf0e10cSrcweir jPnlBottomCenter.add(jCancelButton); 332*cdf0e10cSrcweir add(jPnlBottomCenter); 333*cdf0e10cSrcweir } 334*cdf0e10cSrcweir } 335*cdf0e10cSrcweir 336*cdf0e10cSrcweir 337*cdf0e10cSrcweir public void addActionListener(ActionListener _oActionListener){ 338*cdf0e10cSrcweir oActionListener = _oActionListener; 339*cdf0e10cSrcweir jHelpButton.setEnabled(oActionListener != null); 340*cdf0e10cSrcweir } 341*cdf0e10cSrcweir 342*cdf0e10cSrcweir 343*cdf0e10cSrcweir public void invokeParameterMethod(){ 344*cdf0e10cSrcweir try{ 345*cdf0e10cSrcweir Object[] oParameters = getParameterValues(); 346*cdf0e10cSrcweir m_oUnoReturnObject = m_xUnoMethodNode.invoke(m_oUnoObject, oParameters); 347*cdf0e10cSrcweir insertResultPanel(null); 348*cdf0e10cSrcweir } catch (Exception ex) { 349*cdf0e10cSrcweir insertResultPanel(ex); 350*cdf0e10cSrcweir m_oUnoReturnObject = null; 351*cdf0e10cSrcweir }} 352*cdf0e10cSrcweir 353*cdf0e10cSrcweir } 354