org.jdesktop.swingx.decorator
Interface SelectionMapper

All Known Implementing Classes:
DefaultSelectionMapper

public interface SelectionMapper

Responsible for keeping track of selection in model coordinates.

updates view selection on pipeline change. updates model selection on view selection change.


Method Summary
 void clearModelSelection()
           
 ListSelectionModel getViewSelectionModel()
           
 void insertIndexInterval(int start, int length, boolean before)
          Adjust the model by adding the specified rows.
 boolean isEnabled()
           
 void removeIndexInterval(int start, int end)
          Adjust the model by removing the specified rows.
 void setEnabled(boolean enabled)
          Toggle whether selection mapping is active.
 void setFilters(FilterPipeline pipeline)
          Install the new filter pipeline and map the newly filtered data towards the view.
 void setViewSelectionModel(ListSelectionModel viewSelectionMode)
          sets the view selection model.
 

Method Detail

setViewSelectionModel

void setViewSelectionModel(ListSelectionModel viewSelectionMode)
sets the view selection model. Must not be null.

Parameters:
viewSelectionMode - holding selected indices in view coordinates

getViewSelectionModel

ListSelectionModel getViewSelectionModel()
Returns:
view selection model

setFilters

void setFilters(FilterPipeline pipeline)
Install the new filter pipeline and map the newly filtered data towards the view.


setEnabled

void setEnabled(boolean enabled)
Toggle whether selection mapping is active. If mapping is active, user actions to select rows in the view will be recorded in model coordinates. When the model changes due to filtering, the view selection will be updated to maintain the logical selection.


isEnabled

boolean isEnabled()
Returns:
true if selection mapping is active.

clearModelSelection

void clearModelSelection()

insertIndexInterval

void insertIndexInterval(int start,
                         int length,
                         boolean before)
Adjust the model by adding the specified rows.


removeIndexInterval

void removeIndexInterval(int start,
                         int end)
Adjust the model by removing the specified rows.