当前位置: 首页>>代码示例>>Java>>正文


Java AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED属性代码示例

本文整理汇总了Java中java.awt.event.AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED属性的典型用法代码示例。如果您正苦于以下问题:Java AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED属性的具体用法?Java AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED怎么用?Java AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在java.awt.event.AdjustmentEvent的用法示例。


在下文中一共展示了AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setTypedValue

/**
 * Sets the value of this scrollbar to the specified value.
 * <p>
 * If the value supplied is less than the current minimum or
 * greater than the current maximum, then one of those values is
 * substituted, as appropriate. Also, creates and dispatches
 * the AdjustementEvent with specified type and value.
 *
 * @param v the new value of the scrollbar
 * @param type the type of the scrolling operation occurred
 */
private void setTypedValue(int v, int type) {
    v = Math.max(v, minimum);
    v = Math.min(v, maximum - visibleAmount);

    if (v != value) {
        value = v;
        // Synchronously notify the listeners so that they are
        // guaranteed to be up-to-date with the Adjustable before
        // it is mutated again.
        AdjustmentEvent e =
            new AdjustmentEvent(this,
                    AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED,
                    type, value, isAdjusting);
        adjustmentListener.adjustmentValueChanged(e);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:ScrollPaneAdjustable.java

示例2: setTypedValue

/**
 * Sets the value of this scrollbar to the specified value.
 * <p>
 * If the value supplied is less than the current minimum or
 * greater than the current maximum, then one of those values is
 * substituted, as appropriate. Also, creates and dispatches
 * the AdjustmentEvent with specified type and value.
 *
 * @param v the new value of the scrollbar
 * @param type the type of the scrolling operation occurred
 */
private void setTypedValue(int v, int type) {
    v = Math.max(v, minimum);
    v = Math.min(v, maximum - visibleAmount);

    if (v != value) {
        value = v;
        // Synchronously notify the listeners so that they are
        // guaranteed to be up-to-date with the Adjustable before
        // it is mutated again.
        AdjustmentEvent e =
            new AdjustmentEvent(this,
                    AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED,
                    type, value, isAdjusting);
        adjustmentListener.adjustmentValueChanged(e);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:27,代码来源:ScrollPaneAdjustable.java

示例3: setTypedValue

/**
 * Sets the value of this scrollbar to the specified value.
 * <p>
 * If the value supplied is less than the current minimum or
 * greater than the current maximum, then one of those values is
 * substituted, as appropriate. Also, creates and dispatches
 * the AdjustementEvent with specified type and value.
 *
 * @param v the new value of the scrollbar
 * @param type the type of the scrolling operation occured
 */
private void setTypedValue(int v, int type) {
    v = Math.max(v, minimum);
    v = Math.min(v, maximum - visibleAmount);

    if (v != value) {
        value = v;
        // Synchronously notify the listeners so that they are
        // guaranteed to be up-to-date with the Adjustable before
        // it is mutated again.
        AdjustmentEvent e =
            new AdjustmentEvent(this,
                    AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED,
                    type, value, isAdjusting);
        adjustmentListener.adjustmentValueChanged(e);
    }
}
 
开发者ID:jgaltidor,项目名称:VarJ,代码行数:27,代码来源:ScrollPaneAdjustable.java

示例4: setValueIsAdjusting

/**
 * Sets the <code>valueIsAdjusting</code> property.
 *
 * @param b new adjustment-in-progress status
 * @see #getValueIsAdjusting
 * @since 1.4
 */
public void setValueIsAdjusting(boolean b) {
    if (isAdjusting != b) {
        isAdjusting = b;
        AdjustmentEvent e =
            new AdjustmentEvent(this,
                    AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED,
                    AdjustmentEvent.TRACK, value, b);
        adjustmentListener.adjustmentValueChanged(e);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:ScrollPaneAdjustable.java

示例5: stateChanged

public void stateChanged(ChangeEvent e)   {
    Object obj = e.getSource();
    if (obj instanceof BoundedRangeModel) {
        int id = AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED;
        int type = AdjustmentEvent.TRACK;
        BoundedRangeModel model = (BoundedRangeModel)obj;
        int value = model.getValue();
        boolean isAdjusting = model.getValueIsAdjusting();
        fireAdjustmentValueChanged(id, type, value, isAdjusting);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:JScrollBar.java

示例6: setValueIsAdjusting

/**
 * Sets the {@code valueIsAdjusting} property.
 *
 * @param b new adjustment-in-progress status
 * @see #getValueIsAdjusting
 * @since 1.4
 */
public void setValueIsAdjusting(boolean b) {
    if (isAdjusting != b) {
        isAdjusting = b;
        AdjustmentEvent e =
            new AdjustmentEvent(this,
                    AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED,
                    AdjustmentEvent.TRACK, value, b);
        adjustmentListener.adjustmentValueChanged(e);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:ScrollPaneAdjustable.java

示例7: fireMoved

private void fireMoved(int type, int value)
{
  AdjustmentEvent e = new AdjustmentEvent((Scrollbar)owner,
                                          AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED,
                                          type, value);
  QtToolkit.eventQueue.postEvent(e);
}
 
开发者ID:vilie,项目名称:javify,代码行数:7,代码来源:QtScrollbarPeer.java

示例8: fireMoved

private void fireMoved(int type, int value)
{
  AdjustmentEvent e = new AdjustmentEvent((Scrollbar)owner,
			    AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED,
			    type, value);
  QtToolkit.eventQueue.postEvent(e);
}
 
开发者ID:nmldiegues,项目名称:jvm-stm,代码行数:7,代码来源:QtScrollbarPeer.java

示例9: setValueIsAdjusting

/**
    * Sets the <code>valueIsAdjusting</code> property.
    * 
    * @param b new adjustment-in-progress status
    * @see #getValueIsAdjusting
    * @since 1.4
    */
   public void setValueIsAdjusting(boolean b) {
if (isAdjusting != b) {
    isAdjusting = b;
    AdjustmentEvent e =
	new AdjustmentEvent(this,
	        AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED,
		AdjustmentEvent.TRACK, value, b);
    adjustmentListener.adjustmentValueChanged(e);
}
   }
 
开发者ID:jgaltidor,项目名称:VarJ,代码行数:17,代码来源:ScrollPaneAdjustable.java


注:本文中的java.awt.event.AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。