org.eclipse.swt.widgets.Tree.createRenderers()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(8.5k)|赞(0)|评价(0)|浏览(119)

本文整理了Java中org.eclipse.swt.widgets.Tree.createRenderers()方法的一些代码示例,展示了Tree.createRenderers()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tree.createRenderers()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Tree
类名称:Tree
方法名:createRenderers

Tree.createRenderers介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

/**
 * Controls how text and images will be displayed in the receiver.
 * The argument should be one of <code>LEFT</code>, <code>RIGHT</code>
 * or <code>CENTER</code>.
 * <p>
 * Note that due to a restriction on some platforms, the first column
 * is always left aligned.
 * </p>
 * @param alignment the new alignment
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public void setAlignment (int alignment) {
  checkWidget();
  if ((alignment & (SWT.LEFT | SWT.RIGHT | SWT.CENTER)) == 0) return;
  int index = parent.indexOf (this);
  if (index == -1 || index == 0) return;
  style &= ~(SWT.LEFT | SWT.RIGHT | SWT.CENTER);
  style |= alignment & (SWT.LEFT | SWT.RIGHT | SWT.CENTER);
  parent.createRenderers (handle, modelIndex, index == 0, style);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

/**
 * Controls how text and images will be displayed in the receiver.
 * The argument should be one of <code>LEFT</code>, <code>RIGHT</code>
 * or <code>CENTER</code>.
 * <p>
 * Note that due to a restriction on some platforms, the first column
 * is always left aligned.
 * </p>
 * @param alignment the new alignment
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public void setAlignment (int alignment) {
  checkWidget();
  if ((alignment & (SWT.LEFT | SWT.RIGHT | SWT.CENTER)) == 0) return;
  int index = parent.indexOf (this);
  if (index == -1 || index == 0) return;
  style &= ~(SWT.LEFT | SWT.RIGHT | SWT.CENTER);
  style |= alignment & (SWT.LEFT | SWT.RIGHT | SWT.CENTER);
  parent.createRenderers (handle, modelIndex, index == 0, style);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

/**
 * Controls how text and images will be displayed in the receiver.
 * The argument should be one of <code>LEFT</code>, <code>RIGHT</code>
 * or <code>CENTER</code>.
 * <p>
 * Note that due to a restriction on some platforms, the first column
 * is always left aligned.
 * </p>
 * @param alignment the new alignment
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public void setAlignment (int alignment) {
  checkWidget();
  if ((alignment & (SWT.LEFT | SWT.RIGHT | SWT.CENTER)) == 0) return;
  int index = parent.indexOf (this);
  if (index == -1 || index == 0) return;
  style &= ~(SWT.LEFT | SWT.RIGHT | SWT.CENTER);
  style |= alignment & (SWT.LEFT | SWT.RIGHT | SWT.CENTER);
  parent.createRenderers (handle, modelIndex, index == 0, style);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

void recreateRenderers () {
  if (checkRenderer != 0) {
    display.removeWidget (checkRenderer);
    OS.g_object_unref (checkRenderer);
    checkRenderer = ownerDraw ? OS.g_object_new (display.gtk_cell_renderer_toggle_get_type(), 0) : OS.gtk_cell_renderer_toggle_new ();
    if (checkRenderer == 0) error (SWT.ERROR_NO_HANDLES);
    OS.g_object_ref (checkRenderer);
    display.addWidget (checkRenderer, this);
    OS.g_signal_connect_closure (checkRenderer, OS.toggled, display.getClosure (TOGGLED), false);
  }
  if (columnCount == 0) {
    createRenderers (OS.gtk_tree_view_get_column (handle, 0), Tree.FIRST_COLUMN, true, 0);
  } else {
    for (int i = 0; i < columnCount; i++) {
      TreeColumn column = columns [i];
      createRenderers (column.handle, column.modelIndex, i == 0, column.style);
    }
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

void recreateRenderers () {
  if (checkRenderer != 0) {
    display.removeWidget (checkRenderer);
    OS.g_object_unref (checkRenderer);
    checkRenderer = ownerDraw ? OS.g_object_new (display.gtk_cell_renderer_toggle_get_type(), 0) : OS.gtk_cell_renderer_toggle_new ();
    if (checkRenderer == 0) error (SWT.ERROR_NO_HANDLES);
    OS.g_object_ref (checkRenderer);
    display.addWidget (checkRenderer, this);
    OS.g_signal_connect_closure (checkRenderer, OS.toggled, display.getClosure (TOGGLED), false);
  }
  if (columnCount == 0) {
    createRenderers (OS.gtk_tree_view_get_column (handle, 0), Tree.FIRST_COLUMN, true, 0);
  } else {
    for (int i = 0; i < columnCount; i++) {
      TreeColumn column = columns [i];
      createRenderers (column.handle, column.modelIndex, i == 0, column.style);
    }
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

void recreateRenderers () {
  if (checkRenderer != 0) {
    display.removeWidget (checkRenderer);
    OS.g_object_unref (checkRenderer);
    checkRenderer = ownerDraw ? OS.g_object_new (display.gtk_cell_renderer_toggle_get_type(), 0) : OS.gtk_cell_renderer_toggle_new ();
    if (checkRenderer == 0) error (SWT.ERROR_NO_HANDLES);
    OS.g_object_ref (checkRenderer);
    display.addWidget (checkRenderer, this);
    OS.g_signal_connect_closure (checkRenderer, OS.toggled, display.getClosure (TOGGLED), false);
  }
  if (columnCount == 0) {
    createRenderers (OS.gtk_tree_view_get_column (handle, 0), Tree.FIRST_COLUMN, true, 0);
  } else {
    for (int i = 0; i < columnCount; i++) {
      TreeColumn column = columns [i];
      createRenderers (column.handle, column.modelIndex, i == 0, column.style);
    }
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

firstColumn.style &= ~(SWT.LEFT | SWT.RIGHT | SWT.CENTER);
firstColumn.style |= SWT.LEFT;
createRenderers (firstColumn.handle, firstColumn.modelIndex, true, firstColumn.style);

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

firstColumn.style &= ~(SWT.LEFT | SWT.RIGHT | SWT.CENTER);
firstColumn.style |= SWT.LEFT;
createRenderers (firstColumn.handle, firstColumn.modelIndex, true, firstColumn.style);

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

firstColumn.style &= ~(SWT.LEFT | SWT.RIGHT | SWT.CENTER);
firstColumn.style |= SWT.LEFT;
createRenderers (firstColumn.handle, firstColumn.modelIndex, true, firstColumn.style);

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

OS.gtk_tree_view_column_set_visible (column.handle, false);
column.modelIndex = FIRST_COLUMN;
createRenderers (column.handle, column.modelIndex, true, column.style);
column.customDraw = firstCustomDraw;
firstCustomDraw = false;

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

OS.gtk_tree_view_column_set_visible (column.handle, false);
column.modelIndex = FIRST_COLUMN;
createRenderers (column.handle, column.modelIndex, true, column.style);
column.customDraw = firstCustomDraw;
firstCustomDraw = false;

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

OS.gtk_tree_view_column_set_visible (column.handle, false);
column.modelIndex = FIRST_COLUMN;
createRenderers (column.handle, column.modelIndex, true, column.style);
column.customDraw = firstCustomDraw;
firstCustomDraw = false;

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

if (index == 0 && columnCount > 0) {
  TreeColumn checkColumn = columns [0];
  createRenderers (checkColumn.handle, checkColumn.modelIndex, false, checkColumn.style);
createRenderers (columnHandle, modelIndex, index == 0, column == null ? 0 : column.style);
if ((style & SWT.VIRTUAL) == 0 && columnCount == 0) {
  OS.gtk_tree_view_column_set_sizing (columnHandle, OS.GTK_TREE_VIEW_COLUMN_GROW_ONLY);

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

if (index == 0 && columnCount > 0) {
  TreeColumn checkColumn = columns [0];
  createRenderers (checkColumn.handle, checkColumn.modelIndex, false, checkColumn.style);
createRenderers (columnHandle, modelIndex, index == 0, column == null ? 0 : column.style);
if ((style & SWT.VIRTUAL) == 0 && columnCount == 0) {
  OS.gtk_tree_view_column_set_sizing (columnHandle, OS.GTK_TREE_VIEW_COLUMN_GROW_ONLY);

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

if (index == 0 && columnCount > 0) {
  TreeColumn checkColumn = columns [0];
  createRenderers (checkColumn.handle, checkColumn.modelIndex, false, checkColumn.style);
createRenderers (columnHandle, modelIndex, index == 0, column == null ? 0 : column.style);
if ((style & SWT.VIRTUAL) == 0 && columnCount == 0) {
  OS.gtk_tree_view_column_set_sizing (columnHandle, OS.GTK_TREE_VIEW_COLUMN_GROW_ONLY);

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

parent.createRenderers(column, modelIndex, ((parent.style & SWT.CHECK) != 0) , parent.style);

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

parent.createRenderers(column, modelIndex, ((parent.style & SWT.CHECK) != 0) , parent.style);

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

parent.createRenderers(column, modelIndex, ((parent.style & SWT.CHECK) != 0) , parent.style);

相关文章

Tree类方法