CurrentState: Object;
The CurrentState property determines current state for the component of wizard for setting up Baxter King filter parameters.
To execute the example, the page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component), and the workbook must include a series with the formula type Baxter King Filter. The following code must be added in the event handler that processes document opening:
var baxterKingFilterWizardView;
//Get a panel which must contain Baxter-King filter parameter setup wizard
var parametersPanel = workbookBox.getPropertyBarView().getParametersPanel();
// Create an instance of panel of Baxter-King filter parameter setup wizard
var baxterKingFilterWizardViewButt = new PP.Ui.Button({
ParentNode: document.body, //DOM parent node
Content: "Change bottom value", //Text
Click: PP.Delegate(onClickBaxterKingFilterWizardView),
Enabled:False
});
//Turn the Change Bottom Value button to the state available to use
parametersPanel.Toggling.add(PP.Delegate(function(){
var selSerie = wbk.getActiveSheet().getSelectedSeries()[0];
if(parametersPanel._isBaxterKingFilterSerie(selSerie))
{
baxterKingFilterWizardViewButt.setEnabled(True);
}
else
{
baxterKingFilterWizardViewButt.setEnabled(False);
}
}));
function onClickBaxterKingFilterWizardView() {
//Get Baxter-King filter parameter setup wizard
baxterKingFilterWizardView = parametersPanel._BaxterKingFilterWizard;
//Get component's current state
var state = baxterKingFilterWizardView.getCurrentState();
//Change bottom value
state.bandpassFilter.frequencyLow = 666777;
//Set a new current value to the component
baxterKingFilterWizardView.setCurrentState(state);
}
After executing the example a button named Change Lower Value is placed in the HTML page. Select a series with the Baxter-King Filter formula type, in the Series tab of the side panel open the Parameters panel. After that the Change Lower Value button is unblocked. On clicking the button in Parameters panel a new value - 666777 is set in the Lower Value box.
See also: