public class UIManager
extends java.lang.Object
implements java.awt.event.ItemListener
Modifier and Type | Field and Description |
---|---|
javax.swing.JFrame |
frame |
javax.swing.JLabel[] |
labels |
Constructor and Description |
---|
UIManager(Main main,
int rows,
int columns)
Instantiates a User Interface.
|
Modifier and Type | Method and Description |
---|---|
int |
getInstruments() |
java.lang.String |
getLabel(int index) |
int |
getSections() |
void |
itemStateChanged(java.awt.event.ItemEvent arg0) |
void |
setInstruments(int value) |
void |
setLabel(java.lang.String title,
int index) |
void |
setLabels(java.lang.String[] newTitles)
Changes the labels next to the check boxes to the instrument names.
|
void |
setMain(Main newMain) |
void |
setSections(int value) |
public UIManager(Main main, int rows, int columns)
main
- an instance of main.rows
- number of rows that represents the number of instruments in the user interface.columns
- number of check boxes for each instruments.public void setMain(Main newMain)
public void setLabel(java.lang.String title, int index)
public java.lang.String getLabel(int index)
public void setLabels(java.lang.String[] newTitles)
newTitles
- array of Strings that contains the instrument names.public void setInstruments(int value)
public int getInstruments()
public void setSections(int value)
public int getSections()
public void itemStateChanged(java.awt.event.ItemEvent arg0)
itemStateChanged
in interface java.awt.event.ItemListener