| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
package org.cb.cardboard; |
| 21 |
|
|
| 22 |
|
import javax.swing.*; |
| 23 |
|
import javax.swing.event.EventListenerList; |
| 24 |
|
|
| 25 |
|
|
| 26 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
|
|
| 32 |
|
|
| 33 |
0 |
public class DefaultBoardSelectionModel implements BoardSelectionModel |
| 34 |
|
{ |
| 35 |
|
|
| 36 |
0 |
private final DefaultListSelectionModel _adaptee = new DefaultListSelectionModel(); |
| 37 |
|
|
| 38 |
0 |
private final EventListenerList _listenerList = new EventListenerList(); |
| 39 |
|
|
| 40 |
|
public void setSelectionInterval(final int index0, class="keyword">final class="keyword">int index1) |
| 41 |
|
{ |
| 42 |
0 |
_adaptee.setSelectionInterval(index0, index1); |
| 43 |
0 |
} |
| 44 |
|
|
| 45 |
|
public void addSelectionInterval(final int index0, class="keyword">final class="keyword">int index1) |
| 46 |
|
{ |
| 47 |
0 |
_adaptee.addSelectionInterval(index0, index1); |
| 48 |
0 |
} |
| 49 |
|
|
| 50 |
|
public void removeSelectionInterval(final int index0, class="keyword">final class="keyword">int index1) |
| 51 |
|
{ |
| 52 |
0 |
_adaptee.removeSelectionInterval(index0, index1); |
| 53 |
0 |
} |
| 54 |
|
|
| 55 |
|
public int getMinSelectionIndex() |
| 56 |
|
{ |
| 57 |
0 |
return _adaptee.getMinSelectionIndex(); |
| 58 |
|
} |
| 59 |
|
|
| 60 |
|
public int getMaxSelectionIndex() |
| 61 |
|
{ |
| 62 |
0 |
return _adaptee.getMaxSelectionIndex(); |
| 63 |
|
} |
| 64 |
|
|
| 65 |
|
public boolean isSelectedIndex(final int index) |
| 66 |
|
{ |
| 67 |
0 |
return _adaptee.isSelectedIndex(index); |
| 68 |
|
} |
| 69 |
|
|
| 70 |
|
public int getAnchorSelectionIndex() |
| 71 |
|
{ |
| 72 |
0 |
return _adaptee.getAnchorSelectionIndex(); |
| 73 |
|
} |
| 74 |
|
|
| 75 |
|
public void setAnchorSelectionIndex(final int index) |
| 76 |
|
{ |
| 77 |
0 |
_adaptee.setAnchorSelectionIndex(index); |
| 78 |
0 |
} |
| 79 |
|
|
| 80 |
|
public int getLeadSelectionIndex() |
| 81 |
|
{ |
| 82 |
0 |
return _adaptee.getLeadSelectionIndex(); |
| 83 |
|
} |
| 84 |
|
|
| 85 |
|
public void setLeadSelectionIndex(final int index) |
| 86 |
|
{ |
| 87 |
0 |
_adaptee.setLeadSelectionIndex(index); |
| 88 |
0 |
} |
| 89 |
|
|
| 90 |
|
public void clearSelection() |
| 91 |
|
{ |
| 92 |
0 |
_adaptee.clearSelection(); |
| 93 |
0 |
} |
| 94 |
|
|
| 95 |
|
public boolean isSelectionEmpty() |
| 96 |
|
{ |
| 97 |
0 |
return _adaptee.isSelectionEmpty(); |
| 98 |
|
} |
| 99 |
|
|
| 100 |
|
public void insertIndexInterval(final int index, class="keyword">final class="keyword">int length, class="keyword">final boolean before) |
| 101 |
|
{ |
| 102 |
0 |
_adaptee.insertIndexInterval(index, length, before); |
| 103 |
0 |
} |
| 104 |
|
|
| 105 |
|
public void removeIndexInterval(final int index0, class="keyword">final class="keyword">int index1) |
| 106 |
|
{ |
| 107 |
0 |
_adaptee.removeIndexInterval(index0, index1); |
| 108 |
0 |
} |
| 109 |
|
|
| 110 |
|
public void setValueIsAdjusting(final boolean valueIsAdjusting) |
| 111 |
|
{ |
| 112 |
0 |
_adaptee.setValueIsAdjusting(valueIsAdjusting); |
| 113 |
0 |
} |
| 114 |
|
|
| 115 |
|
public boolean getValueIsAdjusting() |
| 116 |
|
{ |
| 117 |
0 |
return _adaptee.getValueIsAdjusting(); |
| 118 |
|
} |
| 119 |
|
|
| 120 |
|
public void setSelectionMode(final int selectionMode) |
| 121 |
|
{ |
| 122 |
0 |
_adaptee.setSelectionMode(selectionMode); |
| 123 |
0 |
} |
| 124 |
|
|
| 125 |
|
public int getSelectionMode() |
| 126 |
|
{ |
| 127 |
0 |
return _adaptee.getSelectionMode(); |
| 128 |
|
} |
| 129 |
|
|
| 130 |
|
public void addBoardSelectionListener(final BoardSelectionListener x) |
| 131 |
|
{ |
| 132 |
0 |
_listenerList.add(BoardSelectionListener.class, x); |
| 133 |
0 |
} |
| 134 |
|
|
| 135 |
|
public void removeBoardSelectionListener(final BoardSelectionListener x) |
| 136 |
|
{ |
| 137 |
0 |
_listenerList.remove(BoardSelectionListener.class, x); |
| 138 |
0 |
} |
| 139 |
|
} |