wisdomx.ui.render
クラス DefaultPageListDecorator

java.lang.Object
  拡張wisdomx.ui.render.DefaultPageListDecorator
すべての実装インタフェース:
IPageListDecorator

public abstract class DefaultPageListDecorator
extends java.lang.Object
implements IPageListDecorator

IPageListDecoratorのサンプル実装クラス

バージョン:
1
作成者:
Takao Kouda

メソッドの概要
 int changePageIndex(java.lang.String eventName, int currentPageIndex, int toPageIndex)
          イベント文字列から次ページ、前ページ、ページ指定かを判断し、遷移先のページ番号を取得します。
 java.lang.String drawCounter(int rows, int totalPage, int perPageRows, int currentPageIndex, boolean hasPrevious, boolean hasNext)
          ページ・カウンタを描画します。
 java.lang.String drawNext(boolean hasNext)
          次ページリンクを描画します。
 java.lang.String drawPrevious(boolean hasPrevioues)
          前ページリンクを描画します。
 java.lang.String getMoveEventName()
          指定ページ遷移のイベント文字列を取得します。
 java.lang.String getNextEventName()
          次ページ遷移のイベント文字列を取得します。
 java.lang.String getPrevEventName()
          前ページ遷移のイベント文字列を取得します。
 
クラス java.lang.Object から継承したメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

メソッドの詳細

drawCounter

public java.lang.String drawCounter(int rows,
                                    int totalPage,
                                    int perPageRows,
                                    int currentPageIndex,
                                    boolean hasPrevious,
                                    boolean hasNext)
インタフェース IPageListDecorator の記述:
ページ・カウンタを描画します。
一般的な例では
1 2 3 4 5 6 7 8
のような形式の一覧形式表の画面上部または画面下部に表示されるページ・ナビゲーションになります。

定義:
インタフェース IPageListDecorator 内の drawCounter
パラメータ:
rows - 現在の行番号。開始位置は1
totalPage - 全ページ数
perPageRows - 1ページあたりの表示行数
currentPageIndex - 現在のページ位置
hasPrevious - 前ページを持つか否か
hasNext - 次ページを持つか否か
戻り値:
ページ・カウンタ

drawPrevious

public java.lang.String drawPrevious(boolean hasPrevioues)
インタフェース IPageListDecorator の記述:
前ページリンクを描画します。
一般的な例では
<<前へ
のような形式のリンクになります。

定義:
インタフェース IPageListDecorator 内の drawPrevious
パラメータ:
hasPrevioues - 前ページを持つか否か
戻り値:
前ページリンク

drawNext

public java.lang.String drawNext(boolean hasNext)
インタフェース IPageListDecorator の記述:
次ページリンクを描画します。
一般的な例では
>>次へ
のような形式のリンクになります。

定義:
インタフェース IPageListDecorator 内の drawNext
パラメータ:
hasNext - 次ページを持つか否か
戻り値:
次ページリンク

changePageIndex

public int changePageIndex(java.lang.String eventName,
                           int currentPageIndex,
                           int toPageIndex)
インタフェース IPageListDecorator の記述:
イベント文字列から次ページ、前ページ、ページ指定かを判断し、遷移先のページ番号を取得します。

定義:
インタフェース IPageListDecorator 内の changePageIndex
パラメータ:
eventName -
currentPageIndex - 現在のページ番号
toPageIndex - このメソッド実行後に移動するページ番号
戻り値:
移動先のページ番号

getPrevEventName

public java.lang.String getPrevEventName()
インタフェース IPageListDecorator の記述:
前ページ遷移のイベント文字列を取得します。

定義:
インタフェース IPageListDecorator 内の getPrevEventName
戻り値:
前ページの遷移のイベント文字列

getMoveEventName

public java.lang.String getMoveEventName()
インタフェース IPageListDecorator の記述:
指定ページ遷移のイベント文字列を取得します。

定義:
インタフェース IPageListDecorator 内の getMoveEventName
戻り値:
指定ページの遷移のイベント文字列

getNextEventName

public java.lang.String getNextEventName()
インタフェース IPageListDecorator の記述:
次ページ遷移のイベント文字列を取得します。

定義:
インタフェース IPageListDecorator 内の getNextEventName
戻り値:
指定ページの遷移のイベント文字列