本文整理汇总了Java中java.awt.peer.ScrollbarPeer.setPageIncrement方法的典型用法代码示例。如果您正苦于以下问题:Java ScrollbarPeer.setPageIncrement方法的具体用法?Java ScrollbarPeer.setPageIncrement怎么用?Java ScrollbarPeer.setPageIncrement使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.awt.peer.ScrollbarPeer
的用法示例。
在下文中一共展示了ScrollbarPeer.setPageIncrement方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setPageIncrement
import java.awt.peer.ScrollbarPeer; //导入方法依赖的package包/类
/**
* Sets the value added or subtracted to the scrollbar value when the
* user selects the scroll by a "block" amount control.
*
* @param pageIncrement The new block increment amount.
*
* @deprecated This method is deprecated in favor of
* <code>setBlockIncrement()</code>.
*/
public void setPageIncrement(int pageIncrement)
{
if (pageIncrement < 0)
throw new IllegalArgumentException("Block increment less than zero.");
if (pageIncrement == 0)
pageIncrement = 1;
if (pageIncrement == this.pageIncrement)
return;
this.pageIncrement = pageIncrement;
ScrollbarPeer peer = (ScrollbarPeer) getPeer();
if (peer != null)
peer.setPageIncrement(this.pageIncrement);
}
示例2: setPageIncrement
import java.awt.peer.ScrollbarPeer; //导入方法依赖的package包/类
/**
* Sets the value added or subtracted to the scrollbar value when the
* user selects the scroll by a "block" amount control.
*
* @param pageIncrement The new block increment amount.
*
* @deprecated This method is deprecated in favor of
* <code>setBlockIncrement()</code>.
*/
public void setPageIncrement(int pageIncrement)
{
if (pageIncrement < 0)
throw new IllegalArgumentException("Block increment less than zero.");
if (pageIncrement == 0)
pageIncrement = 1;
if (pageIncrement == this.pageIncrement)
return;
this.pageIncrement = pageIncrement;
ScrollbarPeer peer = (ScrollbarPeer) getPeer();
if (peer != null)
peer.setPageIncrement(this.pageIncrement);
}
示例3: setPageIncrement
import java.awt.peer.ScrollbarPeer; //导入方法依赖的package包/类
/**
* @deprecated As of JDK version 1.1,
* replaced by <code>setBlockIncrement()</code>.
*/
@Deprecated
public synchronized void setPageIncrement(int v) {
int tmp = (v < 1) ? 1 : v;
if (pageIncrement == tmp) {
return;
}
pageIncrement = tmp;
ScrollbarPeer peer = (ScrollbarPeer)this.peer;
if (peer != null) {
peer.setPageIncrement(pageIncrement);
}
}
示例4: setPageIncrement
import java.awt.peer.ScrollbarPeer; //导入方法依赖的package包/类
/**
* Sets the block increment for this scroll bar.
*
* @param v the block increment
* @deprecated As of JDK version 1.1,
* replaced by {@code setBlockIncrement()}.
*/
@Deprecated
public synchronized void setPageIncrement(int v) {
int tmp = (v < 1) ? 1 : v;
if (pageIncrement == tmp) {
return;
}
pageIncrement = tmp;
ScrollbarPeer peer = (ScrollbarPeer)this.peer;
if (peer != null) {
peer.setPageIncrement(pageIncrement);
}
}
示例5: setPageIncrement
import java.awt.peer.ScrollbarPeer; //导入方法依赖的package包/类
/**
* @deprecated As of JDK version 1.1,
* replaced by <code>setBlockIncrement()</code>.
*/
@Deprecated
public synchronized void setPageIncrement(int v) {
int tmp = (v < 1) ? 1 : v;
if (pageIncrement == tmp) {
return;
}
pageIncrement = tmp;
ScrollbarPeer peer = (ScrollbarPeer)this.peer;
if (peer != null) {
peer.setPageIncrement(pageIncrement);
}
}