本文整理了Java中org.eclipse.swt.widgets.Tree.getId()
方法的一些代码示例,展示了Tree.getId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tree.getId()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Tree
类名称:Tree
方法名:getId
暂无
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
TreeItem _getItem (int /*long*/ parentIter, int index) {
int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ());
OS.gtk_tree_model_iter_nth_child(modelHandle, iter, parentIter, index);
int id = getId (iter, true);
OS.g_free (iter);
if (items [id] != null) return items [id];
return items [id] = new TreeItem (this, parentIter, SWT.NONE, index, false);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
TreeItem _getItem (long /*int*/ parentIter, int index) {
long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ());
OS.gtk_tree_model_iter_nth_child(modelHandle, iter, parentIter, index);
int id = getId (iter, true);
OS.g_free (iter);
if (items [id] != null) return items [id];
return items [id] = new TreeItem (this, parentIter, SWT.NONE, index, false);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
TreeItem _getItem (int /*long*/ parentIter, int index) {
int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ());
OS.gtk_tree_model_iter_nth_child(modelHandle, iter, parentIter, index);
int id = getId (iter, true);
OS.g_free (iter);
if (items [id] != null) return items [id];
return items [id] = new TreeItem (this, parentIter, SWT.NONE, index, false);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
void createItem (TreeItem item, int /*long*/ parentIter, int index) {
int count = OS.gtk_tree_model_iter_n_children (modelHandle, parentIter);
if (index == -1) index = count;
if (!(0 <= index && index <= count)) error (SWT.ERROR_INVALID_RANGE);
item.handle = OS.g_malloc (OS.GtkTreeIter_sizeof ());
if (item.handle == 0) error(SWT.ERROR_NO_HANDLES);
/*
* Feature in GTK. It is much faster to append to a tree store
* than to insert at the end using gtk_tree_store_insert().
*/
if (index == count) {
OS.gtk_tree_store_append (modelHandle, item.handle, parentIter);
} else {
OS.gtk_tree_store_insert (modelHandle, item.handle, parentIter, index);
}
int id = getId (item.handle, false);
items [id] = item;
modelChanged = true;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
void createItem (TreeItem item, long /*int*/ parentIter, int index) {
int count = OS.gtk_tree_model_iter_n_children (modelHandle, parentIter);
if (index == -1) index = count;
if (!(0 <= index && index <= count)) error (SWT.ERROR_INVALID_RANGE);
item.handle = OS.g_malloc (OS.GtkTreeIter_sizeof ());
if (item.handle == 0) error(SWT.ERROR_NO_HANDLES);
/*
* Feature in GTK. It is much faster to append to a tree store
* than to insert at the end using gtk_tree_store_insert().
*/
if (index == count) {
OS.gtk_tree_store_append (modelHandle, item.handle, parentIter);
} else {
OS.gtk_tree_store_insert (modelHandle, item.handle, parentIter, index);
}
int id = getId (item.handle, false);
items [id] = item;
modelChanged = true;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
void createItem (TreeItem item, int /*long*/ parentIter, int index) {
int count = OS.gtk_tree_model_iter_n_children (modelHandle, parentIter);
if (index == -1) index = count;
if (!(0 <= index && index <= count)) error (SWT.ERROR_INVALID_RANGE);
item.handle = OS.g_malloc (OS.GtkTreeIter_sizeof ());
if (item.handle == 0) error(SWT.ERROR_NO_HANDLES);
/*
* Feature in GTK. It is much faster to append to a tree store
* than to insert at the end using gtk_tree_store_insert().
*/
if (index == count) {
OS.gtk_tree_store_append (modelHandle, item.handle, parentIter);
} else {
OS.gtk_tree_store_insert (modelHandle, item.handle, parentIter, index);
}
int id = getId (item.handle, false);
items [id] = item;
modelChanged = true;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
TreeItem _getItem (long /*int*/ iter) {
int id = getId (iter, true);
if (items [id] != null) return items [id];
long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, iter);
int depth = OS.gtk_tree_path_get_depth (path);
int [] indices = new int [depth];
OS.memmove (indices, OS.gtk_tree_path_get_indices (path), 4*depth);
long /*int*/ parentIter = 0;
if (depth > 1) {
OS.gtk_tree_path_up (path);
parentIter = OS.g_malloc (OS.GtkTreeIter_sizeof ());
OS.gtk_tree_model_get_iter (modelHandle, parentIter, path);
}
items [id] = new TreeItem (this, parentIter, SWT.NONE, indices [indices.length -1], false);
OS.gtk_tree_path_free (path);
if (parentIter != 0) OS.g_free (parentIter);
return items [id];
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
TreeItem _getItem (int /*long*/ iter) {
int id = getId (iter, true);
if (items [id] != null) return items [id];
int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter);
int depth = OS.gtk_tree_path_get_depth (path);
int [] indices = new int [depth];
OS.memmove (indices, OS.gtk_tree_path_get_indices (path), 4*depth);
int /*long*/ parentIter = 0;
if (depth > 1) {
OS.gtk_tree_path_up (path);
parentIter = OS.g_malloc (OS.GtkTreeIter_sizeof ());
OS.gtk_tree_model_get_iter (modelHandle, parentIter, path);
}
items [id] = new TreeItem (this, parentIter, SWT.NONE, indices [indices.length -1], false);
OS.gtk_tree_path_free (path);
if (parentIter != 0) OS.g_free (parentIter);
return items [id];
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
TreeItem _getItem (int /*long*/ iter) {
int id = getId (iter, true);
if (items [id] != null) return items [id];
int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter);
int depth = OS.gtk_tree_path_get_depth (path);
int [] indices = new int [depth];
OS.memmove (indices, OS.gtk_tree_path_get_indices (path), 4*depth);
int /*long*/ parentIter = 0;
if (depth > 1) {
OS.gtk_tree_path_up (path);
parentIter = OS.g_malloc (OS.GtkTreeIter_sizeof ());
OS.gtk_tree_model_get_iter (modelHandle, parentIter, path);
}
items [id] = new TreeItem (this, parentIter, SWT.NONE, indices [indices.length -1], false);
OS.gtk_tree_path_free (path);
if (parentIter != 0) OS.g_free (parentIter);
return items [id];
}
内容来源于网络,如有侵权,请联系作者删除!