29 |
|
|
30 |
|
|
31 |
/** |
/** |
32 |
* |
* This class defines the skeleton of a pane containg sampler channels. |
33 |
* @author Grigor Iliev |
* @author Grigor Iliev |
34 |
*/ |
*/ |
35 |
public abstract class JSChannelsPane extends JPanel { |
public abstract class JSChannelsPane extends JPanel { |
36 |
|
/** The key used for reporting title's property change. */ |
37 |
public final static String TITLE = "ChannelsPaneTitle"; |
public final static String TITLE = "ChannelsPaneTitle"; |
38 |
|
|
39 |
private String title; |
private String title; |
40 |
|
|
41 |
/** Creates a new instance of ChannelsPane */ |
/** Creates a new instance of <code>JSChannelsPane</code>. */ |
42 |
public |
public |
43 |
JSChannelsPane(String title) { this.title = title; } |
JSChannelsPane(String title) { this.title = title; } |
44 |
|
|
45 |
|
/** |
46 |
|
* Returns the title of this <code>JSChannelsPane</code>. |
47 |
|
* @return The title of this <code>JSChannelsPane</code>. |
48 |
|
*/ |
49 |
public String |
public String |
50 |
getTitle() { return title; } |
getTitle() { return title; } |
51 |
|
|
52 |
|
/** |
53 |
|
* Sets the title of this <code>JSChannelsPane</code>. |
54 |
|
* @param title The new title of this <code>JSChannelsPane</code>. |
55 |
|
*/ |
56 |
public void |
public void |
57 |
setTitle(String title) { |
setTitle(String title) { |
58 |
if(this.title.equals(title)) return; |
if(this.title.equals(title)) return; |
62 |
firePropertyChange(TITLE, oldTitle, title); |
firePropertyChange(TITLE, oldTitle, title); |
63 |
} |
} |
64 |
|
|
65 |
|
/** |
66 |
|
* Returns the title of this <code>JSChannelsPane</code>. |
67 |
|
* @return The title of this <code>JSChannelsPane</code>. |
68 |
|
*/ |
69 |
public String |
public String |
70 |
toString() { return getTitle(); } |
toString() { return getTitle(); } |
71 |
|
|
149 |
*/ |
*/ |
150 |
public abstract int removeSelectedChannels(); |
public abstract int removeSelectedChannels(); |
151 |
|
|
152 |
|
/** |
153 |
|
* Registers the specified listener for receiving list selection events. |
154 |
|
* @param listener The <code>ListSelectionListener</code> to register. |
155 |
|
*/ |
156 |
public abstract void addListSelectionListener(ListSelectionListener listener); |
public abstract void addListSelectionListener(ListSelectionListener listener); |
157 |
|
|
158 |
|
/** |
159 |
|
* Removes the specified listener. |
160 |
|
* @param listener The <code>ListSelectionListener</code> to remove. |
161 |
|
*/ |
162 |
public abstract void removeListSelectionListener(ListSelectionListener listener); |
public abstract void removeListSelectionListener(ListSelectionListener listener); |
163 |
} |
} |