This class provides a dialog for format selection. The user is
presented a choice of types and based on the type selected, a list
of format
choices for the type. Selection of width and decimal specifications (if
applicable to that choice) is allowed.
Typical use is shown:
FormatSelector formatSelector = new FormatSelector(component, formatAdapter, Types.DOUBLE, incomingFormat);
formatSelector.setVisible(true);
if (!formatSelector.wasCancelled()) {
String format = formatSelector.getFormatString();
// use the format returned ...
}
source - the component from which this selector is spawned
formatAdapterInterface - the FormatAdapterInterface object to be used by this
visual to seed the dialog
sqlType - the SQL type for which format choices are to be displayed. The only
type supported is DOUBLE.
incomingformat - the format choice which appears selected when the dialog is
first displayed. Typically specified if there is a format associated with
the object for which this selector is being displayed. If null, no choice
is selected.
Method Detail
onApply
public void onApply()
This method is to be called when the OK button is clicked. It invokes the
corresponding method in the panel and then caches the
selected format from the panel. In typical use (see class description),
this method is not invoked by the client and invoked by the framework.
Returns the SAS format string representation of the format choice selected by the user.
For typical use see class description. The value returned will be undefined
if the user Cancels out of the dialog.