All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.swing.visuals.dataselectors.calculateditems
Class SimpleCalculatedItemEditPanel

    com.sas.swing.visuals.dataselectors.calculateditems.SimpleCalculatedItemEditPanel

All Implemented Interfaces:
  DataSelectorInterface, PanelInterface, LayoutConstants, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

    @SASScope(value="ALL")
    public class SimpleCalculatedItemEditPanel

implements LayoutConstants

This class provides the panel used to create a new calculated item or to edit an existing calculated item. It is used by SimpleCalculatedItemSelector.

See Also:
  Serialized Form

Field Summary
`protected javax.swing.JButton` | `clearFormatB`
`protected javax.swing.JList` | `dataItemsList`
`protected javax.swing.JTextField` | `descTF`
`protected javax.swing.JButton` | `divB`
`protected javax.swing.JTextArea` | `expressionTA`
`protected javax.swing.JTextField` | `formatTF`
`protected javax.swing.JButton` | `minusB`
`protected javax.swing.JButton` | `multB`
`protected LimitedTextField` | `nameTF`
`protected javax.swing.JButton` | `parensB`
`protected javax.swing.JButton` | `plusB`
`protected javax.swing.JButton` | `selectFormatB`
`protected javax.swing.JButton` | `transferB`

Fields inherited from class com.sas.swing.visuals.dataselectors.BaseSwingSelectorPanel
`command, contentsValid, selectorModel, wasCancelled`

Fields inherited from interface com.sas.swing.visuals.util.LayoutConstants
`DOTS_BUTTON_INSETS, EMPTY_INSETS, HGAP, HMARGIN, INDENTED_BORDER, TAB_BORDER, TEXTFIELD_INSETS, VGAP, VMARGIN`

Fields inherited from interface com.sas.swing.visuals.PanelInterface
`CONTENTS_VALID_PROPERTY`

Constructor Summary
`SimpleCalculatedItemEditPanel(CalculatedItemListInterface list, CalculatedItemInterface calculatedItem, boolean isRelational, java.lang.String[][] dataItems, boolean edit)` SimpleCalculatedItemEditPanel constructor.

Method Summary
`void` | `onApply()` This method validates the input and is to be called when the OK button is pressed.
`void` | `onCancel()` This method is to be called when the Cancel button is pressed.

Methods inherited from class com.sas.swing.visuals.dataselectors.BaseSwingSelectorPanel
`getCommand, getDialogTitle, getHelpID, getPanel, getSelectorModel, getTabTitle, isContentsValid, isYesNo, onClose, setCommand, setContentsValid, setSelectorModel`

Methods inherited from interface com.sas.dataselectors.DataSelectorInterface
`isVisible, setVisible`

Field Detail

### nameTF

    protected LimitedTextField nameTF

### descTF

    protected javax.swing.JTextField descTF

### formatTF

    protected javax.swing.JTextField formatTF

### dataItemsList

    protected javax.swing.JList dataItemsList

### transferB

    protected javax.swing.JButton transferB

### expressionTA

    protected javax.swing.JTextArea expressionTA

### plusB

    protected javax.swing.JButton plusB

### minusB

    protected javax.swing.JButton minusB

### multB

    protected javax.swing.JButton multB

### divB

    protected javax.swing.JButton divB

### parensB

    protected javax.swing.JButton parensB

### selectFormatB

    protected javax.swing.JButton selectFormatB

### clearFormatB

    protected javax.swing.JButton clearFormatB

Constructor Detail

### SimpleCalculatedItemEditPanel

    public SimpleCalculatedItemEditPanel(CalculatedItemListInterface list,
                                         CalculatedItemInterface calculatedItem,
                                         boolean isRelational,
                                         java.lang.String[][] dataItems,
                                         boolean edit)

  SimpleCalculatedItemEditPanel constructor.

  Parameters:
    `list` - the CalculatedItemListInterface adapter object
    `calculatedItem` - the new or existing item
    `isRelational` - true if called in a relational contact; false in an OLAP context
    `dataItems` - the list of data items. There are two string for each item - a value used in the list and a value used in the expression.
    `edit` - true - existing item is being edited; false - new item is being created

Method Detail

### onApply

    public void onApply()

  This method validates the input and is to be called when the OK button is pressed. If there are errors, an error dialog with the reason is displayed and the Calculated Item dialog is not dismissed.

  Specified by:
    `onApply` in interface `PanelInterface`
  Overrides:
    `onApply` in class `BaseSwingSelectorPanel`

### onCancel

    public void onCancel()

  This method is to be called when the Cancel button is pressed. It is needed because of issues in the adapter and it restores the original values of the Calculated item in the "edit" case.

  Specified by:
    `onCancel` in interface `PanelInterface`
  Overrides:
    `onCancel` in class `BaseSwingSelectorPanel`

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.