|
|||||||||
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 FormNested 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 useMethod Detail |
---|
public void init()
AbstractComponent
super.init()
is also invoked.
init
in interface Component
init
in class AbstractComponent
Component.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)
Component
Style
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 Borderable
applyStyle
in interface Component
applyStyle
in class AbstractComponent
style
- The style object from which to retrieve properties for this
Component
.Borderable.applyStyle(nextapp.echo.Style)
public Color getBackground()
Component
getBackground
in interface Component
getBackground
in class AbstractComponent
Component.getBackground()
public Font getFont()
Component
getFont
in interface Component
getFont
in class AbstractComponent
Component.getFont()
public Color getForeground()
Component
getForeground
in interface Component
getForeground
in class AbstractComponent
Component.getForeground()
public void setBackground(Color newValue)
Component
setBackground
in interface Component
setBackground
in class AbstractComponent
newValue
- The new background color of the component.Component.setBackground(nextapp.echo.Color)
public void setFont(Font newValue)
Component
setFont
in interface Component
setFont
in class AbstractComponent
newValue
- The new font of the component.Component.setFont(nextapp.echo.Font)
public void setForeground(Color newValue)
Component
setForeground
in interface Component
setForeground
in class AbstractComponent
newValue
- The new foreground color of the component.Component.setForeground(nextapp.echo.Color)
public Color getBorderColor()
getBorderColor
in interface Borderable
Color
of the Borderable's
border.Borderable.getBorderColor()
public int getBorderSize()
getBorderSize
in interface Borderable
Borderables's
border.Borderable.getBorderSize()
public int getBorderStyle()
Borderable
getBorderStyle
in interface Borderable
Borderable.getBorderStyle()
public void setBorderColor(Color borderColor)
Borderable
Color
of the Borderable's
border.
This will also set the left, top, right and bottom border color.
setBorderColor
in interface Borderable
Borderable.setBorderColor(nextapp.echo.Color)
public void setBorderSize(int borderSize)
Borderable
Borderables's
border.
This will also set the left, top, right and bottom border size.
setBorderSize
in interface Borderable
Borderable.setBorderSize(int)
public void setBorderStyle(int borderStyle)
Borderable
setBorderStyle
in interface Borderable
Borderable.setBorderStyle(int)
public Color getLeftBorderColor()
getLeftBorderColor
in interface Borderable
Color
of the Borderable's
left border.Borderable.getLeftBorderColor()
public int getLeftBorderSize()
getLeftBorderSize
in interface Borderable
Borderables's
left border.Borderable.getLeftBorderSize()
public int getLeftBorderStyle()
getLeftBorderStyle
in interface Borderable
Borderables's
left border.Borderable.getLeftBorderStyle()
public void setLeftBorderColor(Color borderColor)
Borderable
Color
of the Borderable's
left border.
setLeftBorderColor
in interface Borderable
Borderable.setLeftBorderColor(nextapp.echo.Color)
public void setLeftBorderSize(int borderSize)
Borderable
Borderables's
left border.
setLeftBorderSize
in interface Borderable
Borderable.setLeftBorderSize(int)
public void setLeftBorderStyle(int borderStyle)
Borderable
Borderables's
left border.
setLeftBorderStyle
in interface Borderable
Borderable.setLeftBorderStyle(int)
public Color getTopBorderColor()
getTopBorderColor
in interface Borderable
Color
of the Borderable's
top border.Borderable.getTopBorderColor()
public int getTopBorderSize()
getTopBorderSize
in interface Borderable
Borderables's
top border.Borderable.getTopBorderSize()
public int getTopBorderStyle()
getTopBorderStyle
in interface Borderable
Borderables's
top border.Borderable.getTopBorderStyle()
public void setTopBorderColor(Color borderColor)
Borderable
Color
of the Borderable's
top border.
setTopBorderColor
in interface Borderable
Borderable.setTopBorderColor(nextapp.echo.Color)
public void setTopBorderSize(int borderSize)
Borderable
Borderables's
top border.
setTopBorderSize
in interface Borderable
Borderable.setTopBorderSize(int)
public void setTopBorderStyle(int borderStyle)
Borderable
Borderables's
top border.
setTopBorderStyle
in interface Borderable
Borderable.setTopBorderStyle(int)
public Color getRightBorderColor()
getRightBorderColor
in interface Borderable
Color
of the Borderable's
right border.Borderable.getRightBorderColor()
public int getRightBorderSize()
getRightBorderSize
in interface Borderable
Borderables's
right border.Borderable.getRightBorderSize()
public int getRightBorderStyle()
getRightBorderStyle
in interface Borderable
Borderables's
right border.Borderable.getRightBorderStyle()
public void setRightBorderColor(Color borderColor)
Borderable
Color
of the Borderable's
right border.
setRightBorderColor
in interface Borderable
Borderable.setRightBorderColor(nextapp.echo.Color)
public void setRightBorderSize(int borderSize)
Borderable
Borderables's
right border.
setRightBorderSize
in interface Borderable
Borderable.setRightBorderSize(int)
public void setRightBorderStyle(int borderStyle)
Borderable
Borderables's
right border.
setRightBorderStyle
in interface Borderable
Borderable.setRightBorderStyle(int)
public Color getBottomBorderColor()
getBottomBorderColor
in interface Borderable
Color
of the Borderable's
bottom border.Borderable.getBottomBorderColor()
public int getBottomBorderSize()
getBottomBorderSize
in interface Borderable
Borderables's
bottom border.Borderable.getBottomBorderSize()
public int getBottomBorderStyle()
getBottomBorderStyle
in interface Borderable
Borderables's
bottom border.Borderable.getBottomBorderStyle()
public void setBottomBorderColor(Color borderColor)
Borderable
Color
of the Borderable's
bottom border.
setBottomBorderColor
in interface Borderable
Borderable.setBottomBorderColor(nextapp.echo.Color)
public void setBottomBorderSize(int borderSize)
Borderable
Borderables's
bottom border.
setBottomBorderSize
in interface Borderable
Borderable.setBottomBorderSize(int)
public void setBottomBorderStyle(int borderStyle)
Borderable
Borderables's
bottom border.
setBottomBorderStyle
in interface Borderable
Borderable.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 ReflectionSetter
field
- - the field to be setnewValue
- - the new value to be set
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.NullPointerException
java.lang.Exception
ReflectionSetter.set(Field,
Object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |