Package uk.ac.starlink.topcat

# Class SortOrderSelector.Model

java.lang.Object
uk.ac.starlink.topcat.SortOrderSelector.Model

Enclosing class:
  `SortOrderSelector`

public static class SortOrderSelector.Model extends Object
Model for SortOrderSelector.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final SortOrderSelector.Model`
`DUMMY_MODEL`
Model that can be used when no selections are possible.

## Constructor Summary

Constructors
Constructor
Description
`Model(TopcatModel tcModel)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`void`
`addPropertyChangeListener(PropertyChangeListener l)`
Adds a listener that will be informed if the selection has changed.
`SortOrder`
`getSelectedSortOrder()`
Returns the sort order currently selected.
`void`
`removePropertyChangeListener(PropertyChangeListener l)`
Removes a previously added listener.
`void`
`setSelectedSortOrder(SortOrder sortOrder)`
Sets the selected sort order.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### DUMMY_MODEL

public static final SortOrderSelector.Model DUMMY_MODEL
Model that can be used when no selections are possible.

## Constructor Details

### Model

public Model(TopcatModel tcModel)
Constructor.

Parameters:
  `tcModel` - topcat model that this selector can sort, may be null for a dummy instance

## Method Details

### getSelectedSortOrder

public SortOrder getSelectedSortOrder()
Returns the sort order currently selected.

Returns:
  selection, not null

### setSelectedSortOrder

public void setSelectedSortOrder(SortOrder sortOrder)
Sets the selected sort order.

Parameters:
  `sortOrder` - new selection, not null

### addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)
Adds a listener that will be informed if the selection has changed.

Parameters:
  `l` - listener

### removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)
Removes a previously added listener.

Parameters:
  `l` - listener