Beispiel #1
0
 /**
  * Sets the height of the receiver. This is height of the item when it is expanded, excluding the
  * height of the header.
  *
  * @param height the new height
  * @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 void setHeight(int height) {
   checkWidget();
   if (height < 0) return;
   this.height = height;
   OS.gtk_widget_set_size_request(clientHandle, -1, height);
   parent.layoutItems(0, false);
 }
Beispiel #2
0
 long /*int*/ windowProc(long /*int*/ handle, long /*int*/ user_data) {
   switch ((int) /*64*/ user_data) {
     case ACTIVATE_INVERSE:
       {
         expanded = OS.gtk_expander_get_expanded(handle);
         parent.layoutItems(0, false);
         return 0;
       }
   }
   return super.windowProc(handle, user_data);
 }
Beispiel #3
0
 /**
  * Sets the control that is shown when the item is expanded.
  *
  * @param control the new control (or null)
  * @exception IllegalArgumentException
  *     <ul>
  *       <li>ERROR_INVALID_ARGUMENT - if the control has been disposed
  *       <li>ERROR_INVALID_PARENT - if the control is not in the same widget tree
  *     </ul>
  *
  * @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 void setControl(Control control) {
   checkWidget();
   if (control != null) {
     if (control.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
     if (control.parent != parent) error(SWT.ERROR_INVALID_PARENT);
   }
   if (this.control == control) return;
   this.control = control;
   if (control != null) {
     control.setVisible(expanded);
   }
   parent.layoutItems(0, true);
 }
Beispiel #4
0
 /**
  * Sets the expanded state of the receiver.
  *
  * @param expanded the new expanded state
  * @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 void setExpanded(boolean expanded) {
   checkWidget();
   this.expanded = expanded;
   OS.gtk_expander_set_expanded(handle, expanded);
   parent.layoutItems(0, true);
 }
Beispiel #5
0
 long /*int*/ gtk_size_allocate(long /*int*/ widget, long /*int*/ allocation) {
   parent.layoutItems(0, false);
   return 0;
 }