Package org.jlab.io.ui
Class DialogUtilities
java.lang.Object
org.jlab.io.ui.DialogUtilities
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intDialog "Reason" constantstatic final intDialog "Reason" constantstatic final intDialog "Reason" constantstatic final intDialog "Reason" constantstatic final intDialog "Reason" constantprotected StringCurrent answer stringstatic final intDialog "Reason" constant
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidcenterDialog(Component component) Center a dialogstatic JPanelpaddedPanel(int hpad, int vpad, Component component) Create a nice padded panel.Convenience routine for padding a string using the default font.static intyesNoDialog(String prompt, String... options) Create a dialog with a prompt and a set of options
- 
Field Details- 
OK_RESPONSEpublic static final int OK_RESPONSEDialog "Reason" constant- See Also:
 
- 
CANCEL_RESPONSEpublic static final int CANCEL_RESPONSEDialog "Reason" constant- See Also:
 
- 
outputdataCurrent answer string
- 
APPLY_RESPONSEpublic static final int APPLY_RESPONSEDialog "Reason" constant- See Also:
 
- 
DONE_RESPONSEpublic static final int DONE_RESPONSEDialog "Reason" constant- See Also:
 
- 
YES_RESPONSEpublic static final int YES_RESPONSEDialog "Reason" constant- See Also:
 
- 
NO_RESPONSEpublic static final int NO_RESPONSEDialog "Reason" constant- See Also:
 
 
- 
- 
Constructor Details- 
DialogUtilitiespublic DialogUtilities()
 
- 
- 
Method Details- 
centerDialogCenter a dialog- Parameters:
- component- the component to center
 
- 
padStringConvenience routine for padding a string using the default font.- Parameters:
- inp- The string to be padded.
- tstr- The test string-- try to return a string the same length
 
- 
paddedPanelCreate a nice padded panel.- Parameters:
- hpad- the pixel pad on the left and right
- vpad- the pixel pad on the top and bottom
- component- the main component placed in the center.
- Returns:
- the padded panel
 
- 
yesNoDialogCreate a dialog with a prompt and a set of options- Parameters:
- prompt-
- options-
- Returns:
- a result indicating yes or no.
 
 
-