Class Viewport

java.lang.Object
org.opt4j.viewer.Viewport

public class Viewport extends Object
The Viewport is a desktop for Widgets.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • init

      public void init()
      Initialization. This method has to be called once after construction.
    • addWidget

      public void addWidget(Widget widget)
      Adds a widget.
      Parameters:
      widget - the widget to be added
    • createInternalFrame

      protected JInternalFrame createInternalFrame(Widget widget)
      Creates a widget as a JInternalFrame.
      Parameters:
      widget - the widget
      Returns:
      the constructed JInternalFrame
    • addToDesktop

      public void addToDesktop(JInternalFrame inFrame)
      Parameters:
      inFrame - the JInternalFrame to be added
    • getInternalFrame

      public JInternalFrame getInternalFrame(Widget widget)
      Returns the JInternalFrame of a Widget if it exists and null otherwise.
      Parameters:
      widget - the widget
      Returns:
      the internal frame
    • get

      public JComponent get()
      Returns the component.
      Returns:
      the component