1 /**
2 *
3 */
4 package org.sirius.server.win32.classes.controls;
5
6 import java.rmi.RemoteException;
7
8 import javax.jws.WebService;
9
10 import org.sirius.server.win32.classes.Common;
11 import org.sirius.server.win32.constants.IListBoxConsts;
12 import org.sirius.server.win32lib.controls.Win32LibControlsClient;
13 import org.sirius.server.win32lib.controls.listbox.IListBoxContract;
14 import org.sirius.server.win32lib.controls.listbox.IListBoxContractProxy;
15
16 import com.sun.jna.Pointer;
17 import com.sun.jna.platform.win32.WinDef.HWND;
18 import com.sun.jna.platform.win32.WinDef.LPARAM;
19 import com.sun.jna.platform.win32.WinDef.WPARAM;
20
21 /**
22 * @author Myk Kolisnyk
23 *
24 */
25 @WebService
26 public class ListBox extends Common implements IListBoxConsts {
27
28
29 Win32LibControlsClient win32lib;
30
31 /**
32 *
33 */
34 public ListBox() {
35 // TODO Auto-generated constructor stub
36 win32lib = new Win32LibControlsClient();
37 }
38
39 /**
40 * @param hwnd
41 * @param index
42 * @throws RemoteException
43 * @see org.sirius.server.win32lib.controls.listbox.IListBoxContractProxy#addSelectionByIndex(java.lang.Integer, java.lang.Integer)
44 */
45 public void addSelectionByIndex(Integer hwnd, Integer index)
46 throws RemoteException {
47 win32lib.listBox().addSelectionByIndex(hwnd, index);
48 }
49
50 /**
51 * @param hwnd
52 * @param item
53 * @throws RemoteException
54 * @see org.sirius.server.win32lib.controls.listbox.IListBoxContractProxy#addSelectionByName(java.lang.Integer, java.lang.String)
55 */
56 public void addSelectionByName(Integer hwnd, String item)
57 throws RemoteException {
58 win32lib.listBox().addSelectionByName(hwnd, item);
59 }
60
61 /**
62 * @param hwnd
63 * @throws RemoteException
64 * @see org.sirius.server.win32lib.controls.listbox.IListBoxContractProxy#deselectAll(java.lang.Integer)
65 */
66 public void deselectAll(Integer hwnd) throws RemoteException {
67 win32lib.listBox().deselectAll(hwnd);
68 }
69
70 /**
71 * @return
72 * @see org.sirius.server.win32lib.controls.listbox.IListBoxContractProxy#getEndpoint()
73 */
74 public String getEndpoint() {
75 return win32lib.listBox().getEndpoint();
76 }
77
78 /**
79 * @return
80 * @see org.sirius.server.win32lib.controls.listbox.IListBoxContractProxy#getIListBoxContract()
81 */
82 public IListBoxContract getIListBoxContract() {
83 return win32lib.listBox().getIListBoxContract();
84 }
85
86 /**
87 * @param hwnd
88 * @return
89 * @throws RemoteException
90 * @see org.sirius.server.win32lib.controls.listbox.IListBoxContractProxy#getItemNames(java.lang.Integer)
91 */
92 public String[] getItemNames(Integer hwnd) throws RemoteException {
93 return win32lib.listBox().getItemNames(hwnd);
94 }
95
96 /**
97 * @param hwnd
98 * @return
99 * @throws RemoteException
100 * @see org.sirius.server.win32lib.controls.listbox.IListBoxContractProxy#getItemsCount(java.lang.Integer)
101 */
102 public Integer getItemsCount(Integer hwnd) throws RemoteException {
103 return win32lib.listBox().getItemsCount(hwnd);
104 }
105
106 /**
107 * @param hwnd
108 * @return
109 * @throws RemoteException
110 * @see org.sirius.server.win32lib.controls.listbox.IListBoxContractProxy#getSelectedIndex(java.lang.Integer)
111 */
112 public Integer getSelectedIndex(Integer hwnd) throws RemoteException {
113 return win32lib.listBox().getSelectedIndex(hwnd);
114 }
115
116 /**
117 * @param obj
118 * @return
119 * @see java.lang.Object#equals(java.lang.Object)
120 */
121 public boolean equals(Object obj) {
122 return win32lib.listBox().equals(obj);
123 }
124
125 /**
126 * @param hwnd
127 * @return
128 * @throws RemoteException
129 * @see org.sirius.server.win32lib.controls.listbox.IListBoxContractProxy#getSelectedItem(java.lang.Integer)
130 */
131 public String getSelectedItem(Integer hwnd) throws RemoteException {
132 return win32lib.listBox().getSelectedItem(hwnd);
133 }
134
135 /**
136 * @param hwnd
137 * @return
138 * @throws RemoteException
139 * @see org.sirius.server.win32lib.controls.listbox.IListBoxContractProxy#getSelectedItems(java.lang.Integer)
140 */
141 public String[] getSelectedItems(Integer hwnd) throws RemoteException {
142 return win32lib.listBox().getSelectedItems(hwnd);
143 }
144
145 /**
146 * @param hwnd
147 * @param index
148 * @throws RemoteException
149 * @see org.sirius.server.win32lib.controls.listbox.IListBoxContractProxy#removeSelectionByIndex(java.lang.Integer, java.lang.Integer)
150 */
151 public void removeSelectionByIndex(Integer hwnd, Integer index)
152 throws RemoteException {
153 win32lib.listBox().removeSelectionByIndex(hwnd, index);
154 }
155
156 /**
157 * @param hwnd
158 * @param item
159 * @throws RemoteException
160 * @see org.sirius.server.win32lib.controls.listbox.IListBoxContractProxy#removeSelectionByName(java.lang.Integer, java.lang.String)
161 */
162 public void removeSelectionByName(Integer hwnd, String item)
163 throws RemoteException {
164 win32lib.listBox().removeSelectionByName(hwnd, item);
165 }
166
167 /**
168 * @param hwnd
169 * @throws RemoteException
170 * @see org.sirius.server.win32lib.controls.listbox.IListBoxContractProxy#selectAll(java.lang.Integer)
171 */
172 public void selectAll(Integer hwnd) throws RemoteException {
173 win32lib.listBox().selectAll(hwnd);
174 }
175
176 /**
177 * @param hwnd
178 * @param index
179 * @throws RemoteException
180 * @see org.sirius.server.win32lib.controls.listbox.IListBoxContractProxy#selectByIndex(java.lang.Integer, java.lang.Integer)
181 */
182 public void selectByIndex(Integer hwnd, Integer index)
183 throws RemoteException {
184 win32lib.listBox().selectByIndex(hwnd, index);
185 }
186
187 /**
188 * @param hwnd
189 * @param item
190 * @throws RemoteException
191 * @see org.sirius.server.win32lib.controls.listbox.IListBoxContractProxy#selectByName(java.lang.Integer, java.lang.String)
192 */
193 public void selectByName(Integer hwnd, String item) throws RemoteException {
194 win32lib.listBox().selectByName(hwnd, item);
195 }
196 }