View Javadoc

1   package org.sirius.server.win32lib.controls.listbox;
2   
3   public class IListBoxContractProxy implements
4           org.sirius.server.win32lib.controls.listbox.IListBoxContract {
5       private String                                                       _endpoint        = null;
6       private org.sirius.server.win32lib.controls.listbox.IListBoxContract iListBoxContract = null;
7   
8       public IListBoxContractProxy() {
9           _initIListBoxContractProxy();
10      }
11  
12      public IListBoxContractProxy(final String endpoint) {
13          _endpoint = endpoint;
14          _initIListBoxContractProxy();
15      }
16  
17      private void _initIListBoxContractProxy() {
18          try {
19              iListBoxContract = (new org.sirius.server.win32lib.controls.listbox.ListBoxSvcLocator())
20                      .getListBoxSvcPort();
21              if (iListBoxContract != null) {
22                  if (_endpoint != null) {
23                      ((javax.xml.rpc.Stub) iListBoxContract)
24                              ._setProperty(
25                                      "javax.xml.rpc.service.endpoint.address",
26                                      _endpoint);
27                  } else {
28                      _endpoint = (String) ((javax.xml.rpc.Stub) iListBoxContract)
29                              ._getProperty("javax.xml.rpc.service.endpoint.address");
30                  }
31              }
32  
33          } catch (javax.xml.rpc.ServiceException serviceException) {
34          }
35      }
36  
37      @Override
38      public void addSelectionByIndex(final java.lang.Integer hwnd,
39              final java.lang.Integer index) throws java.rmi.RemoteException {
40          if (iListBoxContract == null) {
41              _initIListBoxContractProxy();
42          }
43          iListBoxContract.addSelectionByIndex(hwnd, index);
44      }
45  
46      @Override
47      public void addSelectionByName(final java.lang.Integer hwnd,
48              final java.lang.String item) throws java.rmi.RemoteException {
49          if (iListBoxContract == null) {
50              _initIListBoxContractProxy();
51          }
52          iListBoxContract.addSelectionByName(hwnd, item);
53      }
54  
55      @Override
56      public void deselectAll(final java.lang.Integer hwnd)
57              throws java.rmi.RemoteException {
58          if (iListBoxContract == null) {
59              _initIListBoxContractProxy();
60          }
61          iListBoxContract.deselectAll(hwnd);
62      }
63  
64      public String getEndpoint() {
65          return _endpoint;
66      }
67  
68      public org.sirius.server.win32lib.controls.listbox.IListBoxContract getIListBoxContract() {
69          if (iListBoxContract == null) {
70              _initIListBoxContractProxy();
71          }
72          return iListBoxContract;
73      }
74  
75      @Override
76      public java.lang.String[] getItemNames(final java.lang.Integer hwnd)
77              throws java.rmi.RemoteException {
78          if (iListBoxContract == null) {
79              _initIListBoxContractProxy();
80          }
81          return iListBoxContract.getItemNames(hwnd);
82      }
83  
84      @Override
85      public java.lang.Integer getItemsCount(final java.lang.Integer hwnd)
86              throws java.rmi.RemoteException {
87          if (iListBoxContract == null) {
88              _initIListBoxContractProxy();
89          }
90          return iListBoxContract.getItemsCount(hwnd);
91      }
92  
93      @Override
94      public java.lang.Integer getSelectedIndex(final java.lang.Integer hwnd)
95              throws java.rmi.RemoteException {
96          if (iListBoxContract == null) {
97              _initIListBoxContractProxy();
98          }
99          return iListBoxContract.getSelectedIndex(hwnd);
100     }
101 
102     @Override
103     public java.lang.String getSelectedItem(final java.lang.Integer hwnd)
104             throws java.rmi.RemoteException {
105         if (iListBoxContract == null) {
106             _initIListBoxContractProxy();
107         }
108         return iListBoxContract.getSelectedItem(hwnd);
109     }
110 
111     @Override
112     public java.lang.String[] getSelectedItems(final java.lang.Integer hwnd)
113             throws java.rmi.RemoteException {
114         if (iListBoxContract == null) {
115             _initIListBoxContractProxy();
116         }
117         return iListBoxContract.getSelectedItems(hwnd);
118     }
119 
120     @Override
121     public void removeSelectionByIndex(final java.lang.Integer hwnd,
122             final java.lang.Integer index) throws java.rmi.RemoteException {
123         if (iListBoxContract == null) {
124             _initIListBoxContractProxy();
125         }
126         iListBoxContract.removeSelectionByIndex(hwnd, index);
127     }
128 
129     @Override
130     public void removeSelectionByName(final java.lang.Integer hwnd,
131             final java.lang.String item) throws java.rmi.RemoteException {
132         if (iListBoxContract == null) {
133             _initIListBoxContractProxy();
134         }
135         iListBoxContract.removeSelectionByName(hwnd, item);
136     }
137 
138     @Override
139     public void selectAll(final java.lang.Integer hwnd)
140             throws java.rmi.RemoteException {
141         if (iListBoxContract == null) {
142             _initIListBoxContractProxy();
143         }
144         iListBoxContract.selectAll(hwnd);
145     }
146 
147     @Override
148     public void selectByIndex(final java.lang.Integer hwnd,
149             final java.lang.Integer index) throws java.rmi.RemoteException {
150         if (iListBoxContract == null) {
151             _initIListBoxContractProxy();
152         }
153         iListBoxContract.selectByIndex(hwnd, index);
154     }
155 
156     @Override
157     public void selectByName(final java.lang.Integer hwnd,
158             final java.lang.String item) throws java.rmi.RemoteException {
159         if (iListBoxContract == null) {
160             _initIListBoxContractProxy();
161         }
162         iListBoxContract.selectByName(hwnd, item);
163     }
164 
165     public void setEndpoint(final String endpoint) {
166         _endpoint = endpoint;
167         if (iListBoxContract != null) {
168             ((javax.xml.rpc.Stub) iListBoxContract)._setProperty(
169                     "javax.xml.rpc.service.endpoint.address", _endpoint);
170         }
171 
172     }
173 
174 }