Пример #1
0
 Color _getBackground() {
   int /*long*/[] ptr = new int /*long*/[1];
   OS.gtk_tree_model_get(parent.modelHandle, handle, Table.BACKGROUND_COLUMN, ptr, -1);
   if (ptr[0] == 0) return parent.getBackground();
   GdkColor gdkColor = new GdkColor();
   OS.memmove(gdkColor, ptr[0], GdkColor.sizeof);
   return Color.gtk_new(display, gdkColor);
 }
Пример #2
0
 /**
  * Returns the receiver's background color.
  *
  * @return the background color
  * @exception SWTException
  *     <ul>
  *       <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  *       <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
  *     </ul>
  */
 public Color getBackground() {
   checkWidget();
   if (!parent.checkData(this, parent.indexOf(this))) {
     error(SWT.ERROR_WIDGET_DISPOSED);
   }
   Color result;
   if (background == null) {
     result = parent.getBackground();
   } else {
     result = background;
   }
   return result;
 }