本文整理汇总了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);
}
示例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);
}
示例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);
}
}
示例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);
}
}
示例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);
}
}