com.sas.visuals
Class OkCancelHelpDialog

com.sas.visuals.OkCancelHelpDialog
All Implemented Interfaces:
ContainerInterface, VisualInterface, com.sas.beans.PropertyChangeSource, com.sas.beans.VetoableChangeSource, com.sas.ComponentInterface, com.sas.DesignTimeDropTargetInterface, com.sas.lang.StringDataInterface, com.sas.LinkPropertiesInterface, com.sas.ModelInterface, ValidatorInterface, com.sas.ViewInterface, MultipleValueEventSourceInterface, java.awt.event.ActionListener, java.awt.event.WindowListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.ObjectInputValidation, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible
Direct Known Subclasses:
RemoteObjectSelectorDialog

public class OkCancelHelpDialog
implements java.awt.event.ActionListener

See Also:
Serialized Form

Field Summary
static java.lang.String CANCEL
          The actionCommand for the Cancel button.
static java.lang.String CLOSE
          The actionCommand for the Ok/Close button.
static java.lang.String HELP
          The actionCommand for the Help button.
 
Fields inherited from class com.sas.visuals.ButtonDialog
buttonPanel, buttons, panel
 
Fields inherited from class com.sas.awt.Dialog
_cantUseSASModal, _inApplet, _modal, autoDispose, READY, setVisibleCalled, t
 
Constructor Summary
OkCancelHelpDialog(java.awt.Frame frame)
           
OkCancelHelpDialog(java.awt.Frame frame, java.lang.String title)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
protected  void cancel()
           
protected  void close()
           
protected  void help()
           
 boolean isValidateBeforeClosing()
          Get if the validator property should be checked before allowing the dialog to be hidden.
 void setValidateBeforeClosing(boolean checkValidator)
          Set the validator property to be checked before the dialog is hidden.
 void setVisible(boolean visible)
          Set the dialog visible state.
 boolean wasCancelled()
           
 void windowClosing(java.awt.event.WindowEvent evt)
          Handle click on the [x] window decoration so that it closes the window.
 
Methods inherited from class com.sas.visuals.ButtonDialog
getButtonPanel, getMainPanel, windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowIconified, windowOpened
 
Methods inherited from class com.sas.awt.Dialog
center, centerOver, centerOverWindow, dispose, fireReadySignal, getAutoDispose, getDefaultHeight, getDefaultWidth, getExtendedBeanInfo, getText, hide, isSASModalEnabled, newDispatchThread, processWindowEvent, setAutoDispose, setDefaultHeight, setDefaultWidth, setModal, setResizable, setSASModalEnabled, setText, setTitle, setVisible, show, stopDispatchThread, waitForReadySignal, waitTilReady
 
Methods inherited from class com.sas.awt.DialogContainerComponent
addNotify, clone, dragEnter, dragLeave, dragOver, drop, getContainerInterfaceSupportInfo, getErrorHandler, getInsets, getValidator, isIDEDnDDropBarrier, isIDEDnDDropTarget, isValid, removeNotify, setContainerInterfaceSupportInfo, setDefaultValues, setErrorHandler, setIDEDnDDropBarrier, setIDEDnDDropTarget, setInsets, setInsets, setValidator, superAddNotify, superGetInsets, superRemoveNotify, superSetDefaultValues
 
Methods inherited from class com.sas.awt.DialogVisualComponent
addLink, addPropertyChangeListener, addVetoableChangeListener, anyPropertyChangeListeners, attachModel, attachView, computePreferredSize, detachModel, detachView, dumpComponent, firePropertyChange, firePropertyChange, fireVetoableChange, getBackgroundColor, getBorder, getComponentDescription, getComponentSupportInfo, getEventMethod, getEventValues, getFont, getForegroundColor, getHeight, getHorizontalPosition, getLinkInfo, getMinimumSize, getModelInterface, getPreferredSize, getPrePainter, getRequiredInterfaces, getVerticalPosition, getViewInterfaceSupportInfo, getVisualInterfaceSupportInfo, getWidth, initialize, initializeComponent, isDesignTime, isEnabled, isFocus, isLinked, isTransparent, isVisible, paint, propertyChange, queryLinks, queryLinks, refresh, removeAllLinks, removeInterfaceTraps, removeLink, removePropertyChangeListener, removeVetoableChangeListener, setBackgroundColor, setBorder, setBounds, setComponentDescription, setComponentSupportInfo, setEnabled, setFocus, setFont, setForegroundColor, setHeight, setHorizontalPosition, setLinkInfo, setModelInterface, setPreferredSize, setPrePainter, setRequiredInterfaces, setTransparent, setVerticalPosition, setViewInterfaceSupportInfo, setVisualInterfaceSupportInfo, setWidth, superGetFont, superGetMinimumSize, superGetPreferredSize, superIsEnabled, superIsVisible, superPaint, superSetBounds, superSetEnabled, superSetFont, superSetVisible, superUpdate, supportsListenerInterface, supportsRequiredInterfaces, trapInterfaceEvents, update, validateObject
 
Methods inherited from interface com.sas.awt.ContainerInterface
getComponents, getLayout, invalidate, setLayout, validate
 
Methods inherited from interface com.sas.awt.VisualInterface
computePreferredSize, getBackgroundColor, getBorder, getFont, getForegroundColor, getHeight, getHorizontalPosition, getMinimumSize, getPreferredSize, getPrePainter, getVerticalPosition, getVisualInterfaceSupportInfo, getWidth, isEnabled, isFocus, isTransparent, isVisible, setBackgroundColor, setBorder, setBounds, setEnabled, setFocus, setFont, setForegroundColor, setHeight, setHorizontalPosition, setPreferredSize, setPrePainter, setTransparent, setVerticalPosition, setVisualInterfaceSupportInfo, setWidth, superGetFont, superGetMinimumSize, superGetPreferredSize, superIsEnabled, superIsVisible, superPaint, superSetBounds, superSetEnabled, superSetFont, superSetVisible, superUpdate
 

Field Detail

CLOSE

public static java.lang.String CLOSE
The actionCommand for the Ok/Close button.


CANCEL

public static java.lang.String CANCEL
The actionCommand for the Cancel button.


HELP

public static java.lang.String HELP
The actionCommand for the Help button.

Constructor Detail

OkCancelHelpDialog

public OkCancelHelpDialog(java.awt.Frame frame)

OkCancelHelpDialog

public OkCancelHelpDialog(java.awt.Frame frame,
                          java.lang.String title)
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

isValidateBeforeClosing

public boolean isValidateBeforeClosing()
Get if the validator property should be checked before allowing the dialog to be hidden. Returns false by default.

Returns:
true if the validator is used, false if not used

setValidateBeforeClosing

public void setValidateBeforeClosing(boolean checkValidator)
Set the validator property to be checked before the dialog is hidden. The com.sas.util.validators.ValidationInterface.validateValue(Object,Object) method will be checked before the dialog is allowed to be hidden. This can be used to validate textFields or other components before allowing the user to close the dialog. This is false by default.


setVisible

public void setVisible(boolean visible)
Set the dialog visible state. If the validateBeforeClosing property is true, the com.sas.util.validators.ValidationInterface.validateValue(Object, Object) method will be checked before allowing the dialog to be hidden. This dialog is passed in as the first parameter to validateValue() method. The second parameter is passed null.

Specified by:
setVisible in interface VisualInterface
Overrides:
setVisible in class Dialog
Parameters:
visible - Whether the component should be visible.
See Also:
VisualInterface.setVisible(boolean)

close

protected void close()

cancel

protected void cancel()

help

protected void help()

wasCancelled

public boolean wasCancelled()

windowClosing

public void windowClosing(java.awt.event.WindowEvent evt)
Handle click on the [x] window decoration so that it closes the window. The close() method will be called if the cancel button is not visible.

Specified by:
windowClosing in interface java.awt.event.WindowListener
Overrides:
windowClosing in class ButtonDialog
Parameters:
evt - windowEvent



Copyright © 2009 SAS Institute Inc. All Rights Reserved.