jv.object

## Class PsPanel

- java.lang.Object
- - java.awt.Component
  - - java.awt.Container
    - - java.awt.Panel
      - - jv.object.PsPanel

- All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, PsUpdateIf
  Direct Known Subclasses:
    MyClass_IP, PdArray_IP, PdColor_IP, PdVector_IP, PgAxes_CP, PgBndPolygon_IP, PgCatenoid_CP, PgDomain_CP, PgDomainDescr_IP, PgElementSet_BP, PgElementSet_TP, PgFunction_CP, PgGenusSurface_CP, PgGraph_CP, PgHelicoid_CP, PgLantern_CP, PgMaxPrinciple_CP, PgParmCurve_CP, PgParmSurface_CP, PgPointSet_IP, PgPointSet_LP, PgPointSet_MP, PgPointSet_VP, PgRuler_CP, PgSurface_CP, PgSurfaceOfRotation_CP, PgSurfacePair_IP, PgTexture_IP, PgTube_CP, PgVectorField_IP, PgWeierstrassDescr_IP, PiArray_IP, PiVector_IP, PjProject_IP, PjSlider_IP, PjWorkshop_IP, PnBandEigenSolver_IP, PnEnergyMinimizer_IP, PnJacobi_IP, PsAnimation_IP, PsAuthorInfo_IP, PsCategoryList_IP, PsGeometryInfo_IP, PsJavaView_IP, PsJvzConfig_IP, PsTabPanel, PsToolbar, PsToolbarItem, PuBoolean_IP, PuColorPicker, PuComplexFunction_IP, PuDouble_IP, PuFunction_IP, PuHistogram_IP, PuInteger_IP, PvCamera_IP, PvDisplay_IP, PvLight_IP

      public class PsPanel
      extends java.awt.Panel
      implements PsUpdateIf

  Default base class for info panels, and often used instead of `Panel`. Implements the update mechanism and simplifies setting of layouts. Each non-gui class may have associated inspectors derived from PsPanel.

  Subclasses must call the `init()` method in each constructor and each `init()` method must call `super.init()` at first.

              public class myClass extends mySuperClass
                      public myClass() {
                              ...
                              if (getClass() == myClass.class)
                                      init();
                      }
                      public void init() {
                              super.init();
                              ...
                      }

  Only this ensures that the init() method is called. Otherwise even the init() methods of the superclasses will not be called.

  The default font of this class is `PsConfig.FONT_TEXT`.

  Class contains several static methods to simplify the updating of GUI widgets. These methods first check if the GUI is already in the requested state, and invoke the GUI methods only if the widget status must be changed.

  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.awt.Component

      `java.awt.Component.BaselineResizeBehavior`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `BORDER_GROOVE`
    `static int` | `BORDER_LINE`
    `static int` | `BORDER_LINETOP`
    `static int` | `BORDER_NONE`
    `static int` | `BORDER_SUNK`
    `static java.lang.String` | `BOUNDARY` Name of default boundary panel under which panel is registered in panel list.
    `static java.lang.String` | `BOUNDARY_EXT` File name suffix of boundary panel class to name of base class.
    `static java.lang.String` | `CONFIG` Name of default control panel under which panel is registered in panel list.
    `static java.lang.String` | `CONFIG_EXT` File name suffix of control panel class to name of base class.
    `static java.lang.String` | `INFO` Name of default info panel under which panel is registered in panel list.
    `static java.lang.String` | `INFO_EXT` Identifier of class extension characterizing info panels.
    `static java.lang.String` | `LABEL` Name of default font panel under which panel is registered in panel list.
    `static java.lang.String` | `LABEL_EXT` File name suffix of font panel class to name of base class.
    `static java.lang.String` | `MATERIAL` Name of default material panel under which panel is registered in panel list.
    `static java.lang.String` | `MATERIAL_EXT` File name suffix of material panel class to name of base class.
    `static int` | `ORIENT_GUIDE` Vertical handle of toolbar.
    `static int` | `ORIENT_HORIZONTAL` Default horizontal orientation of lines.
    `static int` | `ORIENT_VERTICAL` Vertical orientation of lines.
    `static java.lang.String` | `TEXTURE` Name of default texture panel under which panel is registered in panel list.
    `static java.lang.String` | `TEXTURE_EXT` File name suffix of texture panel class to name of base class.
    `static java.lang.String` | `VECTOR` Name of default vector panel under which panel is registered in panel list.
    `static java.lang.String` | `VECTOR_EXT` File name suffix of vector panel class to name of base class.

    - ### Fields inherited from class java.awt.Component

      `BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT`

    - ### Fields inherited from interface java.awt.image.ImageObserver

      `ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PsPanel()` Constructor of panel with `PsStackLayout(1)` as default layout manager.
    `PsPanel(java.awt.LayoutManager mgr)` Constructor of panel with given layout manager.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.awt.Panel` | `addLabelComponent(java.lang.String label, java.awt.Component comp)` Add a label and a component in a horizontal panel with GridLayout(1, 2).
    `void` | `addLine(int size)` Add a horizontal line with specified thickness as separator.
    `void` | `addLine(int size, int orient)` Add a horizontal line with specified thickness as separator.
    `java.awt.Label` | `addSubTitle(java.lang.String title)` Add subtitle to panel in subheader font and return label.
    `java.awt.TextField` | `addTextField(java.lang.String label, int length)` Add a label and textField in a horizontal panel with GridLayout(1, 2).
    `java.awt.Label` | `addTitle(java.lang.String title)` Create main title to panel in header font and add to panel.
    `static void` | `drawBorder(java.awt.Component comp, java.awt.Graphics g, int borderType)` Deprecated. use static void PsPanel.drawBorder(Graphics, borderType, Rectangle);
    `void` | `drawBorder(java.awt.Graphics g, int borderType)` Draw border around this panel.
    `static void` | `drawBorder(java.awt.Graphics g, int borderType, java.awt.Rectangle rectangle)` Draw a rectangle into the given graphics context.
    `static void` | `drawBorder(java.awt.Graphics g, int borderType, java.awt.Rectangle rectangle, java.awt.Color color)` Draw a rectangle into the given graphics context with given color.
    `void` | `drawText(java.awt.Graphics g, java.awt.Point point, java.lang.String string)` Draw text at specified position.
    `PsUpdateIf` | `getFather()` Get the parent of this panel which receives update events.
    `java.awt.Insets` | `getInsets()` Overwrite `Container.getInsets()` to create a border measured in pixels around this panel.
    `java.lang.String` | `getLanguage()` Deprecated. Method is no longer used to decide about recreation of panel.
    `int` | `getPanelVersion()` Get panel version of this panel to compare with panel version of PsConfig for decision if panel needs to be recreated.
    `java.awt.Dimension` | `getPreferredSize()` Get the assigned preferred size, or whatever super provides.
    `java.awt.Label` | `getTitle()` Get the main title label, or `null` of no title exists.
    `java.awt.Label` | `getTitle(java.lang.String title)` Create a new main title label with given string and standard font.
    `java.awt.Label` | `getTitle(java.lang.String title, java.awt.Font font)` Create a new main title label with given string and font.
    `boolean` | `hasTitle()` Check whether panel has a main title label.
    `void` | `init()`
    `boolean` | `instanceOf(java.lang.String aClassName)` Deprecated. use "if (getClass() == PsObject.class)" instead
    `void` | `paint(java.awt.Graphics g)` Call `super.paint(g)` and draw border around panel.
    `void` | `removeTitle()` Remove label of panel title from this panel.
    `static boolean` | `select(java.awt.Choice widget, int index)` Update the selected index of a choice if the new index is different from the current selection of the widget.
    `void` | `setBackColor(java.awt.Color col)` Assigned explicit background color such that container is not transparent.
    `void` | `setBorderType(int borderType)` Set border of panel which is automatically drawn.
    `static boolean` | `setEnabled(java.awt.Component widget, boolean bEnable)` Assure that a component is enabled if requested.
    `void` | `setImage(java.awt.Image image)` Image to be shown in the background of the canvas and set layout to null.
    `void` | `setInsetSize(int size)` Set the global inset size.
    `void` | `setInsetSizeHorizontal(int size)` Set the vertical inset size to be used at top and bottom of this panel.
    `void` | `setInsetSizeVertical(int size)` Set the vertical inset size to be used at top and bottom of this panel.
    `static boolean` | `setLabel(java.awt.Button widget, java.lang.String text)` Set the label of a button if it is different from the current label.
    `static boolean` | `setLabel(java.awt.Checkbox widget, java.lang.String text)` Set the label of a checkbox if it is different from the current label.
    `void` | `setOutOfDate(boolean state)` Mark this panel as being not synchronized with the correct data of its parent.
    `void` | `setParent(PsUpdateIf parent)` Set parent of this panel which receives update events.
    `void` | `setPreferredSize(int width, int height)` Assigned preferred size.
    `static boolean` | `setSelectedCheckbox(java.awt.CheckboxGroup widget, java.awt.Checkbox checkbox)` In a checkbox group selected a checkbox if it is different from the current selection of the widget.
    `static boolean` | `setState(java.awt.Checkbox widget, boolean bState)` Assure that a checkbox has same state than corresponding boolean flag.
    `static boolean` | `setText(java.awt.Label widget, java.lang.String text)` Update the content of a label if the new content is different from the current content of the widget.
    `static boolean` | `setText(java.awt.TextComponent widget, java.lang.String text)` Update the content of a text field if the new content is different from the current content of the widget.
    `void` | `setTitle(java.lang.String title)` Set string of main title of panel but do not add title to panel.
    `void` | `setVisible(boolean flag)` Override `Component.setVisible(boolean)` to give panel a chance to update its content when is becomes visible.
    `void` | `update(java.awt.Graphics g)` Override `Component.update(Graphics)` to avoid clearing the component if an image is available.
    `boolean` | `update(java.lang.Object event)` Update the class whenever a child has changed.

    - ### Methods inherited from class java.awt.Panel

      `addNotify, getAccessibleContext`

    - ### Methods inherited from class java.awt.Container

      `add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, isValidateRoot, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, validate`

    - ### Methods inherited from class java.awt.Component

      `action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface jv.object.PsUpdateIf

      `getName`

- - ### Field Detail

    - #### BOUNDARY_EXT

          public static final java.lang.String BOUNDARY_EXT

      File name suffix of boundary panel class to name of base class.
      See Also:
        Constant Field Values

    - #### BOUNDARY

          public static final java.lang.String BOUNDARY

      Name of default boundary panel under which panel is registered in panel list.
      See Also:
        Constant Field Values

    - #### CONFIG_EXT

          public static final java.lang.String CONFIG_EXT

      File name suffix of control panel class to name of base class.
      See Also:
        Constant Field Values

    - #### CONFIG

          public static final java.lang.String CONFIG

      Name of default control panel under which panel is registered in panel list.
      See Also:
        Constant Field Values

    - #### INFO_EXT

          public static final java.lang.String INFO_EXT

      Identifier of class extension characterizing info panels.
      See Also:
        Constant Field Values

    - #### INFO

          public static final java.lang.String INFO

      Name of default info panel under which panel is registered in panel list.
      See Also:
        Constant Field Values

    - #### LABEL_EXT

          public static final java.lang.String LABEL_EXT

      File name suffix of font panel class to name of base class.
      See Also:
        Constant Field Values

    - #### LABEL

          public static final java.lang.String LABEL

      Name of default font panel under which panel is registered in panel list.
      See Also:
        Constant Field Values

    - #### MATERIAL_EXT

          public static final java.lang.String MATERIAL_EXT

      File name suffix of material panel class to name of base class.
      See Also:
        Constant Field Values

    - #### MATERIAL

          public static final java.lang.String MATERIAL

      Name of default material panel under which panel is registered in panel list.
      See Also:
        Constant Field Values

    - #### TEXTURE_EXT

          public static final java.lang.String TEXTURE_EXT

      File name suffix of texture panel class to name of base class.
      See Also:
        Constant Field Values

    - #### TEXTURE

          public static final java.lang.String TEXTURE

      Name of default texture panel under which panel is registered in panel list.
      See Also:
        Constant Field Values

    - #### VECTOR_EXT

          public static final java.lang.String VECTOR_EXT

      File name suffix of vector panel class to name of base class.
      See Also:
        Constant Field Values

    - #### VECTOR

          public static final java.lang.String VECTOR

      Name of default vector panel under which panel is registered in panel list.
      See Also:
        Constant Field Values

    - #### BORDER_NONE

          public static final int BORDER_NONE

      See Also:
        Constant Field Values

    - #### BORDER_LINE

          public static final int BORDER_LINE

      See Also:
        Constant Field Values

    - #### BORDER_SUNK

          public static final int BORDER_SUNK

      See Also:
        Constant Field Values

    - #### BORDER_GROOVE

          public static final int BORDER_GROOVE

      See Also:
        Constant Field Values

    - #### BORDER_LINETOP

          public static final int BORDER_LINETOP

      See Also:
        Constant Field Values

    - #### ORIENT_HORIZONTAL

          public static final int ORIENT_HORIZONTAL

      Default horizontal orientation of lines.
      See Also:
        Constant Field Values

    - #### ORIENT_VERTICAL

          public static final int ORIENT_VERTICAL

      Vertical orientation of lines.
      See Also:
        Constant Field Values

    - #### ORIENT_GUIDE

          public static final int ORIENT_GUIDE

      Vertical handle of toolbar.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### PsPanel

          public PsPanel()

      Constructor of panel with `PsStackLayout(1)` as default layout manager.

    - #### PsPanel

          public PsPanel(java.awt.LayoutManager mgr)

      Constructor of panel with given layout manager. Provides better similarity with java.awt.Panel.
      Since:
        JavaView 2.90.000

  - ### Method Detail

    - #### init

          public void init()

    - #### getPreferredSize

          public java.awt.Dimension getPreferredSize()

      Get the assigned preferred size, or whatever super provides.
      Overrides:
        `getPreferredSize` in class `java.awt.Container`
      Since:
        JavaView 3.13.001

    - #### setPreferredSize

          public void setPreferredSize(int width,
                              int height)

      Assigned preferred size.
      Since:
        JavaView 3.13.001

    - #### setBackColor

          public void setBackColor(java.awt.Color col)

      Assigned explicit background color such that container is not transparent.
      Since:
        JavaView 3.13.001

    - #### getPanelVersion

          public int getPanelVersion()

      Get panel version of this panel to compare with panel version of PsConfig for decision if panel needs to be recreated. Used, for example, when language of fonts have changed.
      Since:
        JavaView 4.00.008

    - #### getLanguage

          public java.lang.String getLanguage()

      Deprecated. Method is no longer used to decide about recreation of panel.
      Get language used in this panel.
      See Also:
        `getPanelVersion()`

    - #### setImage

          public void setImage(java.awt.Image image)

      Image to be shown in the background of the canvas and set layout to null. Currently, this should only be used if no components are added to panel.

      Functionality might be moved into separate class in some future version.

    - #### setVisible

          public void setVisible(boolean flag)

      Override `Component.setVisible(boolean)` to give panel a chance to update its content when is becomes visible. Parent of panel usually does not update panel if panel is hidden. TODO: should update only if panel is marked OUTOFDATE.
      Overrides:
        `setVisible` in class `java.awt.Component`

    - #### getFather

          public PsUpdateIf getFather()

      Get the parent of this panel which receives update events. The method `setParent` allows to set this parent.
      Specified by:
        `getFather` in interface `PsUpdateIf`
      Returns:
        parent parent of this panel
      See Also:
        `getFather()`

    - #### setParent

          public void setParent(PsUpdateIf parent)

      Set parent of this panel which receives update events.

      The method `getFather` allows to retrieve this parent.

      Specified by:
        `setParent` in interface `PsUpdateIf`
      Parameters:
        `parent` - parent of this panel
      See Also:
        `getFather()`

    - #### update

          public boolean update(java.lang.Object event)

      Update the class whenever a child has changed. Method is usually invoked from the children.
      Specified by:
        `update` in interface `PsUpdateIf`
      Parameters:
        `event` - carries a lot of information
      Returns:
        true if event has been handled, otherwise false
      See Also:
        `PsObject`, `PsUpdateIf.getFather()`, `PsUpdateIf.setParent(PsUpdateIf)`

    - #### instanceOf

          public final boolean instanceOf(java.lang.String aClassName)

      Deprecated. use "if (getClass() == PsObject.class)" instead
      Return true if string is exact classname of current instance. Even if string denotes a super class method returns `false`. This method is different from Java operator `instanceof` which is true even if current instance is subclass of class 'aClassName'.
      Parameters:
        `aClassName` - name of class without package identifiers
      Returns:
        true if current object is exact instance of class

    - #### getInsets

          public java.awt.Insets getInsets()

      Overwrite `Container.getInsets()` to create a border measured in pixels around this panel. The border is either uniformly determined by setInsetSize(int) or by, additionally, specifying a vertical inset size using setInsetSizeVertical(int).
      Overrides:
        `getInsets` in class `java.awt.Container`
      See Also:
        `setInsetSize(int)`, `setInsetSizeVertical(int)`, `setBorderType(int)`

    - #### setInsetSize

          public void setInsetSize(int size)

      Set the global inset size. This call resets a previous vertical inset size to the new global inset size.

    - #### setInsetSizeHorizontal

          public void setInsetSizeHorizontal(int size)

      Set the vertical inset size to be used at top and bottom of this panel. Setting the global inset size with setInsetSize(int) at a later stage will overwrite this setting.
      Since:
        JavaView 3.09.002

    - #### setInsetSizeVertical

          public void setInsetSizeVertical(int size)

      Set the vertical inset size to be used at top and bottom of this panel. Setting the global inset size with setInsetSize(int) at a later stage will overwrite this setting.
      Since:
        JavaView 3.09.002

    - #### getTitle

          public java.awt.Label getTitle()

      Get the main title label, or `null` of no title exists.

    - #### getTitle

          public java.awt.Label getTitle(java.lang.String title)

      Create a new main title label with given string and standard font.
      Since:
        JavaView 3.96.022

    - #### getTitle

          public java.awt.Label getTitle(java.lang.String title,
                                java.awt.Font font)

      Create a new main title label with given string and font. Font identifier is obtained, for example, from font IDs `PsConfig.FONT_HEADER2` via PsConfig.getFont(fontID).
      Since:
        JavaView 3.96.022

    - #### hasTitle

          public boolean hasTitle()

      Check whether panel has a main title label.

    - #### removeTitle

          public void removeTitle()

      Remove label of panel title from this panel.

    - #### setTitle

          public void setTitle(java.lang.String title)

      Set string of main title of panel but do not add title to panel. For compatibility, the method creates a new title with default font, if not available.

    - #### addTitle

          public java.awt.Label addTitle(java.lang.String title)

      Create main title to panel in header font and add to panel.

    - #### addSubTitle

          public java.awt.Label addSubTitle(java.lang.String title)

      Add subtitle to panel in subheader font and return label. Each invocation of this method will create and add a new subtitle.

    - #### addLine

          public void addLine(int size)

      Add a horizontal line with specified thickness as separator.
      Parameters:
        `size` - thickness of line

    - #### addLine

          public void addLine(int size,
                     int orient)

      Add a horizontal line with specified thickness as separator.
      Parameters:
        `size` - thickness of line

    - #### addTextField

          public java.awt.TextField addTextField(java.lang.String label,
                                        int length)

      Add a label and textField in a horizontal panel with GridLayout(1, 2). This is a convenient method to reduce the code in inspectors.
      Parameters:
        `label` - label shown to the left of the text field
        `length` - length of the text field
      Returns:
        TextField component

    - #### setText

          public static boolean setText(java.awt.TextComponent widget,
                        java.lang.String text)

      Update the content of a text field if the new content is different from the current content of the widget. This method is a shortcut and intended to be used in nearly all panels.

      See additional comments in PsPanel#setEnabled(Component, boolean).

      Parameters:
        `widget` - the gui element which shall be updated
        `text` - the new text of the text field
      Returns:
        `true` if the value has been update in this method.
      Since:
        JavaView 2.30

    - #### setText

          public static boolean setText(java.awt.Label widget,
                        java.lang.String text)

      Update the content of a label if the new content is different from the current content of the widget. This method is a shortcut and intended to be used in nearly all panels.

      See additional comments in PsPanel#setEnabled(Component, boolean).

      Parameters:
        `widget` - the gui element which shall be updated
        `text` - the new text of the label
      Returns:
        `true` if the value has been update in this method.
      Since:
        JavaView 2.30

    - #### select

          public static boolean select(java.awt.Choice widget,
                       int index)

      Update the selected index of a choice if the new index is different from the current selection of the widget. This method is a shortcut and intended to be used in nearly all panels.

      See additional comments in PsPanel#setEnabled(Component, boolean).

      Parameters:
        `widget` - the gui element which shall be updated
        `index` - the new selected index of the choice
      Returns:
        `true` if the value has been update in this method.
      Since:
        JavaView 2.30

    - #### setSelectedCheckbox

          public static boolean setSelectedCheckbox(java.awt.CheckboxGroup widget,
                                    java.awt.Checkbox checkbox)

      In a checkbox group selected a checkbox if it is different from the current selection of the widget. This method is a shortcut and intended to be used in nearly all panels.

      See additional comments in PsPanel#setEnabled(Component, boolean).

      Parameters:
        `widget` - the gui element which shall be updated
        `checkbox` - the new selected checkbox
      Returns:
        `true` if the value has been update in this method.
      Since:
        JavaView 2.30

    - #### setState

          public static boolean setState(java.awt.Checkbox widget,
                         boolean bState)

      Assure that a checkbox has same state than corresponding boolean flag. If state of checkbox is equal to the requested new state then do nothing.

      See additional comments in PsPanel#setEnabled(Component, boolean).

      Parameters:
        `widget` - Checkbox
        `bState` - Requested new state of the checkbox
      Returns:
        `true` if the value has been update in this method.
      Since:
        JavaView 2.30

    - #### setLabel

          public static boolean setLabel(java.awt.Button widget,
                         java.lang.String text)

      Set the label of a button if it is different from the current label. If label of button is equal to the requested new label then do nothing.

      See additional comments in PsPanel#setEnabled(Component, boolean).

      Parameters:
        `widget` - Button
        `text` - new label of the widget
      Returns:
        `true` if the value has been update in this method.
      Since:
        JavaView 2.30

    - #### setLabel

          public static boolean setLabel(java.awt.Checkbox widget,
                         java.lang.String text)

      Set the label of a checkbox if it is different from the current label. If label of checkbox is equal to the requested new label then do nothing.

      See additional comments in PsPanel#setEnabled(Component, boolean).

      Parameters:
        `widget` - Checkbox
        `text` - new label of the widget
      Returns:
        `true` if the value has been update in this method.
      Since:
        JavaView 2.30

    - #### setEnabled

          public static boolean setEnabled(java.awt.Component widget,
                           boolean bEnable)

      Assure that a component is enabled if requested. If state of component is equal to the requested new state then do nothing.

      Note: never call one of the static helper methods from an overwritten method with the same name. For example, if MyLabel extends Label and MyLabel#setEnabled(boolean) exists. Then an invocation of PsPanel.setEnabled(this, boolean) in MyLabel#setEnabled would lead to loop since PsPanel.setEnabled calls MyLabel#setEnabled.

      Parameters:
        `widget` - Component
        `bEnable` - Requested new state of the component
      Returns:
        `true` if the value has been update in this method.
      Since:
        JavaView 2.30

    - #### addLabelComponent

          public java.awt.Panel addLabelComponent(java.lang.String label,
                                         java.awt.Component comp)

      Add a label and a component in a horizontal panel with GridLayout(1, 2). This is a convenient method to reduce the code in inspectors.
      Parameters:
        `label` - text shown to the left of the component
        `comp` - component shown to the right of the label
      Returns:
        panel showing label and component

    - #### drawText

          public void drawText(java.awt.Graphics g,
                      java.awt.Point point,
                      java.lang.String string)

      Draw text at specified position.

    - #### drawBorder

          public static void drawBorder(java.awt.Graphics g,
                        int borderType,
                        java.awt.Rectangle rectangle)

      Draw a rectangle into the given graphics context.
      See Also:
        `drawBorder(Graphics, int, Rectangle, Color)`

    - #### drawBorder

          public static void drawBorder(java.awt.Graphics g,
                        int borderType,
                        java.awt.Rectangle rectangle,
                        java.awt.Color color)

      Draw a rectangle into the given graphics context with given color.
      Since:
        JavaView 2.47
      See Also:
        `drawBorder(Graphics, int, Rectangle)`

    - #### drawBorder

          public void drawBorder(java.awt.Graphics g,
                        int borderType)

      Draw border around this panel.

    - #### drawBorder

          public static void drawBorder(java.awt.Component comp,
                        java.awt.Graphics g,
                        int borderType)

      Deprecated. use static void PsPanel.drawBorder(Graphics, borderType, Rectangle);
      Draw border around panel. Method calls PsPanel.drawBorder(g, borderType, new Rectangle(comp.getSize()));

    - #### setBorderType

          public void setBorderType(int borderType)

      Set border of panel which is automatically drawn. If `borderType==PsPanel.BORDER_NONE` drawing is disabled, otherwise the borderType is set and drawing is enabled.
      Parameters:
        `borderType` - type of border, for possible values see PsPanel.
      See Also:
        `paint(Graphics)`

    - #### setOutOfDate

          public void setOutOfDate(boolean state)

      Mark this panel as being not synchronized with the correct data of its parent. Usually, this method is invoked whenever a parent changes but this panel is temporarily not visible. In this case the next invocation of this paint(Graphics) method will at first update this panel with new data from its parent by calling this.update(m_parent).

    - #### paint

          public void paint(java.awt.Graphics g)

      Call `super.paint(g)` and draw border around panel. If this panel is out of date, then this panel is first synchronized with new data from its parent by calling this.update(m_parent).

      If this panel has an image then the image is drawn before super.paint(Graphics) is called.

      Overrides:
        `paint` in class `java.awt.Container`
      See Also:
        `setBorderType(int)`

    - #### update

          public void update(java.awt.Graphics g)

      Override `Component.update(Graphics)` to avoid clearing the component if an image is available.
      Overrides:
        `update` in class `java.awt.Container`

"

The software JavaView? is copyright protected. All Rights Reserved.
"