Class NetUtils

java.lang.Object
fr.esrf.tangoatk.widget.util.interlock.NetUtils

public class NetUtils extends Object
Utility class.
  • Constructor Details

    • NetUtils

      public NetUtils()
  • Method Details

    • createMenuItem

      public static JMenuItem createMenuItem(String name, int key, int modifier, ActionListener a)
      Create a JMenuItem.
      Parameters:
      name - Name
      key - Accelerator key ,0 for none
      modifier - Key modifier ,0 for none
      a - Action listener
      Returns:
      Created JMenuItem
    • createTitleBorder

      public static Border createTitleBorder(String name)
      Create a named title border.
      Parameters:
      name - Border name
      Returns:
      Border object
    • centerDialog

      public static void centerDialog(Dialog dlg, int dlgWidth, int dlgHeight)
      Center the given dialog according to its parent. If the dialog is not parented (null parent), It will appear at the center of the screen. The dialog is not displayed.

      Note: This function has been designed to work with 'heavyWeight' system dependant awt window which doesn't use a layout manager (null layout).

      Parameters:
      dlg - the dialog.
      dlgWidth - desired width of the JDialog content pane.
      dlgHeight - desired height of the JDialog content pane.
    • centerFrameOnScreen

      public static void centerFrameOnScreen(Frame fr)
      Center the given frame on screen. Call it before showing this frame.
      Parameters:
      fr - Frame to be centered.