站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.6 API 英文版文档

Range - JBOSS Portal 2.6 API 英文版文档


org.jboss.portlet.forums.helper
Class Range

java.lang.Object
  extended byorg.jboss.portlet.forums.helper.Range
Direct Known Subclasses:
Goto, GotoWithOffset

public class Range
extends java.lang.Object

Generate a jump bar like : [0,1,2,...,10,11,12,...,21,22,23]

Version:
$Revision: 5448 $
Author:
Julien Viet

Field Summary
protected  int left
          DOCUMENT_ME
protected  int middle
          DOCUMENT_ME
protected  int right
          DOCUMENT_ME
 
Constructor Summary
Range(int left, int middle, int right)
           
 
Method Summary
protected  java.lang.String build(int size, int offset)
          Do the job.
protected  void end(java.lang.StringBuffer buffer)
          End the generated string.
protected  void enhanced(java.lang.StringBuffer buffer, int index)
          Generates a non last enhanced item.
protected  void gap(java.lang.StringBuffer buffer)
          Generates a gap.
private  void gap(java.lang.StringBuffer buffer, int from, int to)
           
protected  void lastEnhanced(java.lang.StringBuffer buffer, int index)
          Generates a last enhanced item.
protected  void lastNormal(java.lang.StringBuffer buffer, int index)
          Generates a last normal item.
protected  void normal(java.lang.StringBuffer buffer, int index)
          Generates a non last normal item.
private  void range(java.lang.StringBuffer buffer, int from, int offset, int to)
           
protected  void separe(java.lang.StringBuffer buffer)
          Generates a separator.
protected  void start(java.lang.StringBuffer buffer)
          Begin the generated string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

left

protected final int left
DOCUMENT_ME


middle

protected final int middle
DOCUMENT_ME


right

protected final int right
DOCUMENT_ME

Constructor Detail

Range

public Range(int left,
             int middle,
             int right)
Parameters:
left - is the max number of items displayed on the left part
middle - is the max number of items displayed in the middle part
right - is the max number of items displayed in the right part
Method Detail

start

protected void start(java.lang.StringBuffer buffer)
Begin the generated string.


end

protected void end(java.lang.StringBuffer buffer)
End the generated string.


normal

protected void normal(java.lang.StringBuffer buffer,
                      int index)
Generates a non last normal item.


lastNormal

protected void lastNormal(java.lang.StringBuffer buffer,
                          int index)
Generates a last normal item.


enhanced

protected void enhanced(java.lang.StringBuffer buffer,
                        int index)
Generates a non last enhanced item.


lastEnhanced

protected void lastEnhanced(java.lang.StringBuffer buffer,
                            int index)
Generates a last enhanced item.


gap

protected void gap(java.lang.StringBuffer buffer)
Generates a gap.


separe

protected void separe(java.lang.StringBuffer buffer)
Generates a separator.


build

protected final java.lang.String build(int size,
                                       int offset)
Do the job.


gap

private void gap(java.lang.StringBuffer buffer,
                 int from,
                 int to)

range

private void range(java.lang.StringBuffer buffer,
                   int from,
                   int offset,
                   int to)
Parameters:
buffer - the output buffer
from - inclusive
offset - the highlighted offset
to - exclusive