List of usage examples for java.util Vector elementAt
public synchronized E elementAt(int index)
From source file:hermes.browser.model.BeanTableModel.java
/** * @see javax.swing.table.TableModel#getValueAt(int, int) *//*from ww w. ja v a2s . c om*/ public Object getValueAt(int arg0, int arg1) { Vector row = (Vector) rows.elementAt(arg0); return row.elementAt(arg1); }
From source file:hermes.browser.model.BeanTableModel.java
public void setValueAt(Object value, int y, int x) { Vector row = (Vector) rows.elementAt(y); String propertyName = (String) row.elementAt(0); row.set(x, value);//from w w w.j ava2 s . c o m changes.put(propertyName, value); }
From source file:org.eshark.dctm.gui.model.DQLTableModel.java
public Object getValueAt(int aRow, int aColumn) { Vector row = (Vector) mRows.elementAt(aRow); return row.elementAt(aColumn); }
From source file:org.apache.ws.scout.transport.AxisTransport.java
public String send(String request, URI endpointURL) throws TransportException { Service service = null;/* w w w . j a v a 2s . co m*/ Call call = null; String response = null; log.debug("\nRequest message:\n" + request); try { service = new Service(); call = (Call) service.createCall(); call.setTargetEndpointAddress(endpointURL.toURL()); SOAPBodyElement body = new SOAPBodyElement(new ByteArrayInputStream(request.getBytes("UTF-8"))); Object[] soapBodies = new Object[] { body }; Vector result = (Vector) call.invoke(soapBodies); if (result.size() > 0) { response = ((SOAPBodyElement) result.elementAt(0)).getAsString(); } } catch (AxisFault fault) { try { Message msg = call.getResponseMessage(); response = msg.getSOAPEnvelope().getFirstBody().getAsString(); } catch (Exception ex) { throw new TransportException(ex); } } catch (Exception ex) { throw new TransportException(ex); } log.debug("\nResponse message:\n" + response); return response; }
From source file:org.apache.ws.scout.transport.AxisTransport.java
public Element send(Element request, URI endpointURL) throws TransportException { Service service = null;//ww w .j a v a 2 s . c om Call call = null; Element response = null; if (log.isDebugEnabled()) { log.debug("\nRequest message:\n" + XMLUtils.ElementToString(request)); log.debug(endpointURL.toString()); } try { service = new Service(); call = (Call) service.createCall(); call.setTargetEndpointAddress(endpointURL.toURL()); String requestString = XMLUtils.ElementToString(request); SOAPBodyElement body = new SOAPBodyElement(new ByteArrayInputStream(requestString.getBytes("UTF-8"))); Object[] soapBodies = new Object[] { body }; Vector result = (Vector) call.invoke(soapBodies); if (result.size() > 0) { response = ((SOAPBodyElement) result.elementAt(0)).getAsDOM(); } } catch (AxisFault fault) { try { Message msg = call.getResponseMessage(); response = msg.getSOAPEnvelope().getFirstBody().getAsDOM(); } catch (Exception ex) { throw new TransportException(ex); } } catch (Exception ex) { throw new TransportException(ex); } if (log.isDebugEnabled()) { log.debug("\nResponse message:\n" + XMLUtils.ElementToString(response)); } return response; }
From source file:hermes.browser.model.PropertySetTableModel.java
/** * @see javax.swing.table.TableModel#getValueAt(int, int) *///from w w w.j a v a 2 s .com @Override public Object getValueAt(int arg0, int arg1) { Vector row = (Vector) rows.elementAt(arg0); return row.elementAt(arg1); }
From source file:org.ecoinformatics.seek.ecogrid.EcoGridServicesControllerTest.java
/** * A method to test remove a service from controller list *///www.j a v a2s .co m public void removeServiceTest() { try { System.err.println("Old service in list before remove "); controller.print(); Vector serviceList = controller.getServicesList(); EcoGridService service = (EcoGridService) serviceList.elementAt(0); controller.removeService(service); System.err.println("new service in list after remove "); controller.print(); } catch (Exception e) { System.err.println("error in remove service test " + e.getMessage()); e.printStackTrace(); assertTrue(1 == 2); } }
From source file:org.globus.ftp.ByteRangeList.java
/** Merge into this list all the ranges contained in the given vector using merge(ByteRange). @param other the Vector of ByteRange objects **//*from ww w .j a v a2 s . co m*/ public void merge(final Vector other) { for (int i = 0; i < other.size(); i++) { this.merge((ByteRange) other.elementAt(i)); } }
From source file:DatabaseBrowser.java
public Object getValueAt(int row, int column) { Vector rowData = (Vector) (tableData.elementAt(row)); return rowData.elementAt(column); }
From source file:jasmine.imaging.shapes.RadiusChart.java
public RadiusChart(Vector<Double> values) { super();//from ww w.ja va 2s .c om DefaultCategoryDataset series = new DefaultCategoryDataset(); for (int i = 0; i < values.size(); i++) { series.addValue(values.elementAt(i), "row1", String.valueOf(i)); } setTitle("Radius Change"); chart = new JLabel(); getContentPane().add(chart); setSize(320, 240); setVisible(true); myChart = ChartFactory.createLineChart(null, null, null, series, PlotOrientation.VERTICAL, false, false, false); addComponentListener(new ComponentAdapter() { public void componentResized(ComponentEvent e) { if (myChart != null) updateChart(); } }); }