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

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

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

Tree.redraw介绍

暂无

代码示例

代码示例来源:origin: BiglySoftware/BiglyBT

@Override
public void dragLeave(DropTargetEvent event) {
  draggingOver = null;
  tree.redraw();
}

代码示例来源:origin: BiglySoftware/BiglyBT

private void
swt_redraw()
{
  tree.redraw();
  
  swt_redraw( tree.getItems());
}

代码示例来源:origin: org.eclipse/org.eclipse.help.ui

private void repaintItem(TreeItem item) {
  Rectangle bounds = item.getBounds();
  item.getParent().redraw(bounds.x, bounds.y, bounds.width,
      bounds.height, false);
}

代码示例来源:origin: org.eclipse/org.eclipse.datatools.enablement.oda.xml.ui

public void widgetSelected( SelectionEvent e )
{
  TreeItem items[] = availableXmlTree.getSelection( );
  for ( int i = 0; i < items.length; i++ )
  {
    selectedItem = items[0];
    if ( items[i].getGrayed( ) )
    {
      availableXmlTree.setRedraw( false );
      availableXmlTree.deselectAll( );
      availableXmlTree.setRedraw( true );
      availableXmlTree.redraw( );
    }
  }
  if ( selectedItem != null )
    btnAdd.setEnabled( true );
  else
    btnAdd.setEnabled( false );
}

代码示例来源:origin: org.eclipse/org.eclipse.datatools.enablement.oda.xml.ui

public void widgetSelected( SelectionEvent e )
{
  TreeItem items[] = availableXmlTree.getSelection( );
  for ( int i = 0; i < items.length; i++ )
  {
    selectedItem = items[0];
    if ( items[i].getGrayed( ) )
    {
      availableXmlTree.setRedraw( false );
      availableXmlTree.deselectAll( );
      availableXmlTree.setRedraw( true );
      availableXmlTree.redraw( );
    }
  }
  if ( selectedItem != null )
    btnAdd.setEnabled( true );
  else
    btnAdd.setEnabled( false );
}

代码示例来源:origin: BiglySoftware/BiglyBT

Rectangle bounds = swtItem.getBounds();
  Rectangle treeBounds = tree.getBounds();
  tree.redraw(0, bounds.y, treeBounds.width, bounds.height, true);
} catch (NullPointerException npe) {

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

void clearAll( boolean recursive, boolean doVisualUpdate ) {
 checkWidget();
 for( int i = 0; i < itemCount; i++ ) {
  TreeItem item = items[ i ];
  if( item != null ) {
   item.clear();
   if( recursive ) {
    item.clearAll( true, false );
   }
  }
 }
 if( parent.isVirtual() && doVisualUpdate ) {
  parent.redraw();
 }
}

代码示例来源:origin: BiglySoftware/BiglyBT

@Override
public void dragOver(DropTargetEvent event) {
  TreeItem treeItem = (event.item instanceof TreeItem)
      ? (TreeItem) event.item : null;
  if (treeItem != null) {
    SideBarEntrySWT entry = (SideBarEntrySWT) treeItem.getData("MdiEntry");
    draggingOver = entry;
  } else {
    draggingOver = null;
  }
  if (draggingOver == null || !draggingOver.hasDropListeners()) {
    boolean isTorrent = TorrentOpener.doesDropHaveTorrents(event);
    if (isTorrent) {
      event.detail = DND.DROP_COPY;
    } else {
      event.detail = DND.DROP_NONE;
    }
    draggingOver = null;
  } else if ((event.operations & DND.DROP_LINK) > 0)
    event.detail = DND.DROP_LINK;
  else if ((event.operations & DND.DROP_COPY) > 0)
    event.detail = DND.DROP_COPY;
  else if ((event.operations & DND.DROP_DEFAULT) > 0)
    event.detail = DND.DROP_COPY;
  if (Constants.isOSX) {
    tree.redraw();
  }
  event.feedback = DND.FEEDBACK_SELECT | DND.FEEDBACK_SCROLL | DND.FEEDBACK_EXPAND;
}

代码示例来源:origin: org.eclipse/org.eclipse.wst.common.ui

sourceFileViewer.getTree().redraw();

代码示例来源:origin: BiglySoftware/BiglyBT

@Override
  public void drop(DropTargetEvent event) {
    draggingOver = null;
    tree.redraw();
    if (!(event.item instanceof TreeItem)) {
      defaultDrop(event);
      return;
    }
    TreeItem treeItem = (TreeItem) event.item;
    SideBarEntrySWT entry = (SideBarEntrySWT) treeItem.getData("MdiEntry");
    boolean handled = entry != null && entry.triggerDropListeners(event.data);
    if (!handled) {
      defaultDrop(event);
    }
  }
});

代码示例来源:origin: BiglySoftware/BiglyBT

private void
swt_redraw(
  TreeItem[]    items )
{
  tree.redraw();
  
  for ( TreeItem ti: items){
    SideBarEntrySWT entry = (SideBarEntrySWT) ti.getData("MdiEntry");
    if ( entry != null ){
      entry.updateColors();
      entry.redraw();
    }
    swt_redraw( ti.getItems());
  }
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

invalidateFlatIndex();
updateScrollBars();
redraw();

代码示例来源:origin: BiglySoftware/BiglyBT

private void
swt_updateSideBarColors()
{
  SWTSkinProperties skinProperties = skin.getSkinProperties();
  skinProperties.clearCache();
  bg = skinProperties.getColor("color.sidebar.bg");
  tree.setBackground(bg);
  tree.redraw();
  swt_updateSideBarColors( tree.getItems());
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

redraw();

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

data[ index ].foreground = color;
markCached();
parent.redraw();

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

data[ index ].background = color;
markCached();
parent.redraw();

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

data[ index ].preferredWidthBuffer = Data.UNKNOWN_WIDTH;
markCached();
parent.redraw();

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

parent.redraw();

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

/**
 * Sets the font that the receiver will use to paint textual information for
 * this item to the font specified by the argument, or to the default font for
 * that kind of control if the argument is null.
 *
 * @param font the new font (or null)
 * @exception IllegalArgumentException <ul>
 *              <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed
 *              </li>
 *              </ul>
 * @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 setFont( Font font ) {
 checkWidget();
 if( font != null && font.isDisposed() ) {
  error( SWT.ERROR_INVALID_ARGUMENT );
 }
 if( !equals( this.font, font ) ) {
  this.font = font;
  markCached();
  if( parent.getColumnCount() == 0 ) {
   parent.updateScrollBars();
  }
  parent.redraw();
 }
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

parent.updateScrollBars();
parent.redraw();

相关文章

Tree类方法