本文整理了Java中org.eclipse.swt.widgets.Tree.getBackground()
方法的一些代码示例,展示了Tree.getBackground()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tree.getBackground()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Tree
类名称:Tree
方法名:getBackground
暂无
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
/**
* Returns the receiver's background color.
*
* @return the background color
*
* @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>
*
* @since 2.0
*
*/
public Color getBackground () {
checkWidget ();
if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
return background != null ? background : parent.getBackground ();
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
/**
* Returns the receiver's background color.
*
* @return the background color
* @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 Color getBackground() {
checkWidget();
if( !parent.checkData( this, index ) ) {
error( SWT.ERROR_WIDGET_DISPOSED );
}
Color result;
if( background == null ) {
result = parent.getBackground();
} else {
result = background;
}
return result;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
Color _getBackground () {
long /*int*/ [] ptr = new long /*int*/ [1];
OS.gtk_tree_model_get (parent.modelHandle, handle, Tree.BACKGROUND_COLUMN, ptr, -1);
if (ptr [0] == 0) return parent.getBackground ();
GdkColor gdkColor = new GdkColor ();
OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
OS.gdk_color_free (ptr [0]);
return Color.gtk_new (display, gdkColor);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
Color _getBackground () {
int /*long*/ [] ptr = new int /*long*/ [1];
OS.gtk_tree_model_get (parent.modelHandle, handle, Tree.BACKGROUND_COLUMN, ptr, -1);
if (ptr [0] == 0) return parent.getBackground ();
GdkColor gdkColor = new GdkColor ();
OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
OS.gdk_color_free (ptr [0]);
return Color.gtk_new (display, gdkColor);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
Color _getBackground () {
int /*long*/ [] ptr = new int /*long*/ [1];
OS.gtk_tree_model_get (parent.modelHandle, handle, Tree.BACKGROUND_COLUMN, ptr, -1);
if (ptr [0] == 0) return parent.getBackground ();
GdkColor gdkColor = new GdkColor ();
OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
OS.gdk_color_free (ptr [0]);
return Color.gtk_new (display, gdkColor);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
/**
* Returns the receiver's background color.
*
* @return the background color
*
* @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>
*
* @since 2.0
*
*/
public Color getBackground () {
checkWidget ();
if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
if (background == -1) return parent.getBackground ();
return Color.win32_new (display, background);
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
/**
* Returns the background color at the given column index in the receiver.
*
* @param index the column index
* @return the background color
* @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 Color getBackground( int index ) {
checkWidget();
if( !parent.checkData( this, this.index ) ) {
error( SWT.ERROR_WIDGET_DISPOSED );
}
Color result;
if( hasData( index ) && data[ index ].background != null ) {
result = data[ index ].background;
} else if( background == null ) {
result = parent.getBackground();
} else {
result = background;
}
return result;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.e4.ui.css.swt
background = parent.getBackground();
内容来源于网络,如有侵权,请联系作者删除!