|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnextapp.echo.AbstractComponent
nextapp.echo.Container
echopoint.table.PagedTableController
public class PagedTableController
PagedTableController is a component that can control the
scrolling of a PagedTabelModel. Use it as the visual artefact that allows the
user to control what page is currently seen in a Table.
This component provides a compound component that looks as follows :
[next button] 'Page' [currentPage TextField] 'Of' [ maxPage TextField] [rowsPerPage SelectField] 'Per Page' [previous Button]
You can gain access to each of these child components to customise what the PagedTableController looks like.
PagedTableModel,
SortableTableModel,
TableModel,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface echopoint.positionable.Borderable |
|---|
Borderable.NestedStyleInfo |
| Field Summary | |
|---|---|
java.lang.String |
PAGED_TABLE_SCROLLER_CHANGED_PROPERTY
|
| Constructor Summary | |
|---|---|
PagedTableController()
Constructs a PagedTableController that controls no
PagedTableModel. |
|
PagedTableController(TableModel tableModel)
Constructs a PagedTableController that pages the provided
TableModel. |
|
| Method Summary | |
|---|---|
void |
applyStyle(Style style)
Sets stylistic properties of this component based on a Style
object. |
Color |
getBackground()
Returns the background color of the component. |
Color |
getBorderColor()
|
int |
getBorderSize()
|
int |
getBorderStyle()
Returns the border style of the Borderable. |
Color |
getBottomBorderColor()
|
int |
getBottomBorderSize()
|
int |
getBottomBorderStyle()
|
TextField |
getCurrentPage()
Returns the current page TextField |
Font |
getFont()
Returns the font. |
Color |
getForeground()
Returns the foreground of the component. |
Color |
getLeftBorderColor()
|
int |
getLeftBorderSize()
|
int |
getLeftBorderStyle()
|
TextField |
getMaxPages()
Returns the maxPages TextField |
TableModel |
getModel()
Returns the TableModel in use |
Button |
getNext()
Returns the Next Button |
java.lang.String |
getOfText()
Returns the text value for 'Of' as in Page 1 'Of' 10 |
java.lang.String |
getPageText()
Returns the text value for 'Page' as in 'Page' 1 Of 10 |
java.lang.String |
getPerPageText()
Returns the text value for 'Per Page' as in 10 'Per Page' |
Button |
getPrevious()
Returns the Previous Button |
Color |
getRightBorderColor()
|
int |
getRightBorderSize()
|
int |
getRightBorderStyle()
|
SelectField |
getRowsPerPage()
Returns the Rows Per Page SelectField |
Color |
getTopBorderColor()
|
int |
getTopBorderSize()
|
int |
getTopBorderStyle()
|
void |
init()
Called exactly one time when a component is registered to a hierarchy for the first time. |
java.lang.Object |
set(java.lang.reflect.Field field,
java.lang.Object newValue)
Called to save the old value of a field, set in a new value and return the old value of a field. |
void |
setBackground(Color newValue)
Sets the background color of the component. |
void |
setBorderColor(Color borderColor)
Sets the Color of the Borderable's border. |
void |
setBorderSize(int borderSize)
Sets the size of the Borderables's border. |
void |
setBorderStyle(int borderStyle)
Sets the border style of the Borderable. |
void |
setBottomBorderColor(Color borderColor)
Sets the Color of the Borderable's bottom border. |
void |
setBottomBorderSize(int borderSize)
Sets the size of the Borderables's bottom border. |
void |
setBottomBorderStyle(int borderStyle)
Sets the border style of the Borderables's bottom border. |
void |
setCurrentPage(TextField field)
Sets the CurrentPage TextField |
void |
setFont(Font newValue)
Sets the font of the component. |
void |
setForeground(Color newValue)
Sets the foreground color of the component. |
void |
setLeftBorderColor(Color borderColor)
Sets the Color of the Borderable's left border. |
void |
setLeftBorderSize(int borderSize)
Sets the size of the Borderables's left border. |
void |
setLeftBorderStyle(int borderStyle)
Sets the border style of the Borderables's left border. |
void |
setMaxPages(TextField field)
Sets the MaxPages TextField |
void |
setModel(TableModel tableModel)
Sets the PagedTableModel to use. |
void |
setNext(Button button)
Sets the Next Button |
void |
setOfText(java.lang.String string)
Sets the text value for 'Of' as in Page 1 'Of' 10 |
void |
setPageText(java.lang.String string)
Sets the text value for 'Page' as in 'Page' 1 Of 10 |
void |
setPerPageText(java.lang.String string)
Sets the text value for 'Per Page' as in 10 'Per Page' |
void |
setPrevious(Button button)
Sets the Previous Button |
void |
setRightBorderColor(Color borderColor)
Sets the Color of the Borderable's right border. |
void |
setRightBorderSize(int borderSize)
Sets the size of the Borderables's right border. |
void |
setRightBorderStyle(int borderStyle)
Sets the border style of the Borderables's right border. |
void |
setRowsPerPage(SelectField field)
Sets the Rows Per Page SelectField. |
void |
setTopBorderColor(Color borderColor)
Sets the Color of the Borderable's top border. |
void |
setTopBorderSize(int borderSize)
Sets the size of the Borderables's top border. |
void |
setTopBorderStyle(int borderStyle)
Sets the border style of the Borderables's top border. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final java.lang.String PAGED_TABLE_SCROLLER_CHANGED_PROPERTY
| Constructor Detail |
|---|
public PagedTableController()
PagedTableController that controls no
PagedTableModel.
public PagedTableController(TableModel tableModel)
PagedTableController that pages the provided
TableModel. If the TableModel does not implement
PagedTableModel, then it is wrapped in one.
tableModel - -
the TableModel to use| Method Detail |
|---|
public void init()
AbstractComponentsuper.init() is also invoked.
init in interface Componentinit in class AbstractComponentComponent.init()public TextField getCurrentPage()
public TextField getMaxPages()
public TableModel getModel()
public Button getNext()
public java.lang.String getOfText()
public java.lang.String getPageText()
public java.lang.String getPerPageText()
public Button getPrevious()
public SelectField getRowsPerPage()
public void setCurrentPage(TextField field)
field - a TextFieldpublic void setMaxPages(TextField field)
field - a TextFieldpublic void setModel(TableModel tableModel)
tableModel - the TableModel to usepublic void setNext(Button button)
button - -
the next buttonpublic void setOfText(java.lang.String string)
string - the text valuepublic void setPageText(java.lang.String string)
string - the text valuepublic void setPerPageText(java.lang.String string)
string - the text valuepublic void setPrevious(Button button)
button - the Previous Buttonpublic void setRowsPerPage(SelectField field)
field - the Rows Per Page SelectFieldpublic void applyStyle(Style style)
ComponentStyle
object. The version of this method in Component will set
foreground and background colors and the font from the style if they are
present. Components should override this method if they allow more
properties to be set from a style object, and should call
super.applyStyle() if necessary.
applyStyle in interface BorderableapplyStyle in interface ComponentapplyStyle in class AbstractComponentstyle - The style object from which to retrieve properties for this
Component.Borderable.applyStyle(nextapp.echo.Style)public Color getBackground()
Component
getBackground in interface ComponentgetBackground in class AbstractComponentComponent.getBackground()public Font getFont()
Component
getFont in interface ComponentgetFont in class AbstractComponentComponent.getFont()public Color getForeground()
Component
getForeground in interface ComponentgetForeground in class AbstractComponentComponent.getForeground()public void setBackground(Color newValue)
Component
setBackground in interface ComponentsetBackground in class AbstractComponentnewValue - The new background color of the component.Component.setBackground(nextapp.echo.Color)public void setFont(Font newValue)
Component
setFont in interface ComponentsetFont in class AbstractComponentnewValue - The new font of the component.Component.setFont(nextapp.echo.Font)public void setForeground(Color newValue)
Component
setForeground in interface ComponentsetForeground in class AbstractComponentnewValue - The new foreground color of the component.Component.setForeground(nextapp.echo.Color)public Color getBorderColor()
getBorderColor in interface BorderableColor of the Borderable's border.Borderable.getBorderColor()public int getBorderSize()
getBorderSize in interface BorderableBorderables's border.Borderable.getBorderSize()public int getBorderStyle()
Borderable
getBorderStyle in interface BorderableBorderable.getBorderStyle()public void setBorderColor(Color borderColor)
BorderableColor of the Borderable's border.
This will also set the left, top, right and bottom border color.
setBorderColor in interface BorderableBorderable.setBorderColor(nextapp.echo.Color)public void setBorderSize(int borderSize)
BorderableBorderables's border.
This will also set the left, top, right and bottom border size.
setBorderSize in interface BorderableBorderable.setBorderSize(int)public void setBorderStyle(int borderStyle)
Borderable
setBorderStyle in interface BorderableBorderable.setBorderStyle(int)public Color getLeftBorderColor()
getLeftBorderColor in interface BorderableColor of the Borderable's left border.Borderable.getLeftBorderColor()public int getLeftBorderSize()
getLeftBorderSize in interface BorderableBorderables's left border.Borderable.getLeftBorderSize()public int getLeftBorderStyle()
getLeftBorderStyle in interface BorderableBorderables's left border.Borderable.getLeftBorderStyle()public void setLeftBorderColor(Color borderColor)
BorderableColor of the Borderable's left border.
setLeftBorderColor in interface BorderableBorderable.setLeftBorderColor(nextapp.echo.Color)public void setLeftBorderSize(int borderSize)
BorderableBorderables's left border.
setLeftBorderSize in interface BorderableBorderable.setLeftBorderSize(int)public void setLeftBorderStyle(int borderStyle)
BorderableBorderables's left border.
setLeftBorderStyle in interface BorderableBorderable.setLeftBorderStyle(int)public Color getTopBorderColor()
getTopBorderColor in interface BorderableColor of the Borderable's top border.Borderable.getTopBorderColor()public int getTopBorderSize()
getTopBorderSize in interface BorderableBorderables's top border.Borderable.getTopBorderSize()public int getTopBorderStyle()
getTopBorderStyle in interface BorderableBorderables's top border.Borderable.getTopBorderStyle()public void setTopBorderColor(Color borderColor)
BorderableColor of the Borderable's top border.
setTopBorderColor in interface BorderableBorderable.setTopBorderColor(nextapp.echo.Color)public void setTopBorderSize(int borderSize)
BorderableBorderables's top border.
setTopBorderSize in interface BorderableBorderable.setTopBorderSize(int)public void setTopBorderStyle(int borderStyle)
BorderableBorderables's top border.
setTopBorderStyle in interface BorderableBorderable.setTopBorderStyle(int)public Color getRightBorderColor()
getRightBorderColor in interface BorderableColor of the Borderable's right border.Borderable.getRightBorderColor()public int getRightBorderSize()
getRightBorderSize in interface BorderableBorderables's right border.Borderable.getRightBorderSize()public int getRightBorderStyle()
getRightBorderStyle in interface BorderableBorderables's right border.Borderable.getRightBorderStyle()public void setRightBorderColor(Color borderColor)
BorderableColor of the Borderable's right border.
setRightBorderColor in interface BorderableBorderable.setRightBorderColor(nextapp.echo.Color)public void setRightBorderSize(int borderSize)
BorderableBorderables's right border.
setRightBorderSize in interface BorderableBorderable.setRightBorderSize(int)public void setRightBorderStyle(int borderStyle)
BorderableBorderables's right border.
setRightBorderStyle in interface BorderableBorderable.setRightBorderStyle(int)public Color getBottomBorderColor()
getBottomBorderColor in interface BorderableColor of the Borderable's bottom border.Borderable.getBottomBorderColor()public int getBottomBorderSize()
getBottomBorderSize in interface BorderableBorderables's bottom border.Borderable.getBottomBorderSize()public int getBottomBorderStyle()
getBottomBorderStyle in interface BorderableBorderables's bottom border.Borderable.getBottomBorderStyle()public void setBottomBorderColor(Color borderColor)
BorderableColor of the Borderable's bottom border.
setBottomBorderColor in interface BorderableBorderable.setBottomBorderColor(nextapp.echo.Color)public void setBottomBorderSize(int borderSize)
BorderableBorderables's bottom border.
setBottomBorderSize in interface BorderableBorderable.setBottomBorderSize(int)public void setBottomBorderStyle(int borderStyle)
BorderableBorderables's bottom border.
setBottomBorderStyle in interface BorderableBorderable.setBottomBorderStyle(int)
public java.lang.Object set(java.lang.reflect.Field field,
java.lang.Object newValue)
throws java.lang.Exception
ReflectionSetter
public Object set(Field f, Object newValue) throws Exception {
Object oldValue = f.get(this);
f.set(this,newValue);
return oldValue;
}
set in interface ReflectionSetterfield - - the field to be setnewValue - - the new value to be set
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.NullPointerException
java.lang.ExceptionReflectionSetter.set(Field,
Object)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||