01: /*
02: * @(#)Selectable.java 5/11/2005
03: *
04: * Copyright 2002 - 2005 JIDE Software Inc. All rights reserved.
05: */
06: package com.jidesoft.swing;
07:
08: /**
09: * Selectable is an interface indicating something is selectable.
10: */
11: public interface Selectable {
12: /**
13: * Sets it as selected.
14: *
15: * @param selected
16: */
17: void setSelected(boolean selected);
18:
19: /**
20: * Gets the selected status.
21: *
22: * @return true if it is selected. Otherwise, false.
23: */
24: boolean isSelected();
25:
26: /**
27: * Inverts the selection status.
28: */
29: void invertSelected();
30:
31: /**
32: * Enabled selection change. Enabled false doesn't mean selected is false. If it is selected before,
33: * setEnable(false) won't make selected beceome false. In the other word, setEnabled won't change the
34: * the value of isSelected().
35: *
36: * @param enabled
37: */
38: void setEnabled(boolean enabled);
39:
40: /**
41: * Checks if selection change is allowed.
42: *
43: * @return true if selection change is allowed.
44: */
45: boolean isEnabled();
46: }
|