java.lang.Object
com.vuze.plugins.mlab.tools.ndt.swingemu.Component
com.vuze.plugins.mlab.tools.ndt.swingemu.JComboBox
Emulation of javax.swing.JComboBox for the NDT (Network Diagnostic Tool) plugin.
This class provides a minimal stub implementation of a dropdown combo box component to allow the NDT tool to run in headless environments. The combo box maintains selection index but provides no actual dropdown functionality.
All operations except index tracking are no-ops, maintaining API compatibility without requiring an actual graphical display system.
Field Summary
FieldsConstructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptionvoidAdd an item (no-op).intReturn the selected index.voidsetSelectedIndex(int i) Selected index.Methods inherited from class Component
add, add, add, addMouseListener, addWindowListener, getToolkit, pack, repaint, setBorder, setCursor, setEditable, setEnabled, setForeground, setLayout, setLayout, setPreferredSize, setResizable, setSize, setTitle, setVisibleModifier and TypeMethodDescriptionvoidStub, discards its arguments.voidStub, discards its arguments.voidStub, discards its arguments.voidStub, discards its arguments.voidStub, discards its arguments.Creates a stub toolkit; this AWT emulation has no real one.voidpack()Stub, does nothing.voidrepaint()Stub, does nothing.voidStub, discards its arguments.voidStub, discards its arguments.voidsetEditable(boolean b) Stub, discards its arguments.voidsetEnabled(boolean b) Stub, discards its arguments.voidStub, discards its arguments.voidStub, discards its arguments.voidStub, discards its arguments.voidStub, discards its arguments.voidsetResizable(boolean b) Stub, discards its arguments.voidsetSize(int i, int j) Stub, discards its arguments.voidStub, discards its arguments.voidsetVisible(boolean b) Stub, discards its arguments.
Field Details
index
private int indexIndex of the selected item.
Constructor Details
JComboBox
public JComboBox()Constructor. The selection index defaults to the stub's unset state and the dropdown methods are no-ops, so a bare instance is usable immediately.
Method Details
setSelectedIndex
public void setSelectedIndex(int i) Selected index.- Parameters:
i- the zero-based item index to record as the current selection
getSelectedIndex
public int getSelectedIndex()Return the selected index.- Returns:
- the index last passed to
setSelectedIndex(int), or 0 if none was
addItem
Add an item (no-op).- Parameters:
str- the item to add, ignored because items cannot be added here