info.joseluismartin.gui
Class PaginatorView

java.lang.Object
  extended by info.joseluismartin.gui.AbstractView<Paginator>
      extended by info.joseluismartin.gui.PaginatorView
All Implemented Interfaces:
PaginatorListener, BinderHolder, ControlChangeListener, Binder<Paginator>, ModelHolder<Paginator>, View<Paginator>, EventListener

public class PaginatorView
extends AbstractView<Paginator>
implements PaginatorListener

PaginatorView with control buttons to manage paginator.

Author:
Jose Luis Martin - (jlm@joseluismartin.info)
See Also:
PageableTable

Field Summary
 
Fields inherited from class info.joseluismartin.gui.AbstractView
DEFAULT_BINDER_FACTORY_NAME, errors, height, messageSource, width
 
Constructor Summary
PaginatorView()
          Create a PaginatorView with default paginator
PaginatorView(Paginator paginator)
          Create a PaginatorView using this Paginator
 
Method Summary
protected  JComponent buildPanel()
          Build the JComponent that hold controls.
 void doRefresh()
          Refresh view with data of model
 void doUpdate()
          Callback method on update()
 Icon getFirstIcon()
           
 Icon getLastIcon()
           
 Icon getNextIcon()
           
 String[] getPageSizes()
           
 Paginator getPaginator()
           
 Icon getPreviousIcon()
           
 void init()
          Initialize paginator after property set.
 void pageChanged(PageChangedEvent event)
          Handler for paginator changes.
 void setFirstIcon(Icon firstIcon)
           
 void setLastIcon(Icon lastIcon)
           
 void setNextIcon(Icon nextIcon)
           
 void setPageSizes(String[] pageSizes)
           
 void setPaginator(Paginator paginator)
           
 void setPreviousIcon(Icon previousIcon)
           
 
Methods inherited from class info.joseluismartin.gui.AbstractView
addControlChangeListener, addView, afterRefresh, afterUpdate, autobind, bind, bind, clear, controlChange, enableView, fireControlChange, getBinder, getBinderFactory, getBindingResult, getControlAccessorFactory, getControlInitializer, getErrorMessage, getErrorProcessors, getHeight, getIgnoredProperties, getMessage, getMessage, getMessageSource, getModel, getName, getPanel, getValidator, getWidth, ignoreProperties, ignoreProperty, isAutobinding, isDirty, isInitializeControls, listen, onSetModel, refresh, removeControlChangeListener, setAutobinding, setBinderFactory, setControlAccessorFactory, setControlInitializer, setDirty, setErrorProcessors, setHeight, setIgnoredProperties, setInitializeControls, setMessageSource, setModel, setName, setValidator, setWidth, update, validateView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PaginatorView

public PaginatorView()
Create a PaginatorView with default paginator


PaginatorView

public PaginatorView(Paginator paginator)
Create a PaginatorView using this Paginator

Parameters:
paginator - the paginator to use as model
Method Detail

init

public void init()
Initialize paginator after property set. Normally called from context with init-method.


buildPanel

protected JComponent buildPanel()
Build the JComponent that hold controls.

Specified by:
buildPanel in class AbstractView<Paginator>
Returns:
a JCompoent

pageChanged

public void pageChanged(PageChangedEvent event)
Handler for paginator changes. refresh the status label of paginator

Specified by:
pageChanged in interface PaginatorListener
Parameters:
event - the PaginatorChangedEvent

doRefresh

public void doRefresh()
Refresh view with data of model

Overrides:
doRefresh in class AbstractView<Paginator>

doUpdate

public void doUpdate()
Description copied from class: AbstractView
Callback method on update()

Overrides:
doUpdate in class AbstractView<Paginator>

getNextIcon

public Icon getNextIcon()
Returns:
the nextIcon

setNextIcon

public void setNextIcon(Icon nextIcon)
Parameters:
nextIcon - the nextIcon to set

getPreviousIcon

public Icon getPreviousIcon()
Returns:
the previousIcon

setPreviousIcon

public void setPreviousIcon(Icon previousIcon)
Parameters:
previousIcon - the previousIcon to set

getLastIcon

public Icon getLastIcon()
Returns:
the lastIcond

setLastIcon

public void setLastIcon(Icon lastIcon)
Parameters:
lastIcon - the lastIcond to set

getFirstIcon

public Icon getFirstIcon()
Returns:
the firstIcon

setFirstIcon

public void setFirstIcon(Icon firstIcon)
Parameters:
firstIcon - the firstIcon to set

getPageSizes

public String[] getPageSizes()
Returns:
the pageSizes

setPageSizes

public void setPageSizes(String[] pageSizes)
Parameters:
pageSizes - the pageSizes to set

getPaginator

public Paginator getPaginator()
Returns:
the paginator

setPaginator

public void setPaginator(Paginator paginator)
Parameters:
paginator - the paginator to set


Copyright © 2013 JDAL. All Rights Reserved.