/** * Returns a copy of the given RowData * * @param data * RowData to copy * @return a copy of the argument */ public static RowData copyData(RowData data) { RowData newData = new RowData(data.width, data.height); newData.exclude = data.exclude; return newData; }
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the RowData object */ @Override public String toString () { String string = getName ()+" {"; if (width != SWT.DEFAULT) string += "width="+width+" "; if (height != SWT.DEFAULT) string += "height="+height+" "; if (exclude) string += "exclude="+exclude+" "; string = string.trim(); string += "}"; return string; } }
public void pagination (int page){ Resource res = spine.getResource(page); string.append(res.getTitle()); RowData row = new RowData(); row.setTitle(string.toString()); row.setResource(res); contentDetails.add(row); try { InputStream is = res.getInputStream(); BufferedReader reader = new BufferedReader(new InputStreamReader(is)); try { while ((line =(String) reader.readLine()) != null) { } } catch (IOException e) {e.printStackTrace();} //do something with stream } catch (IOException e) { e.printStackTrace(); } webView.loadData(line, "text/html;charset=UTF-8",null); }
RowData getRowData(int newSide) { RowData rowData = new RowData(); if ((newSide == BOTTOM) || (newSide == TOP)) { rowData.width = 400; } return rowData; }
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the RowData object */ @Override public String toString () { String string = getName ()+" {"; if (width != SWT.DEFAULT) string += "width="+width+" "; if (height != SWT.DEFAULT) string += "height="+height+" "; if (exclude) string += "exclude="+exclude+" "; string = string.trim(); string += "}"; return string; } }
button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // add new row to Adapter adapter.addRow(new RowData("0:00")); } });
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the RowData object */ public String toString () { String string = getName ()+" {"; if (width != SWT.DEFAULT) string += "width="+width+" "; if (height != SWT.DEFAULT) string += "height="+height+" "; if (exclude) string += "exclude="+exclude+" "; string = string.trim(); string += "}"; return string; } }
protected RowData createRowData( int width, int height, boolean visible ) { RowData data = new RowData( width, height ); data.exclude = !visible; return data; }
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the RowData object */ public String toString () { String string = getName ()+" {"; if (width != SWT.DEFAULT) string += "width="+width+" "; if (height != SWT.DEFAULT) string += "height="+height+" "; if (exclude) string += "exclude="+exclude+" "; string = string.trim(); string += "}"; return string; } }
RowData [] rows = new RowData [listSize]; for (int i = 0; i < listSize; i++) { rows[i] = new RowData(new String [] {col0List.get(i), col1list.get(i), ...}); }
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the RowData object */ @Override public String toString () { String string = getName ()+" {"; if (width != SWT.DEFAULT) string += "width="+width+" "; if (height != SWT.DEFAULT) string += "height="+height+" "; if (exclude) string += "exclude="+exclude+" "; string = string.trim(); string += "}"; return string; } }
/** * Returns a copy of the given RowData * * @param data * RowData to copy * @return a copy of the argument */ public static RowData copyData(RowData data) { RowData newData = new RowData(data.width, data.height); newData.exclude = data.exclude; return newData; }
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the RowData object */ @Override public String toString () { String string = getName ()+" {"; if (width != SWT.DEFAULT) string += "width="+width+" "; if (height != SWT.DEFAULT) string += "height="+height+" "; if (exclude) string += "exclude="+exclude+" "; string = string.trim(); string += "}"; return string; } }
/** * Returns a copy of the given RowData * * @param data * RowData to copy * @return a copy of the argument */ public static RowData copyData(RowData data) { RowData newData = new RowData(data.width, data.height); newData.exclude = data.exclude; return newData; }
RowData data = new RowData(); control.setLayoutData(data);
private void addExcludedRowData( Composite facade ) { RowData rowData = new RowData(); rowData.exclude = true; facade.setLayoutData( rowData ); }
// Activity-level variable scope private List<RowData> items = new ArrayList<RowData>(); private RowdataAdapter adapter; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); listView1 = (ListView)findViewById(R.id.listView1); // adding first item to List, it's optional step items.add(new RowData("0:00")); adapter = new RowdataAdapter(this, R.layout.listview_item_row, items); listView1.setAdapter(adapter); }
/** * Creates a new RowDataFactory initialized with the SWT defaults. * * <p> * Initial values are: * </p> * * <ul> * <li>exclude(false)</li> * <li>hint(SWT.DEFAULT, SWT.DEFAULT)</li> * </ul> * * @return a new GridDataFactory instance */ public static RowDataFactory swtDefaults() { return new RowDataFactory(new RowData()); }
/** * Creates a new RowDataFactory initialized with the SWT defaults. * * <p> * Initial values are: * </p> * * <ul> * <li>exclude(false)</li> * <li>hint(SWT.DEFAULT, SWT.DEFAULT)</li> * </ul> * * @return a new GridDataFactory instance */ public static RowDataFactory swtDefaults() { return new RowDataFactory(new RowData()); }