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


Java ScrollbarPeer.setLineIncrement方法代码示例

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


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

示例1: setLineIncrement

import java.awt.peer.ScrollbarPeer; //导入方法依赖的package包/类
/**
 * Sets the value added or subtracted to the scrollbar value when the
 * user selects the scroll by a "unit" amount control.
 *
 * @param lineIncrement The new unit increment amount.
 *
 * @deprecated This method is deprecated in favor of
 * <code>setUnitIncrement()</code>.
 */
public void setLineIncrement(int lineIncrement)
{
  if (lineIncrement < 0)
    throw new IllegalArgumentException("Unit increment less than zero.");

  if (lineIncrement == 0)
    lineIncrement = 1;

 if (lineIncrement == this.lineIncrement)
    return;

  this.lineIncrement = lineIncrement;

  ScrollbarPeer peer = (ScrollbarPeer) getPeer();
  if (peer != null)
    peer.setLineIncrement(this.lineIncrement);
}
 
开发者ID:vilie,项目名称:javify,代码行数:27,代码来源:Scrollbar.java

示例2: setLineIncrement

import java.awt.peer.ScrollbarPeer; //导入方法依赖的package包/类
/**
 * Sets the value added or subtracted to the scrollbar value when the
 * user selects the scroll by a "unit" amount control.
 *
 * @param lineIncrement The new unit increment amount.
 *
 * @deprecated This method is deprecated in favor of
 * <code>setUnitIncrement()</code>.
 */
public void setLineIncrement(int lineIncrement)
{
  if (lineIncrement < 0)
    throw new IllegalArgumentException("Unit increment less than zero.");
  
  if (lineIncrement == 0)
    lineIncrement = 1;
       
 if (lineIncrement == this.lineIncrement)
    return;
  
  this.lineIncrement = lineIncrement;

  ScrollbarPeer peer = (ScrollbarPeer) getPeer();
  if (peer != null)
    peer.setLineIncrement(this.lineIncrement);
}
 
开发者ID:nmldiegues,项目名称:jvm-stm,代码行数:27,代码来源:Scrollbar.java

示例3: setLineIncrement

import java.awt.peer.ScrollbarPeer; //导入方法依赖的package包/类
/**
 * @deprecated As of JDK version 1.1,
 * replaced by <code>setUnitIncrement(int)</code>.
 */
@Deprecated
public synchronized void setLineIncrement(int v) {
    int tmp = (v < 1) ? 1 : v;

    if (lineIncrement == tmp) {
        return;
    }
    lineIncrement = tmp;

    ScrollbarPeer peer = (ScrollbarPeer)this.peer;
    if (peer != null) {
        peer.setLineIncrement(lineIncrement);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:Scrollbar.java

示例4: setLineIncrement

import java.awt.peer.ScrollbarPeer; //导入方法依赖的package包/类
/**
 * Sets the unit increment for this scroll bar.
 *
 * @param  v the increment value
 *
 * @deprecated As of JDK version 1.1,
 * replaced by {@code setUnitIncrement(int)}.
 */
@Deprecated
public synchronized void setLineIncrement(int v) {
    int tmp = (v < 1) ? 1 : v;

    if (lineIncrement == tmp) {
        return;
    }
    lineIncrement = tmp;

    ScrollbarPeer peer = (ScrollbarPeer)this.peer;
    if (peer != null) {
        peer.setLineIncrement(lineIncrement);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:23,代码来源:Scrollbar.java

示例5: setLineIncrement

import java.awt.peer.ScrollbarPeer; //导入方法依赖的package包/类
/**
 * @deprecated As of JDK version 1.1,
 * replaced by <code>setUnitIncrement(int)</code>.
 */
@Deprecated
public synchronized void setLineIncrement(int v) {
    int tmp = (v < 1) ? 1 : v; 

    if (lineIncrement == tmp) {
        return; 
    }
    lineIncrement = tmp; 

    ScrollbarPeer peer = (ScrollbarPeer)this.peer;
    if (peer != null) {
        peer.setLineIncrement(lineIncrement);
    }
}
 
开发者ID:jgaltidor,项目名称:VarJ,代码行数:19,代码来源:Scrollbar.java


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