|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.drjava.ui.config.OptionComponent<Vector<T>,JComponent>
edu.rice.cs.drjava.ui.config.VectorOptionComponent<T>
public abstract class VectorOptionComponent<T>
Graphical form of a VectorOption for the Extra Classpath option. Uses a file chooser for each String element.
| Nested Class Summary | |
|---|---|
protected static class |
VectorOptionComponent.ButtonEditor
Editor for buttons. |
protected static class |
VectorOptionComponent.ComponentCellRenderer
Renderer for GUI components. |
class |
VectorOptionComponent.DragDropRowTableUI
Drag and drop UI for tables. |
| Nested classes/interfaces inherited from class edu.rice.cs.drjava.ui.config.OptionComponent |
|---|
OptionComponent.ChangeListener |
| Field Summary | |
|---|---|
protected JButton |
_addButton
|
protected JPanel |
_buttonPanel
|
protected JTable |
_buttonTable
|
protected AbstractTableModel |
_buttonTableModel
|
protected String[] |
_columnNames
|
protected Vector<T> |
_data
|
protected String |
_description
|
protected int |
_maxRows
|
protected int |
_minRows
|
protected boolean |
_moveButtonEnabled
|
protected JButton |
_moveDownButton
|
protected JButton |
_moveUpButton
|
protected JPanel |
_panel
|
protected JButton |
_removeButton
|
protected JTable |
_table
|
protected AbstractTableModel |
_tableModel
|
protected JScrollPane |
_tableScrollPane
|
| Fields inherited from class edu.rice.cs.drjava.ui.config.OptionComponent |
|---|
_entireColumn, _guiComponent, _label, _labelText, _option, _parent |
| Constructor Summary | |
|---|---|
VectorOptionComponent(VectorOption<T> opt,
String text,
SwingFrame parent)
Builds a new VectorOptionComponent with hidden column name. |
|
VectorOptionComponent(VectorOption<T> opt,
String text,
SwingFrame parent,
String[] colNames)
Builds a new VectorOptionComponent. |
|
VectorOptionComponent(VectorOption<T> opt,
String text,
SwingFrame parent,
String[] colNames,
String description)
Constructor that allows for a tooltip description. |
|
VectorOptionComponent(VectorOption<T> opt,
String text,
SwingFrame parent,
String[] colNames,
String description,
boolean moveButtonEnabled)
Builds a new VectorOptionComponent. |
|
| Method Summary | |
|---|---|
protected void |
_addValue(T value)
Add the value to the table, update and resize it. |
protected abstract Action |
_getAddAction()
Gets an action that adds a component to the set of options. |
protected AbstractTableModel |
_makeDecoratedTableModel(AbstractTableModel other)
Returns the decorated table model. |
protected AbstractTableModel |
_makeTableModel()
Returns the table model. |
protected void |
_moveDownAction()
Move selected rows down by one row. |
protected void |
_moveUpAction()
Move selected rows up by one row. |
protected void |
_removeAction()
Remove selected rows. |
protected void |
_removeIndex(int i)
Remove the value at index i, update the table and resize it. |
protected List<JButton> |
getButtons()
Return the buttons that should be added to the table underneath. |
protected int |
getTableHeight()
Return the required height of the table. |
Vector<T> |
getValue()
Accessor to the current contents of the table. |
void |
resizeTable()
Resizes the display table |
void |
setDescription(String description)
Sets the tooltip description text for this option. |
void |
setRows(int minRows,
int maxRows)
Set the minimum and maximum number of rows to display before using a scrollbar, or 0 for arbitrarily many. |
void |
setValue(ArrayList<T> value)
Displays the given value. |
void |
setValue(Vector<T> value)
Displays the given value. |
protected void |
updateButtons()
Enable and disable buttons. |
boolean |
updateConfig()
Updates the config object with the new setting. |
| Methods inherited from class edu.rice.cs.drjava.ui.config.OptionComponent |
|---|
addChangeListener, getComponent, getEntireColumn, getLabel, getLabelText, getOption, notifyChangeListeners, removeChangeListener, resetToCurrent, resetToDefault, setComponent, setEntireColumn, showErrorMessage, showErrorMessage, useEntireColumn |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected JScrollPane _tableScrollPane
protected JPanel _panel
protected JTable _table
protected JPanel _buttonPanel
protected JButton _moveUpButton
protected JButton _moveDownButton
protected boolean _moveButtonEnabled
protected AbstractTableModel _tableModel
protected JButton _addButton
protected JButton _removeButton
protected JTable _buttonTable
protected AbstractTableModel _buttonTableModel
protected Vector<T> _data
protected String[] _columnNames
protected String _description
protected int _minRows
protected int _maxRows
| Constructor Detail |
|---|
public VectorOptionComponent(VectorOption<T> opt,
String text,
SwingFrame parent)
opt - the optiontext - the label to displayparent - the parent frame
public VectorOptionComponent(VectorOption<T> opt,
String text,
SwingFrame parent,
String[] colNames)
opt - the optiontext - the label to displayparent - the parent framecolNames - column names or empty array to hide
public VectorOptionComponent(VectorOption<T> opt,
String text,
SwingFrame parent,
String[] colNames,
String description)
public VectorOptionComponent(VectorOption<T> opt,
String text,
SwingFrame parent,
String[] colNames,
String description,
boolean moveButtonEnabled)
opt - the optiontext - the label to displayparent - the parent framecolNames - column names or empty array to hidemoveButtonEnabled - true if the move buttons should be enabled| Method Detail |
|---|
protected AbstractTableModel _makeDecoratedTableModel(AbstractTableModel other)
protected AbstractTableModel _makeTableModel()
protected void _removeAction()
protected void _moveUpAction()
protected void _moveDownAction()
protected void _addValue(T value)
protected void _removeIndex(int i)
protected List<JButton> getButtons()
protected void updateButtons()
public void setDescription(String description)
setDescription in class OptionComponent<Vector<T>,JComponent>description - the tooltip textpublic boolean updateConfig()
updateConfig in class OptionComponent<Vector<T>,JComponent>public Vector<T> getValue()
public void setValue(Vector<T> value)
setValue in class OptionComponent<Vector<T>,JComponent>public void setValue(ArrayList<T> value)
public void setRows(int minRows,
int maxRows)
protected int getTableHeight()
public void resizeTable()
protected abstract Action _getAddAction()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||