Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.digi.config.ui
Class ConfigViewImpl

    java.lang.Object
      com.digi.config.ui.ConfigViewImpl

All Implemented Interfaces:
  ConfigView

Direct Known Subclasses:
  AggregateConfigView, AlarmGpioView, BackupView, GeneralInfoView, GlobalSettingView, GpioStateView, GpioView, HomeView, NetworkAdvancedView, NetworkBasicView, NetworkServicesView, NetworkStatisticsView, NetworkWirelessSecurityView, NetworkWirelessView, RebootView, RestoreFactoryDefaultsView, SecurityView, SerialAdvancedView, SerialBasicView, SerialNetworkServicesView, SerialPortServicesView, SerialStatisticsView

public abstract class ConfigViewImpl
extends java.lang.Object
implements ConfigView

This interface defines the basic operations required for all configuration views that are used in the configuration application.

Field Summary
`protected boolean` | `active`
`(package private) com.digi.config.ui.ConfigAction` | `cancelChangesAction`
`(package private) com.digi.config.core.Device` | `device` The device we are configuring
`protected boolean` | `editView`
`(package private) javax.swing.JComponent` | `heading` Generic heading label based on view name
`protected boolean` | `includeSettingsFields`
`protected boolean` | `includeStateFields`
`(package private) com.digi.config.ui.ConfigAction` | `refreshAction`
`(package private) com.digi.config.ui.ConfigAction` | `saveChangesAction`
`(package private) com.digi.config.ui.ConfigAction` | `viewHelpAction`
`(package private) int` | `viewIndex` current view index

Constructor Summary
`ConfigViewImpl()` Basic constructor of a readonly config view
`ConfigViewImpl(boolean editView)` Constructor that specifies if this view allows editting of the kvpGroup.

Method Summary
`void` | `activate()` This method is called to instruct the view that it is about to be made active.
`protected javax.swing.text.Document` | `createEmailDocument()` Creates a Text Field Document for Text Validation for Text Fields requiring Email addresses
`protected javax.swing.text.Document` | `createGeneralDocument()` Creates a Text Field Document for Text Validation for Text Fields requiring any input - verifies no non-XML chars exist
`protected javax.swing.text.Document` | `createIntegerDocument()` Creates a Text Field Document for Text Validation for Text Fields requiring Integer input
`protected javax.swing.text.Document` | `createNetworkAddressDocument()` Creates a Text Field Document for Text Validation for Text Fields requiring Network Address input such as IP Addresses
`void` | `deactivate()` This method is called to instruct the view that it is about to be made inactive.
`void` | `doCancelChangesAction()` This action cancells any user modified field changes in the view and reverts the view to its prior state or to a newly refreshed state.
`void` | `doRefreshAction()` Instructs the device proxy to refresh its cached settings which in turn notifies device listeners of any change in setting state.
`void` | `doSaveChangesAction()` This action saves any user modified Fields in the view to the device
`void` | `doViewHelpAction()` Displays help information on the current view
`java.lang.String` | `getHelpResource()` Returns a resource key to the help information for this view.
`java.awt.Component` | `getViewButtons()` Returns the Component that displays the buttons below the view.
`java.awt.Component` | `getViewHeading()` Returns the Component that displays the heading of the view.
`protected void` | `initializeActions()` Defines the main actions that can be invoked from the menus or toolbar buttons.
`void` | `setDevice(com.digi.config.core.Device device)` Informs view what device to work with.
`void` | `setIncludeSettingsFields(boolean flag)` Directs the view to Save and Refresh Setting data.
`void` | `setIncludeStateFields(boolean flag)` Directs the view to Save and Refresh State data.
`void` | `setViewIndex(int primaryIndex)` Informs view to use the specified primary index in selecting the data to display in the view.
`void` | `validateChanges(java.util.Collection errorList)` This method instructs the view to validate any of the changes the user has made within the view.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.digi.config.ui.ConfigView
`cancelChanges, commitChanges, getChanges, getName, getViewContent, isChanged`

Field Detail

### device

    com.digi.config.core.Device device

  The device we are configuring

### active

    protected boolean active

### editView

    protected boolean editView

### includeSettingsFields

    protected boolean includeSettingsFields

### includeStateFields

    protected boolean includeStateFields

### heading

    javax.swing.JComponent heading

  Generic heading label based on view name

### viewIndex

    int viewIndex

  current view index

### saveChangesAction

    com.digi.config.ui.ConfigAction saveChangesAction

### cancelChangesAction

    com.digi.config.ui.ConfigAction cancelChangesAction

### refreshAction

    com.digi.config.ui.ConfigAction refreshAction

### viewHelpAction

    com.digi.config.ui.ConfigAction viewHelpAction

Constructor Detail

### ConfigViewImpl

    public ConfigViewImpl()
                   throws java.lang.Exception

  Basic constructor of a readonly config view

### ConfigViewImpl

    public ConfigViewImpl(boolean editView)
                   throws java.lang.Exception

  Constructor that specifies if this view allows editting of the kvpGroup. If it does, then the view will show the Save & Cancel buttons in the button panel.

Parameters:
  `editView` - identifies if this view can edit the device kvpGroup

Method Detail

### setIncludeSettingsFields

    public void setIncludeSettingsFields(boolean flag)

  Directs the view to Save and Refresh Setting data.

  Parameters:
    `flag` - is true if State data is to be included in view processing.

### setIncludeStateFields

    public void setIncludeStateFields(boolean flag)

  Directs the view to Save and Refresh State data.

  Parameters:
    `flag` - is true if State data is to be included in view processing.

### getViewHeading

    public java.awt.Component getViewHeading()

  Returns the Component that displays the heading of the view. If this view has no heading to display this method returns null.

  Specified by:
    `getViewHeading` in interface `ConfigView`

### getViewButtons

    public java.awt.Component getViewButtons()

  Returns the Component that displays the buttons below the view. If this view has no buttons to display this method returns null. Default buttons provide ability to Save changes, Cancel changes, Refresh kvpGroup, and get Help

  Specified by:
    `getViewButtons` in interface `ConfigView`

### setDevice

    public void setDevice(com.digi.config.core.Device device)

  Informs view what device to work with. Subclass Views should flush any cached device data and mark current view content as invalid so that it is refreshed appropriatly.

  Specified by:
    `setDevice` in interface `ConfigView`

### setViewIndex

    public void setViewIndex(int primaryIndex)

  Informs view to use the specified primary index in selecting the data to display in the view. Not all views will support indexed viewing and it is up to each view to define what the index is based upon.

  An example of an indexed view would be the SerialBasicView. This view is indexed off the port # whose data is to be displayed in the view. An external control in the SerialView lets the user select the port to view and then that view instructs the SerialBasicView to use the selected port number as it's ViewIndex. Other views could use the index to base their view off other integer keys such as Alarm#, Destination#,etc...

  Views that do not support indexing can simply ignore this call.

  Specified by:
    `setViewIndex` in interface `ConfigView`

### activate

    public void activate()

  This method is called to instruct the view that it is about to be made active. When a view is active it needs to make sure its content is correct. An example of why a panel may be inactive is if it were on a tabbed pane and was not currently visible or if the user selected some other view. Views can use this method to create their content on first touch or to refresh their content when the device kvpGroup have been reset.

  Specified by:
    `activate` in interface `ConfigView`

### deactivate

    public void deactivate()

  This method is called to instruct the view that it is about to be made inactive. When a view is inactive, it does not need to worry about maintaining its content in a correct state. An example of why a panel may be inactive is if it were on a tabbed pane and was not currently visible or if the user selected some other view.

  Specified by:
    `deactivate` in interface `ConfigView`

### getHelpResource

    public java.lang.String getHelpResource()

  Returns a resource key to the help information for this view. The actual URL will be looked up in the Help Resource bundle. The default behavior is to base the resource key off the view name

  Specified by:
    `getHelpResource` in interface `ConfigView`

### validateChanges

    public void validateChanges(java.util.Collection errorList)

  This method instructs the view to validate any of the changes the user has made within the view. Any errors are to be added to the provided errorList.

  Specified by:
    `validateChanges` in interface `ConfigView`
  Parameters:
    `errorList` - is a collection of ViewValidationError objects

### initializeActions

    protected void initializeActions()
                              throws java.lang.Exception

  Defines the main actions that can be invoked from the menus or toolbar buttons. These actions will be used to construct the menus & toolbar buttons.

  Throws:
    `java.lang.Exception`

### doSaveChangesAction

    public void doSaveChangesAction()

  This action saves any user modified Fields in the view to the device

### doCancelChangesAction

    public void doCancelChangesAction()

  This action cancells any user modified field changes in the view and reverts the view to its prior state or to a newly refreshed state.

### doRefreshAction

    public void doRefreshAction()

  Instructs the device proxy to refresh its cached settings which in turn notifies device listeners of any change in setting state.

### doViewHelpAction

    public void doViewHelpAction()

  Displays help information on the current view

### createIntegerDocument

    protected javax.swing.text.Document createIntegerDocument()

  Creates a Text Field Document for Text Validation for Text Fields requiring Integer input

### createNetworkAddressDocument

    protected javax.swing.text.Document createNetworkAddressDocument()

  Creates a Text Field Document for Text Validation for Text Fields requiring Network Address input such as IP Addresses

### createGeneralDocument

    protected javax.swing.text.Document createGeneralDocument()

  Creates a Text Field Document for Text Validation for Text Fields requiring any input - verifies no non-XML chars exist

### createEmailDocument

    protected javax.swing.text.Document createEmailDocument()

  Creates a Text Field Document for Text Validation for Text Fields requiring Email addresses

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2002 Digi International. All Rights Reserved.