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