com.sas.swing.visuals.dataselectors.propertyeditor
Class EntityAttributeValuePanel

com.sas.swing.visuals.dataselectors.propertyeditor.EntityAttributeValuePanel
All Implemented Interfaces:
PanelInterface, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class EntityAttributeValuePanel
implements PanelInterface

EntityAttributeValuePanel is a swing component used to edit entity attribute values. The EntityAttributeValuePanel displays the name of the attribute to be edited as well as its current value when the attribute is selected in the table. The model for this component, which supplies information about the Entity attributes, is an instance of EntityAttributeValueModelInterface: supplies

Example

                //Create the model
      import com.sas.entities.Entity;
      import com.sas.dataselectors.propertyeditor.EntityAttributeValueSelectorAdapter;
      import com.sas.swing.visuals.dataselectors.propertyeditor.EntityAttributeValuePanel;
 
      Entity = new Entity();
                EntityAttributeValueSelectorAdapter selectorAdapter =  new EntityAttributeValueSelectorAdapter(entity);
                EntityAttributeValuePanel propertySheetPanel = new EntityAttributeValuePanel(selectorAdapter);

 

See Also:
Serialized Form

Field Summary
protected  javax.swing.JPanel cardContainer
          Panel used for the various containers of the card layout
protected  java.awt.CardLayout cardLayout
          Layout manager for the various containers in the panel
protected  DateEditorPanel datePanelContainer
          Container for the DateEditorPanel component with the checkBox component
protected  java.util.Map editorMap
          Name/value pairs (property name/editor)
protected  javax.swing.JPanel emptyContainer
          Container used for an empty component (used for spacing)
protected  java.util.Map initialValues
          Name/value pairs (property name/initial property value(s))
protected  MultiSelectionListEditorPanel multiListContainer
          Container for the MultiSelectionListEditorPanel component
protected  EditorPanelInterface previousPanel
          Previous editor displayed in the panel
protected  int previousRow
          Previous row selected in the TableView component
protected  java.awt.Container promptIdentifierContainer
          Name/value pairs (property name/supplemental property value(s) used for informational purposes)
protected  RadioButtonEditorPanel radioButtonContainer
          Container for the RadioButtonEditorPanel component
static java.lang.String RB_KEY
           
protected  DateEditorPanel requiredDatePanelContainer
          Container for the DateEditorPanel component without the checkBox component
protected  DateEditorPanel requiredTimePanelContainer
          Container for the DateEditorPanel component with the checkBox component for Time AttributeType
protected  DateEditorPanel requiredTimestampPanelContainer
          Container for the DateEditorPanel component with the checkBox component for Time AttributeType
protected  javax.swing.ListSelectionModel rowSM
          RowSelectionModel of the TableView component
protected  EntityAttributeValueModelInterface selectorAdapter
          Model associated with thie panel
protected  SingleSelectionListEditorPanel singleListContainer
          Container for the SingleSelectionListEditorPanel component
protected  EntityAttributeValueTableModelAdapter tableModel
          Model associated with the TableView component of the panel
protected  javax.swing.JScrollPane tablePane
          JScrollPane component that contains the TableView component of the panel
protected  TableView tableView
          TableView component of the panel
protected  TextFieldEditorPanel textFieldContainer
          Container for the TextFieldEditorPanel component
protected  DateEditorPanel timePanelContainer
          Container for the DateEditorPanel component without the checkBox component for Time AttributeType
protected  DateEditorPanel timestampPanelContainer
          Container for the DateEditorPanel component without the checkBox component for Time AttributeType
protected  javax.swing.JTextField valueField
          Deprecated.  
 
Fields inherited from interface com.sas.swing.visuals.PanelInterface
CONTENTS_VALID_PROPERTY
 
Constructor Summary
EntityAttributeValuePanel(EntityAttributeValueModelInterface selectorAdapter)
          Constructs a new EntityAttributeValuePanel with the specified model selectorAdapter
 
Method Summary
 void commitLastEditedValue()
          Ensures that the last attribute changed is committed to the default adapter instance.
protected  void displayContainer(int selectedRow)
          Internal method for determining and displaying the appropriate editor for an attribute
 java.lang.String getDialogTitle()
          Returns a title for this panel that should be displayed on a dialog's title bar.
 java.lang.String getHelpID()
          Returns the help id for this panel.
 javax.swing.JComponent getPanel()
          Returns the panel to be displayed.
 java.lang.String getTabTitle()
          Returns a title for this panel that should be displayed as a title on a tab.
protected  void initialize()
          Internal method for constructing the various component containers used in the EntityAttributeValuePanel
protected  void initializeTableView()
          Constructs the various subcomponents used in the EntityAttributeValuePanel (tableView and its model, etc.)
 boolean isContentsValid()
          Indicates if the panel's contents are in a valid state.
 boolean isYesNo()
          Indicates if the panel asks a yes-no or ok type question.
protected  java.awt.Container makeDefaultValueContainer()
          Internal method for constructing the container that displays attribute values
protected  java.awt.Container makeLabelContainer()
          Internal method for constructing the container that displays the text for selecting a prompt
protected  java.awt.Container makePromptIdentifierLabelsContainer()
          Internal method for constructing the container that displays information about a prompt
protected  java.awt.Container makePromptsContainer()
          Internal method for constructing the master container that displays the tableView and attribute values
protected  java.awt.Container makeTableContainer()
          Internal method for constructing the container that displays the tableView
protected  java.awt.Container makeValuesContainer()
          Internal method for constructing the master container that displays the attribute values
 void onApply()
          Apply any changes that may have been made in the panel.
 void onCancel()
          Cancel any changes that may have been made in the panel.
 void onClose()
          Indicates that the panel is being closed.
protected  void populatePromptIdentifierLabelsContainer(java.util.Map supplementalProperties)
          Internal method for populating information about a prompt derived from the supplemental properties of an AttributeDescriptor
 void setContentsValid(boolean newValue)
          Sets the valid state of the panel's contents.
 void setDialogTitle(java.lang.String dialogTitle)
          Method from com.sas.swing.visuals.PanelInterface.
 void setTabTitle(java.lang.String tabTitle)
          Method from com.sas.swing.visuals.PanelInterface.
protected  void showEditorPanel(java.lang.String propertyName, java.lang.String editorType)
          Internal method for creating a user-defined property editor
 

Field Detail

RB_KEY

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

tableView

protected TableView tableView
TableView component of the panel


tableModel

protected EntityAttributeValueTableModelAdapter tableModel
Model associated with the TableView component of the panel


selectorAdapter

protected EntityAttributeValueModelInterface selectorAdapter
Model associated with thie panel


cardLayout

protected java.awt.CardLayout cardLayout
Layout manager for the various containers in the panel


emptyContainer

protected javax.swing.JPanel emptyContainer
Container used for an empty component (used for spacing)


cardContainer

protected javax.swing.JPanel cardContainer
Panel used for the various containers of the card layout


textFieldContainer

protected TextFieldEditorPanel textFieldContainer
Container for the TextFieldEditorPanel component


singleListContainer

protected SingleSelectionListEditorPanel singleListContainer
Container for the SingleSelectionListEditorPanel component


multiListContainer

protected MultiSelectionListEditorPanel multiListContainer
Container for the MultiSelectionListEditorPanel component


radioButtonContainer

protected RadioButtonEditorPanel radioButtonContainer
Container for the RadioButtonEditorPanel component


datePanelContainer

protected DateEditorPanel datePanelContainer
Container for the DateEditorPanel component with the checkBox component


requiredDatePanelContainer

protected DateEditorPanel requiredDatePanelContainer
Container for the DateEditorPanel component without the checkBox component


requiredTimePanelContainer

protected DateEditorPanel requiredTimePanelContainer
Container for the DateEditorPanel component with the checkBox component for Time AttributeType


timePanelContainer

protected DateEditorPanel timePanelContainer
Container for the DateEditorPanel component without the checkBox component for Time AttributeType


requiredTimestampPanelContainer

protected DateEditorPanel requiredTimestampPanelContainer
Container for the DateEditorPanel component with the checkBox component for Time AttributeType


timestampPanelContainer

protected DateEditorPanel timestampPanelContainer
Container for the DateEditorPanel component without the checkBox component for Time AttributeType


previousRow

protected int previousRow
Previous row selected in the TableView component


valueField

protected javax.swing.JTextField valueField
Deprecated. 

previousPanel

protected EditorPanelInterface previousPanel
Previous editor displayed in the panel


rowSM

protected javax.swing.ListSelectionModel rowSM
RowSelectionModel of the TableView component


editorMap

protected java.util.Map editorMap
Name/value pairs (property name/editor)


initialValues

protected java.util.Map initialValues
Name/value pairs (property name/initial property value(s))


promptIdentifierContainer

protected java.awt.Container promptIdentifierContainer
Name/value pairs (property name/supplemental property value(s) used for informational purposes)


tablePane

protected javax.swing.JScrollPane tablePane
JScrollPane component that contains the TableView component of the panel

Constructor Detail

EntityAttributeValuePanel

public EntityAttributeValuePanel(EntityAttributeValueModelInterface selectorAdapter)
Constructs a new EntityAttributeValuePanel with the specified model selectorAdapter

Parameters:
selectorAdapter - instance of EntityAttributeValueModelInterface
Method Detail

initialize

protected void initialize()
Internal method for constructing the various component containers used in the EntityAttributeValuePanel


makeLabelContainer

protected java.awt.Container makeLabelContainer()
Internal method for constructing the container that displays the text for selecting a prompt


makePromptsContainer

protected java.awt.Container makePromptsContainer()
Internal method for constructing the master container that displays the tableView and attribute values


makeTableContainer

protected java.awt.Container makeTableContainer()
Internal method for constructing the container that displays the tableView


makeValuesContainer

protected java.awt.Container makeValuesContainer()
Internal method for constructing the master container that displays the attribute values


makePromptIdentifierLabelsContainer

protected java.awt.Container makePromptIdentifierLabelsContainer()
Internal method for constructing the container that displays information about a prompt


makeDefaultValueContainer

protected java.awt.Container makeDefaultValueContainer()
Internal method for constructing the container that displays attribute values


initializeTableView

protected void initializeTableView()
Constructs the various subcomponents used in the EntityAttributeValuePanel (tableView and its model, etc.)


displayContainer

protected void displayContainer(int selectedRow)
Internal method for determining and displaying the appropriate editor for an attribute

Parameters:
selectedRow - row selected in the table of attributes

populatePromptIdentifierLabelsContainer

protected void populatePromptIdentifierLabelsContainer(java.util.Map supplementalProperties)
Internal method for populating information about a prompt derived from the supplemental properties of an AttributeDescriptor

Parameters:
supplementalProperties - supplementalProperties associated with an AttributeDescriptor

showEditorPanel

protected void showEditorPanel(java.lang.String propertyName,
                               java.lang.String editorType)
Internal method for creating a user-defined property editor

Parameters:
propertyName - name of the property
editorType - fully-qualified class name of the editor component

commitLastEditedValue

public void commitLastEditedValue()
Ensures that the last attribute changed is committed to the default adapter instance. This is important in that certain editors (such as the default text editor used by the EntityAttributeValuePanelmay not be able to execute their focus lost events before other events occur.


setDialogTitle

public void setDialogTitle(java.lang.String dialogTitle)
Method from com.sas.swing.visuals.PanelInterface. Not currently used


setTabTitle

public void setTabTitle(java.lang.String tabTitle)
Method from com.sas.swing.visuals.PanelInterface. Not currently used


onApply

public void onApply()
Description copied from interface: PanelInterface
Apply any changes that may have been made in the panel. For example, a dialog may call this in response to its "apply" or "ok" button being pressed.

Specified by:
onApply in interface PanelInterface

onCancel

public void onCancel()
Description copied from interface: PanelInterface
Cancel any changes that may have been made in the panel. For example, a dialog may call this in response to its "cancel" button being pressed.

Specified by:
onCancel in interface PanelInterface

onClose

public void onClose()
Description copied from interface: PanelInterface
Indicates that the panel is being closed. Any necessary cleanup that is needed can be performed in this method. This should be called after onApply() or onClose() is called.

Specified by:
onClose in interface PanelInterface

getDialogTitle

public java.lang.String getDialogTitle()
Description copied from interface: PanelInterface
Returns a title for this panel that should be displayed on a dialog's title bar.

Specified by:
getDialogTitle in interface PanelInterface
Returns:
the title to display if used in a dialog

getTabTitle

public java.lang.String getTabTitle()
Description copied from interface: PanelInterface
Returns a title for this panel that should be displayed as a title on a tab.

Specified by:
getTabTitle in interface PanelInterface
Returns:
the title to display if used in a tabbed pane

getPanel

public javax.swing.JComponent getPanel()
Description copied from interface: PanelInterface
Returns the panel to be displayed. Most panels will implement this interface and therefore return this.

Specified by:
getPanel in interface PanelInterface

getHelpID

public java.lang.String getHelpID()
Description copied from interface: PanelInterface
Returns the help id for this panel. If null is returned, a help button is not added for this panel.

Specified by:
getHelpID in interface PanelInterface
Returns:
the help id for this panel or null

isYesNo

public boolean isYesNo()
Description copied from interface: PanelInterface
Indicates if the panel asks a yes-no or ok type question. This information can be used, for instance, by a dialog to determine if it should display an "OK" button or "Yes" and "No" buttons.

Specified by:
isYesNo in interface PanelInterface
Returns:
true if the panel asks a yes-no type question, false if the panel asks an ok type question

isContentsValid

public boolean isContentsValid()
Description copied from interface: PanelInterface
Indicates if the panel's contents are in a valid state. This should always be true except for when the panel is behaving as an editor and incomplete information has been entered. This state can be used by a dialog, for example, to enable/disable the its "apply" buttons ("OK", "Yes", etc).

Specified by:
isContentsValid in interface PanelInterface
Returns:
true if the panel's contents are valid, otherwise false
See Also:
PanelInterface.setContentsValid(boolean)

setContentsValid

public void setContentsValid(boolean newValue)
Description copied from interface: PanelInterface
Sets the valid state of the panel's contents. This should be implemented as a bound property so that containers can receive notification to update properly. PanelInterface provides the property name identifier CONTENTS_VALID_PROPERTY as a convenience for implementing this as a bound property.

Specified by:
setContentsValid in interface PanelInterface
Parameters:
newValue - the new valid state for the panel's contents
See Also:
PanelInterface.isContentsValid()



Copyright © 2009 SAS Institute Inc. All Rights Reserved.