java.lang.Object
com.vuze.plugins.mlab.tools.ndt.swingemu.Component
Direct Known Subclasses:
JButton, JCheckBox, JComboBox, JFrame, JLabel, JPanel, JProgressBar, JScrollPane, JSpinner, JTextArea, JTextPane, Panel

public class Componentextends Object
Base class for Swing component emulation in the NDT (Network Diagnostic Tool) plugin.

This class provides a minimal stub implementation of Swing components to allow the NDT tool to run in headless environments without requiring actual GUI components. All methods are no-ops that do nothing, providing compatibility without functionality.

This emulation layer enables the NDT network testing functionality to be integrated into I2P applications that don't have graphical user interfaces.

  • Constructor Details

    • Component

      public Component()
      Constructor. A bare instance is meaningful here: the stub methods are no-ops, so an emulated component needs no state to be substitutable wherever a real Swing component is used.
  • Method Details

    • setTitle

      public void setTitle(String s)
      Stub, discards its arguments.
      Parameters:
      s - the title a real component would be given; discarded here
    • add

      public void add(Component c)
      Stub, discards its arguments.
      Parameters:
      c - the child a real component would adopt; discarded here
    • add

      public void add(String str, Component c)
      Stub, discards its arguments.
      Parameters:
      str - the layout constraint that would place c; discarded here
      c - the child a real component would adopt; discarded here
    • add

      public void add(int i, Component c)
      Stub, discards its arguments.
      Parameters:
      i - the index the child would be inserted at; discarded here
      c - the child a real component would adopt; discarded here
    • setEnabled

      public void setEnabled(boolean b)
      Stub, discards its arguments.
      Parameters:
      b - true would allow the component to take input; discarded here
    • setVisible

      public void setVisible(boolean b)
      Stub, discards its arguments.
      Parameters:
      b - true would show the component; discarded here
    • setEditable

      public void setEditable(boolean b)
      Stub, discards its arguments.
      Parameters:
      b - true would let the user edit the component's text; discarded here
    • setResizable

      public void setResizable(boolean b)
      Stub, discards its arguments.
      Parameters:
      b - true would let the user resize the component; discarded here
    • setSize

      public void setSize(int i, int j)
      Stub, discards its arguments.
      Parameters:
      i - the width in pixels a real component would be given; discarded here
      j - the height in pixels a real component would be given; discarded here
    • setPreferredSize

      public void setPreferredSize(Dimension d)
      Stub, discards its arguments.
      Parameters:
      d - the preferred size a real component would be given; discarded here
    • setBorder

      public void setBorder(Component c)
      Stub, discards its arguments.
      Parameters:
      c - the border a real component would be given; discarded here
    • setLayout

      public void setLayout(BorderLayout l)
      Stub, discards its arguments.
      Parameters:
      l - the layout manager a real component would adopt; discarded here
    • setLayout

      public void setLayout(BoxLayout l)
      Stub, discards its arguments.
      Parameters:
      l - the layout manager a real component would adopt; discarded here
    • setCursor

      public void setCursor(Cursor c)
      Stub, discards its arguments.
      Parameters:
      c - the mouse cursor a real component would show; discarded here
    • setForeground

      public void setForeground(Color c)
      Stub, discards its arguments.
      Parameters:
      c - the foreground colour a real component would paint with; discarded here
    • pack

      public void pack()
      Stub, does nothing.
    • repaint

      public void repaint()
      Stub, does nothing.
    • getToolkit

      public Toolkit getToolkit()
      Creates a stub toolkit; this AWT emulation has no real one.
      Returns:
      new Toolkit stub
    • addMouseListener

      public void addMouseListener(MouseAdapter l)
      Stub, discards its arguments.
      Parameters:
      l - the mouse listener a real component would register; discarded here
    • addWindowListener

      public void addWindowListener(WindowAdapter l)
      Stub, discards its arguments.
      Parameters:
      l - the window listener a real component would register; discarded here