Class NetUtils
java.lang.Object
fr.esrf.tangoatk.widget.util.interlock.NetUtils
Utility class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcenterDialog(Dialog dlg, int dlgWidth, int dlgHeight) Center the given dialog according to its parent.static voidCenter the given frame on screen.static JMenuItemcreateMenuItem(String name, int key, int modifier, ActionListener a) Create a JMenuItem.static BordercreateTitleBorder(String name) Create a named title border.
-
Constructor Details
-
NetUtils
public NetUtils()
-
-
Method Details
-
createMenuItem
Create a JMenuItem.- Parameters:
name- Namekey- Accelerator key ,0 for nonemodifier- Key modifier ,0 for nonea- Action listener- Returns:
- Created JMenuItem
-
createTitleBorder
Create a named title border.- Parameters:
name- Border name- Returns:
- Border object
-
centerDialog
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
Center the given frame on screen. Call it before showing this frame.- Parameters:
fr- Frame to be centered.
-