Row entryRow = new Row();
entryRow.setCellSpacing(new Extent(5));
add(entryRow);
Label itemLabel = new Label(Messages.getString("PageNavigator.ItemLabel"));
entryRow.add(itemLabel);
pageField = new TextField();
pageField.setStyleName("PageNavigator.PageField");
pageField.setWidth(new Extent(4, Extent.EX));
pageField.setText("1");
pageField.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
setPageIndex(Integer.parseInt(pageField.getText()) - 1);
} catch (NumberFormatException ex) {
setPageIndex(getPageIndex());
}
}
});
entryRow.add(pageField);
Label prepositionLabel = new Label(Messages.getString("PageNavigator.PrepositionLabel"));
entryRow.add(prepositionLabel);
totalPagesLabel = new Label("1");
entryRow.add(totalPagesLabel);
Button nextPageButton = new Button(Styles.ICON_24_RIGHT_ARROW);
nextPageButton.setRolloverEnabled(true);
nextPageButton.setRolloverIcon(Styles.ICON_24_RIGHT_ARROW_ROLLOVER);