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 GlobalSettingView

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

All Implemented Interfaces:
  ConfigView

public class GlobalSettingView
extends ConfigViewImpl

This class is a view panel that will show all fields in the current settings cluster of the device. It also lets the user select one of the fields and then edit its value. The selected field and its editable value will be shown at the bottom of the panel. This view can be embedded in other panels as desired.

Nested Class Summary
`class` | `GlobalSettingView.KvpFieldRenderer` A basic Renderer for the KvpNode tree.
`class` | `GlobalSettingView.KvpNodeTreeModel`

Field Summary
`(package private) com.digi.config.core.DeviceChangeListener` | `deviceChangedListener` Listens to changes in the device fields
`(package private) javax.swing.JLabel` | `editKvpFieldName` The JLabel component that holds the name of the Field being edited
`(package private) javax.swing.JPanel` | `editKvpFieldPanel` The subpanel that holds the editable Field components
`(package private) javax.swing.JTextField` | `editKvpFieldValue` The JTextField that holds the editable value of the Field being edited
`(package private) javax.swing.JPanel` | `encompassingPanel` Panel that holds the tree and the edit panels
`(package private) javax.swing.JTree` | `globalKvpFieldTree` The JTree that shows the setting Cluster hierarchy
`(package private) javax.swing.JLabel` | `heading` Label identifying this view
`(package private) GlobalSettingView.KvpNodeTreeModel` | `kvpFieldTreeModel` The data model that maps the setting Cluster data into a JTree model
`(package private) com.digi.config.core.KvpField` | `selectedKvpField` The currently selected Field
`(package private) com.digi.config.core.KvpNode` | `viewSettingTree` View's current setting cluster values

Fields inherited from class com.digi.config.ui.ConfigViewImpl
`active, cancelChangesAction, device, editView, includeSettingsFields, includeStateFields, refreshAction, saveChangesAction, viewHelpAction, viewIndex`

Constructor Summary
`GlobalSettingView()` Basic constructor.

Method Summary
`void` | `activate()` This method is called to instruct the view that it is about to be made active.
`void` | `cancelChanges()` Instructs the view to discard any changes the user has made within the view and revert those fields to the original state.
`void` | `commitChanges()` Instructs the view to consider any user changes within the view as saved to the device (ie committed).
`void` | `deactivate()` This method is called to instruct the view that it is about to be made inactive.
`void` | `doEditKvpField(com.digi.config.core.KvpField aKvpField)` Sets up a kvpField for editting.
`void` | `doEditKvpFieldComplete()` Finishes up an edit of a kvpField and pushes any changes back into the kvpField object.
`void` | `getChanges(com.digi.config.core.KvpNode settingCluster, com.digi.config.core.KvpNode stateCluster)` This method instructs the view to place any changes the user has made within the view into the provided clusters.
`javax.swing.JPanel` | `getEditKvpFieldPanel()` Returns the edit kvpGroup panel - constructing it if necessary.
`java.lang.String` | `getName()` Returns a one word name identifying this view.
`java.awt.Component` | `getViewContent()` Return the Component that displays the primary content for this view
`boolean` | `isChanged()` Indicates if any changes have been made by the user that have not yet been saved to the device(ie committed).

Methods inherited from class com.digi.config.ui.ConfigViewImpl
`createEmailDocument, createGeneralDocument, createIntegerDocument, createNetworkAddressDocument, doCancelChangesAction, doRefreshAction, doSaveChangesAction, doViewHelpAction, getHelpResource, getViewButtons, getViewHeading, initializeActions, setDevice, setIncludeSettingsFields, setIncludeStateFields, setViewIndex, validateChanges`

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

Field Detail

### heading

    javax.swing.JLabel heading

  Label identifying this view

### encompassingPanel

    javax.swing.JPanel encompassingPanel

  Panel that holds the tree and the edit panels

### globalKvpFieldTree

    javax.swing.JTree globalKvpFieldTree

  The JTree that shows the setting Cluster hierarchy

### kvpFieldTreeModel

    GlobalSettingView.KvpNodeTreeModel kvpFieldTreeModel

  The data model that maps the setting Cluster data into a JTree model

### editKvpFieldPanel

    javax.swing.JPanel editKvpFieldPanel

  The subpanel that holds the editable Field components

### selectedKvpField

    com.digi.config.core.KvpField selectedKvpField

  The currently selected Field

### editKvpFieldName

    javax.swing.JLabel editKvpFieldName

  The JLabel component that holds the name of the Field being edited

### editKvpFieldValue

    javax.swing.JTextField editKvpFieldValue

  The JTextField that holds the editable value of the Field being edited

### viewSettingTree

    com.digi.config.core.KvpNode viewSettingTree

  View's current setting cluster values

### deviceChangedListener

    com.digi.config.core.DeviceChangeListener deviceChangedListener

  Listens to changes in the device fields

Constructor Detail

### GlobalSettingView

    public GlobalSettingView()
                      throws java.lang.Exception

  Basic constructor. Sets up the tree view and the edit panel.

Method Detail

### getName

    public java.lang.String getName()

  Returns a one word name identifying this view.

### getViewContent

    public java.awt.Component getViewContent()

  Return the Component that displays the primary content for this view

### 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 should use this method to create their content on first touch or when the device kvpGroup have been refreshed.

  Specified by:
    `activate` in interface `ConfigView`
  Overrides:
    `activate` in class `ConfigViewImpl`

### 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`
  Overrides:
    `deactivate` in class `ConfigViewImpl`

### isChanged

    public boolean isChanged()

  Indicates if any changes have been made by the user that have not yet been saved to the device(ie committed).

### getChanges

    public void getChanges(com.digi.config.core.KvpNode settingCluster,
                           com.digi.config.core.KvpNode stateCluster)

  This method instructs the view to place any changes the user has made within the view into the provided clusters. Once the changes have been saved to to the device, a subsequent call to commitChanges() will be made.

### commitChanges

    public void commitChanges()

  Instructs the view to consider any user changes within the view as saved to the device (ie committed).

### cancelChanges

    public void cancelChanges()

  Instructs the view to discard any changes the user has made within the view and revert those fields to the original state. The view is also free to refresh all its fields to the present cached state of the device at this time.

### doEditKvpField

    public void doEditKvpField(com.digi.config.core.KvpField aKvpField)

  Sets up a kvpField for editting. This method is called when a kvpField is selected from the tree.

### doEditKvpFieldComplete

    public void doEditKvpFieldComplete()

  Finishes up an edit of a kvpField and pushes any changes back into the kvpField object.

### getEditKvpFieldPanel

    public javax.swing.JPanel getEditKvpFieldPanel()

  Returns the edit kvpGroup panel - constructing it if necessary.

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.