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

x33g5p2x  于2022-01-30 转载在 其他  
字(8.5k)|赞(0)|评价(0)|浏览(124)

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

ScrollBar.gtk_adjustment_get介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

/**
 * Sets the maximum. If this value is negative or less than or
 * equal to the minimum, the value is ignored. If necessary, first
 * the thumb and then the selection are adjusted to fit within the
 * new range.
 *
 * @param value the new maximum
 *
 * @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 setMaximum (int value) {
  checkWidget ();
  GtkAdjustment adjustment = new GtkAdjustment ();
  gtk_adjustment_get (adjustmentHandle, adjustment);
  int minimum = (int) adjustment.lower;
  if (value <= minimum) return;
  adjustment.upper = value;
  adjustment.page_size = Math.min ((int)adjustment.page_size, value - minimum);
  adjustment.value = Math.min ((int)adjustment.value, (int)(value - adjustment.page_size));
  OS.g_signal_handlers_block_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
  OS.gtk_adjustment_configure(adjustmentHandle, adjustment.value, adjustment.lower, adjustment.upper,
    adjustment.step_increment, adjustment.page_increment, adjustment.page_size);
  OS.g_signal_handlers_unblock_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

/**
 * Sets the maximum. If this value is negative or less than or
 * equal to the minimum, the value is ignored. If necessary, first
 * the thumb and then the selection are adjusted to fit within the
 * new range.
 *
 * @param value the new maximum
 *
 * @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 setMaximum (int value) {
  checkWidget ();
  GtkAdjustment adjustment = new GtkAdjustment ();
  gtk_adjustment_get (adjustmentHandle, adjustment);
  int minimum = (int) adjustment.lower;
  if (value <= minimum) return;
  adjustment.upper = value;
  adjustment.page_size = Math.min ((int)adjustment.page_size, value - minimum);
  adjustment.value = Math.min ((int)adjustment.value, (int)(value - adjustment.page_size));
  OS.g_signal_handlers_block_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
  OS.gtk_adjustment_configure(adjustmentHandle, adjustment.value, adjustment.lower, adjustment.upper,
    adjustment.step_increment, adjustment.page_increment, adjustment.page_size);
  OS.g_signal_handlers_unblock_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

/**
 * Sets the minimum value. If this value is negative or greater
 * than or equal to the maximum, the value is ignored. If necessary,
 * first the thumb and then the selection are adjusted to fit within
 * the new range.
 *
 * @param value the new minimum
 *
 * @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 setMinimum (int value) {
  checkWidget ();
  if (value < 0) return;
  GtkAdjustment adjustment = new GtkAdjustment ();
  gtk_adjustment_get (adjustmentHandle, adjustment);
  int maximum = (int) adjustment.upper;
  if (value >= maximum) return;
  adjustment.lower = value;
  adjustment.page_size = Math.min ((int)adjustment.page_size, maximum - value);
  adjustment.value = Math.max ((int)adjustment.value, value);
  OS.g_signal_handlers_block_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
  OS.gtk_adjustment_configure(adjustmentHandle, adjustment.value, adjustment.lower, adjustment.upper,
    adjustment.step_increment, adjustment.page_increment, adjustment.page_size);
  OS.g_signal_handlers_unblock_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

/**
 * Sets the maximum. If this value is negative or less than or
 * equal to the minimum, the value is ignored. If necessary, first
 * the thumb and then the selection are adjusted to fit within the
 * new range.
 *
 * @param value the new maximum
 *
 * @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 setMaximum (int value) {
  checkWidget ();
  GtkAdjustment adjustment = new GtkAdjustment ();
  gtk_adjustment_get (adjustmentHandle, adjustment);
  int minimum = (int) adjustment.lower;
  if (value <= minimum) return;
  adjustment.upper = value;
  adjustment.page_size = Math.min ((int)adjustment.page_size, value - minimum);
  adjustment.value = Math.min ((int)adjustment.value, (int)(value - adjustment.page_size));
  OS.g_signal_handlers_block_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
  OS.gtk_adjustment_configure(adjustmentHandle, adjustment.value, adjustment.lower, adjustment.upper,
    adjustment.step_increment, adjustment.page_increment, adjustment.page_size);
  OS.g_signal_handlers_unblock_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

/**
 * Sets the minimum value. If this value is negative or greater
 * than or equal to the maximum, the value is ignored. If necessary,
 * first the thumb and then the selection are adjusted to fit within
 * the new range.
 *
 * @param value the new minimum
 *
 * @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 setMinimum (int value) {
  checkWidget ();
  if (value < 0) return;
  GtkAdjustment adjustment = new GtkAdjustment ();
  gtk_adjustment_get (adjustmentHandle, adjustment);
  int maximum = (int) adjustment.upper;
  if (value >= maximum) return;
  adjustment.lower = value;
  adjustment.page_size = Math.min ((int)adjustment.page_size, maximum - value);
  adjustment.value = Math.max ((int)adjustment.value, value);
  OS.g_signal_handlers_block_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
  OS.gtk_adjustment_configure(adjustmentHandle, adjustment.value, adjustment.lower, adjustment.upper,
    adjustment.step_increment, adjustment.page_increment, adjustment.page_size);
  OS.g_signal_handlers_unblock_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

if (value < 1) return;
GtkAdjustment adjustment = new GtkAdjustment ();
gtk_adjustment_get (adjustmentHandle, adjustment);
value = (int) Math.min (value, (int)(adjustment.upper - adjustment.lower));
adjustment.page_size = (double) value;

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

/**
 * Sets the minimum value. If this value is negative or greater
 * than or equal to the maximum, the value is ignored. If necessary,
 * first the thumb and then the selection are adjusted to fit within
 * the new range.
 *
 * @param value the new minimum
 *
 * @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 setMinimum (int value) {
  checkWidget ();
  if (value < 0) return;
  GtkAdjustment adjustment = new GtkAdjustment ();
  gtk_adjustment_get (adjustmentHandle, adjustment);
  int maximum = (int) adjustment.upper;
  if (value >= maximum) return;
  adjustment.lower = value;
  adjustment.page_size = Math.min ((int)adjustment.page_size, maximum - value);
  adjustment.value = Math.max ((int)adjustment.value, value);
  OS.g_signal_handlers_block_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
  OS.gtk_adjustment_configure(adjustmentHandle, adjustment.value, adjustment.lower, adjustment.upper,
    adjustment.step_increment, adjustment.page_increment, adjustment.page_size);
  OS.g_signal_handlers_unblock_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

if (value < 1) return;
GtkAdjustment adjustment = new GtkAdjustment ();
gtk_adjustment_get (adjustmentHandle, adjustment);
value = (int) Math.min (value, (int)(adjustment.upper - adjustment.lower));
adjustment.page_size = (double) value;

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

if (value < 1) return;
GtkAdjustment adjustment = new GtkAdjustment ();
gtk_adjustment_get (adjustmentHandle, adjustment);
value = (int) Math.min (value, (int)(adjustment.upper - adjustment.lower));
adjustment.page_size = (double) value;

相关文章