org.springframework.richclient.dialog.control
Class VetoableSingleSelectionModel

java.lang.Object
  extended by javax.swing.DefaultSingleSelectionModel
      extended by org.springframework.richclient.dialog.control.VetoableSingleSelectionModel
All Implemented Interfaces:
Serializable, SingleSelectionModel

public abstract class VetoableSingleSelectionModel
extends DefaultSingleSelectionModel

Custom SingleSelectionModel implementation that allows for vetoing the selection of tabs.

The selectionAllowed(int) method must return true if the tab at the index can be selected, or false if not.

Author:
Peter De Bruycker
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.DefaultSingleSelectionModel
changeEvent, listenerList
 
Constructor Summary
VetoableSingleSelectionModel()
           
 
Method Summary
protected abstract  boolean selectionAllowed(int index)
           
 void setSelectedIndex(int index)
           
 
Methods inherited from class javax.swing.DefaultSingleSelectionModel
addChangeListener, clearSelection, fireStateChanged, getChangeListeners, getListeners, getSelectedIndex, isSelected, removeChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VetoableSingleSelectionModel

public VetoableSingleSelectionModel()
Method Detail

setSelectedIndex

public final void setSelectedIndex(int index)
Specified by:
setSelectedIndex in interface SingleSelectionModel
Overrides:
setSelectedIndex in class DefaultSingleSelectionModel

selectionAllowed

protected abstract boolean selectionAllowed(int index)


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.