01: /*
02: * NoSelectionModel.java
03: *
04: * This file is part of SQL Workbench/J, http://www.sql-workbench.net
05: *
06: * Copyright 2002-2008, Thomas Kellerer
07: * No part of this code maybe reused without the permission of the author
08: *
09: * To contact the author please send an email to: support@sql-workbench.net
10: *
11: */
12: package workbench.gui.components;
13:
14: import javax.swing.ListSelectionModel;
15: import javax.swing.event.ListSelectionListener;
16:
17: /**
18: *
19: * @author support@sql-workbench.net
20: */
21: public class NoSelectionModel implements ListSelectionModel {
22:
23: /** Creates a new instance of NoSelectionModel */
24: public NoSelectionModel() {
25: }
26:
27: public void addListSelectionListener(ListSelectionListener x) {
28: }
29:
30: public void addSelectionInterval(int index0, int index1) {
31: }
32:
33: public void clearSelection() {
34: }
35:
36: public int getAnchorSelectionIndex() {
37: return -1;
38: }
39:
40: public int getLeadSelectionIndex() {
41: return -1;
42: }
43:
44: /** Returns the last selected index or -1 if the selection is empty.
45: *
46: */
47: public int getMaxSelectionIndex() {
48: return -1;
49: }
50:
51: public int getMinSelectionIndex() {
52: return -1;
53: }
54:
55: public int getSelectionMode() {
56: return 0;
57: }
58:
59: public boolean getValueIsAdjusting() {
60: return false;
61: }
62:
63: public void insertIndexInterval(int index, int length,
64: boolean before) {
65: }
66:
67: public boolean isSelectedIndex(int index) {
68: return false;
69: }
70:
71: public boolean isSelectionEmpty() {
72: return true;
73: }
74:
75: public void removeIndexInterval(int index0, int index1) {
76: }
77:
78: public void removeListSelectionListener(ListSelectionListener x) {
79: }
80:
81: public void removeSelectionInterval(int index0, int index1) {
82: }
83:
84: public void setAnchorSelectionIndex(int index) {
85: }
86:
87: public void setLeadSelectionIndex(int index) {
88: }
89:
90: public void setSelectionInterval(int index0, int index1) {
91: }
92:
93: public void setSelectionMode(int selectionMode) {
94: }
95:
96: public void setValueIsAdjusting(boolean valueIsAdjusting) {
97: }
98:
99: }
|