com.sas.swing.visuals.dataselectors.calculateditems
Class AdvancedCalculatedItemEditDialog

com.sas.swing.visuals.dataselectors.calculateditems.AdvancedCalculatedItemEditDialog
All Implemented Interfaces:
AdvancedCalculatedItemEditorInterface, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants
Direct Known Subclasses:
AdvancedExpressionEditDialog

public class AdvancedCalculatedItemEditDialog
implements AdvancedCalculatedItemEditorInterface

See Also:
Serialized Form

Field Summary
protected  boolean _canSaveInvalidExpressions
           
protected  java.lang.String _expressionInvalidTitle
           
protected  java.lang.String _expressionOkMessage
           
protected  java.lang.String _expressionOkTitle
           
protected  java.lang.String _expressionWarningTitle
           
protected  boolean _isExpressionValid
           
protected  int _maxMaxOutputObservations
           
 boolean _reportToStdErr
          set to true if reports should go to stderr, otherwise silent
protected  boolean _userSetMaxOutputObservations
           
protected  com.sas.swing.visuals.dataselectors.calculateditems.AdvancedCalculatedItemEditDialog.SymAction actionListener
           
protected  com.sas.swing.visuals.dataselectors.calculateditems.AdvancedCalculatedItemEditDialog.SymWindow aSymWindow
           
protected  javax.swing.JButton bCancel
           
protected  javax.swing.JButton bHelp
           
protected  javax.swing.JButton bOK
           
protected  AdvancedCalculatedItemSelector m_advCalcPanel
           
protected  CalculatedItemInterface m_calcItem
           
protected  java.lang.String m_errorMessageDialogTitle
           
protected  java.lang.String m_errorMessageNameRequired
           
protected  java.lang.String m_errorMessageSyntaxInvalid
           
protected  javax.swing.JLabel m_existingPane
           
protected  SASJavaHelp m_javaHelp
           
protected  java.lang.String m_labelCancelButton
           
protected  java.lang.String m_labelDescription
           
protected  java.lang.String m_labelExpression
           
protected  java.lang.String m_labelHelpButton
           
protected  java.lang.String m_labelName
           
protected  java.lang.String m_labelOkButton
           
protected  java.lang.String m_labelTitle
           
protected  javax.swing.JPanel m_newPanel
           
protected  com.sas.swing.visuals.dataselectors.calculateditems.MinimumResizeListener m_resizeListener
           
protected  int m_spacingBetweenButtons
          Between horizontally or vertically arranged buttons
protected  int m_spacingDialogBoxMargin
          Dialog box margins
protected  int m_spacingLastInGroupBox
          Last control in a group box
protected  boolean m_success
           
protected  java.lang.String m_warningMessageIsItOkToSave
           
static java.lang.String RB_KEY
           
 
Fields inherited from interface com.sas.swing.visuals.dataselectors.calculateditems.AdvancedCalculatedItemEditorInterface
CANCEL, OK
 
Constructor Summary
protected AdvancedCalculatedItemEditDialog(java.awt.Frame parent, boolean modal)
           
  AdvancedCalculatedItemEditDialog(java.awt.Frame parent, boolean modal, CalculatedItemInterface calcItem, SASJavaHelp javaHelp)
           
 
Method Summary
protected  void _layoutNewPanel()
           
protected  void _layoutWidgets()
           
 void addAllListeners()
           
protected  void addKeyListeners(java.awt.Container container, com.sas.swing.visuals.dataselectors.calculateditems.AdvancedCalculatedItemEditDialog.KeyHandler keyHandler)
          Lets the user press the ESCAPE key at anytime and cause the dialog to go away.
protected  void bCancel_Action(java.awt.event.ActionEvent event)
           
protected  void bOK_Action(java.awt.event.ActionEvent event)
           
protected  void Dialog1_WindowClosing(java.awt.event.WindowEvent event)
           
 void dispose()
           
 CalculatedItemInterface getCalculatedItem()
          Simple accessor to get the modified expression.
 int getMaxOutputObservations()
          Returns the current maximum number of output observations returned when gathering a list of possible values for a data item or physical item in the data source tree.
 java.lang.String getRawText()
           
 int getReturnValue()
          Simple accessor to find out why the dialog closed.
 java.awt.event.ActionListener getValidateActionListener()
           
protected  void init(java.awt.Frame parent, boolean modal, CalculatedItemInterface calcItem, SASJavaHelp javaHelp)
           
 boolean isExpressionValid()
          If the getReturnValue method returns OK then this methodr returns true if the expression returned passed validation and false if it failed.
 boolean isSaveInvalidExpressionsEnabled()
           
 boolean isValidationButtonVisible()
           
protected  javax.swing.JButton newNmemonicButton(java.lang.String item)
           
 void removeAllListeners()
           
 boolean reportAndCheckOkToContinue(java.lang.String message)
           
 boolean reportAndCheckOkToContinue(java.lang.String message, java.lang.String title)
           
 void reportAndDisplayError(java.lang.Exception e)
           
 void reportAndDisplayError(java.lang.Exception e, java.lang.String title)
           
 void reportAndDisplayError(java.lang.Exception e, java.lang.String title, int messageType)
           
 void reportAndDisplayError(java.lang.String message)
           
 void reportAndDisplayError(java.lang.String message, java.lang.String title)
           
 void reportAndDisplayError(java.lang.String message, java.lang.String title, int messageType)
           
 void reportInternalError(java.lang.String message)
           
 void reportInternalError(java.lang.Throwable t)
           
 void setCalculatedItem(CalculatedItemInterface calcItem)
           
 void setMaxOutputObservations(int max)
          Sets the current maximum number of output observations to be returned when gathering a list of possible values for a data item or physical item in the data source tree.
 void setNameLabel(java.lang.String label)
          Sets the label for the name text field that appears at the top of the dialog.
 void setSaveInvalidExpressionsEnabled(boolean enable)
          An enable value of true indicates the user can save an item that has invalid expression text, false indicates the filter item text must be valid if isEditOK() is true.
 void setTypeEnabled(boolean enable)
           
protected  void setupHelpForCalcItemDialog()
           
 void setValidateActionListener(java.awt.event.ActionListener listener)
           
 void setValidationButtonVisible(boolean visible)
           
 

Field Detail

RB_KEY

public static final java.lang.String RB_KEY
See Also:
Constant Field Values

m_advCalcPanel

protected AdvancedCalculatedItemSelector m_advCalcPanel

m_calcItem

protected CalculatedItemInterface m_calcItem

bOK

protected javax.swing.JButton bOK

bCancel

protected javax.swing.JButton bCancel

bHelp

protected javax.swing.JButton bHelp

m_success

protected boolean m_success

aSymWindow

protected com.sas.swing.visuals.dataselectors.calculateditems.AdvancedCalculatedItemEditDialog.SymWindow aSymWindow

actionListener

protected com.sas.swing.visuals.dataselectors.calculateditems.AdvancedCalculatedItemEditDialog.SymAction actionListener

m_existingPane

protected javax.swing.JLabel m_existingPane

m_newPanel

protected javax.swing.JPanel m_newPanel

m_javaHelp

protected SASJavaHelp m_javaHelp

m_spacingDialogBoxMargin

protected int m_spacingDialogBoxMargin
Dialog box margins


m_spacingBetweenButtons

protected int m_spacingBetweenButtons
Between horizontally or vertically arranged buttons


m_spacingLastInGroupBox

protected int m_spacingLastInGroupBox
Last control in a group box


m_labelTitle

protected java.lang.String m_labelTitle

m_labelName

protected java.lang.String m_labelName

m_labelDescription

protected java.lang.String m_labelDescription

m_labelExpression

protected java.lang.String m_labelExpression

m_labelOkButton

protected java.lang.String m_labelOkButton

m_labelCancelButton

protected java.lang.String m_labelCancelButton

m_labelHelpButton

protected java.lang.String m_labelHelpButton

m_errorMessageDialogTitle

protected java.lang.String m_errorMessageDialogTitle

m_errorMessageNameRequired

protected java.lang.String m_errorMessageNameRequired

m_errorMessageSyntaxInvalid

protected java.lang.String m_errorMessageSyntaxInvalid

m_warningMessageIsItOkToSave

protected java.lang.String m_warningMessageIsItOkToSave

_expressionOkTitle

protected java.lang.String _expressionOkTitle

_expressionOkMessage

protected java.lang.String _expressionOkMessage

_expressionInvalidTitle

protected java.lang.String _expressionInvalidTitle

_expressionWarningTitle

protected java.lang.String _expressionWarningTitle

_reportToStdErr

public boolean _reportToStdErr
set to true if reports should go to stderr, otherwise silent


m_resizeListener

protected com.sas.swing.visuals.dataselectors.calculateditems.MinimumResizeListener m_resizeListener

_userSetMaxOutputObservations

protected boolean _userSetMaxOutputObservations

_maxMaxOutputObservations

protected int _maxMaxOutputObservations

_canSaveInvalidExpressions

protected boolean _canSaveInvalidExpressions

_isExpressionValid

protected boolean _isExpressionValid
Constructor Detail

AdvancedCalculatedItemEditDialog

public AdvancedCalculatedItemEditDialog(java.awt.Frame parent,
                                        boolean modal,
                                        CalculatedItemInterface calcItem,
                                        SASJavaHelp javaHelp)

AdvancedCalculatedItemEditDialog

protected AdvancedCalculatedItemEditDialog(java.awt.Frame parent,
                                           boolean modal)
Method Detail

init

protected void init(java.awt.Frame parent,
                    boolean modal,
                    CalculatedItemInterface calcItem,
                    SASJavaHelp javaHelp)

newNmemonicButton

protected javax.swing.JButton newNmemonicButton(java.lang.String item)

setNameLabel

public void setNameLabel(java.lang.String label)
Sets the label for the name text field that appears at the top of the dialog.

Parameters:
label - The label to use.

dispose

public void dispose()
Overrides:
dispose in class java.awt.Window

addAllListeners

public void addAllListeners()

removeAllListeners

public void removeAllListeners()

_layoutNewPanel

protected void _layoutNewPanel()

_layoutWidgets

protected void _layoutWidgets()

addKeyListeners

protected void addKeyListeners(java.awt.Container container,
                               com.sas.swing.visuals.dataselectors.calculateditems.AdvancedCalculatedItemEditDialog.KeyHandler keyHandler)
Lets the user press the ESCAPE key at anytime and cause the dialog to go away.

Parameters:
container - container holding components that need to have the key listeners assigned.
keyHandler - the key listener to be assigned to all of the component

getReturnValue

public int getReturnValue()
Simple accessor to find out why the dialog closed. OK or CANCEL?

Specified by:
getReturnValue in interface AdvancedCalculatedItemEditorInterface

getCalculatedItem

public CalculatedItemInterface getCalculatedItem()
Simple accessor to get the modified expression.

Specified by:
getCalculatedItem in interface AdvancedCalculatedItemEditorInterface

setTypeEnabled

public void setTypeEnabled(boolean enable)
Specified by:
setTypeEnabled in interface AdvancedCalculatedItemEditorInterface

setCalculatedItem

public void setCalculatedItem(CalculatedItemInterface calcItem)
Specified by:
setCalculatedItem in interface AdvancedCalculatedItemEditorInterface

getRawText

public java.lang.String getRawText()

Dialog1_WindowClosing

protected void Dialog1_WindowClosing(java.awt.event.WindowEvent event)

bOK_Action

protected void bOK_Action(java.awt.event.ActionEvent event)

bCancel_Action

protected void bCancel_Action(java.awt.event.ActionEvent event)

setupHelpForCalcItemDialog

protected void setupHelpForCalcItemDialog()

reportAndCheckOkToContinue

public boolean reportAndCheckOkToContinue(java.lang.String message)
Specified by:
reportAndCheckOkToContinue in interface AdvancedCalculatedItemEditorInterface

reportAndCheckOkToContinue

public boolean reportAndCheckOkToContinue(java.lang.String message,
                                          java.lang.String title)
Specified by:
reportAndCheckOkToContinue in interface AdvancedCalculatedItemEditorInterface

reportAndDisplayError

public void reportAndDisplayError(java.lang.String message)
Specified by:
reportAndDisplayError in interface AdvancedCalculatedItemEditorInterface

reportAndDisplayError

public void reportAndDisplayError(java.lang.String message,
                                  java.lang.String title)
Specified by:
reportAndDisplayError in interface AdvancedCalculatedItemEditorInterface

reportAndDisplayError

public void reportAndDisplayError(java.lang.String message,
                                  java.lang.String title,
                                  int messageType)

reportAndDisplayError

public void reportAndDisplayError(java.lang.Exception e)
Specified by:
reportAndDisplayError in interface AdvancedCalculatedItemEditorInterface

reportAndDisplayError

public void reportAndDisplayError(java.lang.Exception e,
                                  java.lang.String title)
Specified by:
reportAndDisplayError in interface AdvancedCalculatedItemEditorInterface

reportAndDisplayError

public void reportAndDisplayError(java.lang.Exception e,
                                  java.lang.String title,
                                  int messageType)

reportInternalError

public void reportInternalError(java.lang.String message)

reportInternalError

public void reportInternalError(java.lang.Throwable t)

isValidationButtonVisible

public boolean isValidationButtonVisible()
Specified by:
isValidationButtonVisible in interface AdvancedCalculatedItemEditorInterface

setValidationButtonVisible

public void setValidationButtonVisible(boolean visible)
Specified by:
setValidationButtonVisible in interface AdvancedCalculatedItemEditorInterface

getValidateActionListener

public java.awt.event.ActionListener getValidateActionListener()
Specified by:
getValidateActionListener in interface AdvancedCalculatedItemEditorInterface

setValidateActionListener

public void setValidateActionListener(java.awt.event.ActionListener listener)
Specified by:
setValidateActionListener in interface AdvancedCalculatedItemEditorInterface

getMaxOutputObservations

public int getMaxOutputObservations()
Description copied from interface: AdvancedCalculatedItemEditorInterface
Returns the current maximum number of output observations returned when gathering a list of possible values for a data item or physical item in the data source tree.

Specified by:
getMaxOutputObservations in interface AdvancedCalculatedItemEditorInterface
Returns:
the maximum number of output observations

setMaxOutputObservations

public void setMaxOutputObservations(int max)
Description copied from interface: AdvancedCalculatedItemEditorInterface
Sets the current maximum number of output observations to be returned when gathering a list of possible values for a data item or physical item in the data source tree.

Specified by:
setMaxOutputObservations in interface AdvancedCalculatedItemEditorInterface
Parameters:
max - the new maximum number of output observations
See Also:
Governing

isSaveInvalidExpressionsEnabled

public boolean isSaveInvalidExpressionsEnabled()
Specified by:
isSaveInvalidExpressionsEnabled in interface AdvancedCalculatedItemEditorInterface

setSaveInvalidExpressionsEnabled

public void setSaveInvalidExpressionsEnabled(boolean enable)
Description copied from interface: AdvancedCalculatedItemEditorInterface
An enable value of true indicates the user can save an item that has invalid expression text, false indicates the filter item text must be valid if isEditOK() is true. Default is true

Specified by:
setSaveInvalidExpressionsEnabled in interface AdvancedCalculatedItemEditorInterface
Parameters:
enable - a value of true indicates the user can change the type of the filter item; false indicates the type cannot be changed.

isExpressionValid

public boolean isExpressionValid()
Description copied from interface: AdvancedCalculatedItemEditorInterface
If the getReturnValue method returns OK then this methodr returns true if the expression returned passed validation and false if it failed. If the getReturnValue() method returns CANCEL this methods return is undefined.

Specified by:
isExpressionValid in interface AdvancedCalculatedItemEditorInterface
Returns:
boolean



Copyright © 2009 SAS Institute Inc. All Rights Reserved.