|
||||||||||
| 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<java.util.Vector<T>,javax.swing.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 javax.swing.JButton |
_addButton
|
protected javax.swing.JPanel |
_buttonPanel
|
protected javax.swing.JTable |
_buttonTable
|
protected javax.swing.table.AbstractTableModel |
_buttonTableModel
|
protected java.lang.String[] |
_columnNames
|
protected java.util.Vector<T> |
_data
|
protected java.lang.String |
_description
|
protected int |
_maxRows
|
protected int |
_minRows
|
protected boolean |
_moveButtonEnabled
|
protected javax.swing.JButton |
_moveDownButton
|
protected javax.swing.JButton |
_moveUpButton
|
protected javax.swing.JPanel |
_panel
|
protected javax.swing.JButton |
_removeButton
|
protected javax.swing.JTable |
_table
|
protected javax.swing.table.AbstractTableModel |
_tableModel
|
protected javax.swing.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,
java.lang.String text,
SwingFrame parent)
Builds a new VectorOptionComponent with hidden column name. |
|
VectorOptionComponent(VectorOption<T> opt,
java.lang.String text,
SwingFrame parent,
java.lang.String[] colNames)
Builds a new VectorOptionComponent. |
|
VectorOptionComponent(VectorOption<T> opt,
java.lang.String text,
SwingFrame parent,
java.lang.String[] colNames,
java.lang.String description)
Constructor that allows for a tooltip description. |
|
VectorOptionComponent(VectorOption<T> opt,
java.lang.String text,
SwingFrame parent,
java.lang.String[] colNames,
java.lang.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 javax.swing.Action |
_getAddAction()
Gets an action that adds a component to the set of options. |
protected javax.swing.table.AbstractTableModel |
_makeDecoratedTableModel(javax.swing.table.AbstractTableModel other)
Returns the decorated table model. |
protected javax.swing.table.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 java.util.List<javax.swing.JButton> |
getButtons()
Return the buttons that should be added to the table underneath. |
protected int |
getTableHeight()
Return the required height of the table. |
java.util.Vector<T> |
getValue()
Accessor to the current contents of the table. |
void |
resizeTable()
Resizes the display table |
void |
setDescription(java.lang.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(java.util.ArrayList<T> value)
Displays the given value. |
void |
setValue(java.util.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 javax.swing.JScrollPane _tableScrollPane
protected javax.swing.JPanel _panel
protected javax.swing.JTable _table
protected javax.swing.JPanel _buttonPanel
protected javax.swing.JButton _moveUpButton
protected javax.swing.JButton _moveDownButton
protected boolean _moveButtonEnabled
protected javax.swing.table.AbstractTableModel _tableModel
protected javax.swing.JButton _addButton
protected javax.swing.JButton _removeButton
protected javax.swing.JTable _buttonTable
protected javax.swing.table.AbstractTableModel _buttonTableModel
protected java.util.Vector<T> _data
protected java.lang.String[] _columnNames
protected java.lang.String _description
protected int _minRows
protected int _maxRows
| Constructor Detail |
|---|
public VectorOptionComponent(VectorOption<T> opt,
java.lang.String text,
SwingFrame parent)
opt - the optiontext - the label to displayparent - the parent frame
public VectorOptionComponent(VectorOption<T> opt,
java.lang.String text,
SwingFrame parent,
java.lang.String[] colNames)
opt - the optiontext - the label to displayparent - the parent framecolNames - column names or empty array to hide
public VectorOptionComponent(VectorOption<T> opt,
java.lang.String text,
SwingFrame parent,
java.lang.String[] colNames,
java.lang.String description)
public VectorOptionComponent(VectorOption<T> opt,
java.lang.String text,
SwingFrame parent,
java.lang.String[] colNames,
java.lang.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 javax.swing.table.AbstractTableModel _makeDecoratedTableModel(javax.swing.table.AbstractTableModel other)
protected javax.swing.table.AbstractTableModel _makeTableModel()
protected void _removeAction()
protected void _moveUpAction()
protected void _moveDownAction()
protected void _addValue(T value)
protected void _removeIndex(int i)
protected java.util.List<javax.swing.JButton> getButtons()
protected void updateButtons()
public void setDescription(java.lang.String description)
setDescription in class OptionComponent<java.util.Vector<T>,javax.swing.JComponent>description - the tooltip textpublic boolean updateConfig()
updateConfig in class OptionComponent<java.util.Vector<T>,javax.swing.JComponent>public java.util.Vector<T> getValue()
public void setValue(java.util.Vector<T> value)
setValue in class OptionComponent<java.util.Vector<T>,javax.swing.JComponent>public void setValue(java.util.ArrayList<T> value)
public void setRows(int minRows,
int maxRows)
protected int getTableHeight()
public void resizeTable()
protected abstract javax.swing.Action _getAddAction()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||