View Javadoc

1   package org.sirius.server.win32lib.controls.edit;
2   
3   public class IEditContractProxy implements
4           org.sirius.server.win32lib.controls.edit.IEditContract {
5       private String                                                 _endpoint     = null;
6       private org.sirius.server.win32lib.controls.edit.IEditContract iEditContract = null;
7   
8       public IEditContractProxy() {
9           _initIEditContractProxy();
10      }
11  
12      public IEditContractProxy(final String endpoint) {
13          _endpoint = endpoint;
14          _initIEditContractProxy();
15      }
16  
17      private void _initIEditContractProxy() {
18          try {
19              iEditContract = (new org.sirius.server.win32lib.controls.edit.EditSvcLocator())
20                      .getEditSvcPort();
21              if (iEditContract != null) {
22                  if (_endpoint != null) {
23                      ((javax.xml.rpc.Stub) iEditContract)
24                              ._setProperty(
25                                      "javax.xml.rpc.service.endpoint.address",
26                                      _endpoint);
27                  } else {
28                      _endpoint = (String) ((javax.xml.rpc.Stub) iEditContract)
29                              ._getProperty("javax.xml.rpc.service.endpoint.address");
30                  }
31              }
32  
33          } catch (javax.xml.rpc.ServiceException serviceException) {
34          }
35      }
36  
37      public String getEndpoint() {
38          return _endpoint;
39      }
40  
41      public org.sirius.server.win32lib.controls.edit.IEditContract getIEditContract() {
42          if (iEditContract == null) {
43              _initIEditContractProxy();
44          }
45          return iEditContract;
46      }
47  
48      @Override
49      public java.lang.String getSelectedText(final java.lang.Integer hwnd)
50              throws java.rmi.RemoteException {
51          if (iEditContract == null) {
52              _initIEditContractProxy();
53          }
54          return iEditContract.getSelectedText(hwnd);
55      }
56  
57      @Override
58      public java.lang.String getText(final java.lang.Integer hwnd)
59              throws java.rmi.RemoteException {
60          if (iEditContract == null) {
61              _initIEditContractProxy();
62          }
63          return iEditContract.getText(hwnd);
64      }
65  
66      @Override
67      public void setCursorPosition(final java.lang.Integer hwnd,
68              final java.lang.Integer col, final java.lang.Integer row)
69              throws java.rmi.RemoteException {
70          if (iEditContract == null) {
71              _initIEditContractProxy();
72          }
73          iEditContract.setCursorPosition(hwnd, col, row);
74      }
75  
76      public void setEndpoint(final String endpoint) {
77          _endpoint = endpoint;
78          if (iEditContract != null) {
79              ((javax.xml.rpc.Stub) iEditContract)._setProperty(
80                      "javax.xml.rpc.service.endpoint.address", _endpoint);
81          }
82  
83      }
84  
85      @Override
86      public void setSelection(final java.lang.Integer hwnd,
87              final java.lang.Integer scol, final java.lang.Integer srow,
88              final java.lang.Integer ecol, final java.lang.Integer erow)
89              throws java.rmi.RemoteException {
90          if (iEditContract == null) {
91              _initIEditContractProxy();
92          }
93          iEditContract.setSelection(hwnd, scol, srow, ecol, erow);
94      }
95  
96      @Override
97      public void setText(final java.lang.Integer hwnd,
98              final java.lang.String text) throws java.rmi.RemoteException {
99          if (iEditContract == null) {
100             _initIEditContractProxy();
101         }
102         iEditContract.setText(hwnd, text);
103     }
104 
105     @Override
106     public void typeText(final java.lang.Integer hwnd,
107             final java.lang.String text) throws java.rmi.RemoteException {
108         if (iEditContract == null) {
109             _initIEditContractProxy();
110         }
111         iEditContract.typeText(hwnd, text);
112     }
113 
114 }