java.lang.Object
com.vuze.plugins.mlab.tools.ndt.swingemu.Component
com.vuze.plugins.mlab.tools.ndt.swingemu.JTextPane
- Direct Known Subclasses:
ResultsTextPane
Emulation of javax.swing.JTextPane for the NDT (Network Diagnostic Tool) plugin.
This class provides a minimal stub implementation of a styled text component to allow the NDT tool to run in headless environments. The text pane supports document operations but provides no actual text rendering or styling functionality.
It contains a StyledDocument that can capture text content, but all visual operations are no-ops, maintaining API compatibility without requiring an actual graphical display system.
Field Summary
FieldsConstructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptionReturn the styled document.voidinsertComponent(Component comp) Insert a component (no-op).voidsetSelectionEnd(int i) The selection end (no-op).voidsetSelectionStart(int i) The selection start (no-op).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
sd
Style document backing the pane's text.
Constructor Details
JTextPane
public JTextPane()Constructor. The pane starts with an empty styled document, which is the only thing the headless stub actually keeps.
Method Details
insertComponent
Insert a component (no-op).- Parameters:
comp- the component that would be inserted, discarded in this headless build
getStyledDocument
Return the styled document.- Returns:
- the single document made at construction, never null
setSelectionStart
public void setSelectionStart(int i) The selection start (no-op).- Parameters:
i- the character offset that would start the selection, ignored here
setSelectionEnd
public void setSelectionEnd(int i) The selection end (no-op).- Parameters:
i- the character offset that would end the selection, ignored here