public static final String splitPages
int pageLength)
{
int maxPage = count / pageLength +
int prevPage = thePage
if (prevPage <
{
prevPage =
}
int nextPage = thePage +
int showMaxPage = thePage +
int spacePage =
if (thePage >
{
spacePage = thePage
}
if (showMaxPage <
{
showMaxPage =
}
//<p class=
StringBuffer sb = new StringBuffer();
sb
sb
+
for (int i = spacePage; i < showMaxPage && i <= maxPage; i++)
{
String fontColor =
if (i == thePage)
{
fontColor =
}
sb
+
+
}
sb
+
sb
+
sb
return sb
}
public static final String splitPages
int pageLength)
{
int maxPage = count / pageLength +
int prevPage = thePage
if (prevPage <
{
prevPage =
}
int nextPage = thePage +
int showMaxPage = thePage +
int spacePage =
if (thePage >
{
spacePage = thePage
}
if (showMaxPage <
{
showMaxPage =
}
//<p class=
StringBuffer sb = new StringBuffer();
sb
sb
+
for (int i = spacePage; i < showMaxPage && i <= maxPage; i++)
{
String fontColor =
if (i == thePage)
{
fontColor =
}
sb
+
+
}
sb
+
sb
+
sb
return sb
}
thePage為第幾頁
From:http://tw.wingwit.com/Article/program/Java/hx/201311/26259.html