Search in sources :

Example 1 with XulGroupbox

use of org.pentaho.ui.xul.containers.XulGroupbox in project pdi-dataservice-server-plugin by pentaho.

the class DataServiceTestController method bindStreamingWindowParameters.

private void bindStreamingWindowParameters(BindingFactory bindingFactory) {
    XulGroupbox streamingGroupBox = (XulGroupbox) document.getElementById("streaming-groupbox");
    streamingGroupBox.setVisible(dataService.isStreaming());
    XulRadio timeBasedRadio = (XulRadio) document.getElementById("time-based-radio");
    XulRadio rowBasedRadio = (XulRadio) document.getElementById("row-based-radio");
    XulTextbox sizeTextBox = (XulTextbox) document.getElementById("window-size");
    XulTextbox everyTextBox = (XulTextbox) document.getElementById("window-every");
    XulTextbox limitTextBox = (XulTextbox) document.getElementById("window-limit");
    XulLabel sizeTimeUnitLabel = (XulLabel) document.getElementById("window-size-time-unit");
    XulLabel everyTimeUnitLabel = (XulLabel) document.getElementById("window-every-time-unit");
    XulLabel limitTimeUnitLabel = (XulLabel) document.getElementById("window-limit-time-unit");
    XulLabel sizeRowUnitLabel = (XulLabel) document.getElementById("window-size-row-unit");
    XulLabel everyRowUnitLabel = (XulLabel) document.getElementById("window-every-row-unit");
    XulLabel limitRowUnitLabel = (XulLabel) document.getElementById("window-limit-row-unit");
    model.setWindowMode(IDataServiceClientService.StreamingMode.TIME_BASED);
    timeBasedRadio.setSelected(true);
    rowBasedRadio.setSelected(false);
    sizeTimeUnitLabel.setVisible(true);
    everyTimeUnitLabel.setVisible(true);
    limitTimeUnitLabel.setVisible(false);
    sizeRowUnitLabel.setVisible(false);
    everyRowUnitLabel.setVisible(false);
    limitRowUnitLabel.setVisible(true);
    sizeTextBox.setValue("");
    everyTextBox.setValue("");
    limitTextBox.setValue("");
    bindingFactory.setBindingType(Binding.Type.BI_DIRECTIONAL);
    bindingFactory.createBinding(model, "windowSize", sizeTextBox, "value", BindingConverters.longToStringEmptyZero());
    bindingFactory.createBinding(model, "windowEvery", everyTextBox, "value", BindingConverters.longToStringEmptyZero());
    bindingFactory.createBinding(model, "windowLimit", limitTextBox, "value", BindingConverters.longToStringEmptyZero());
    bindingFactory.createBinding(timeBasedRadio, "selected", sizeTimeUnitLabel, "visible");
    bindingFactory.createBinding(timeBasedRadio, "selected", everyTimeUnitLabel, "visible");
    bindingFactory.createBinding(timeBasedRadio, "!selected", limitTimeUnitLabel, "visible");
    bindingFactory.createBinding(timeBasedRadio, "!selected", sizeRowUnitLabel, "visible");
    bindingFactory.createBinding(timeBasedRadio, "!selected", everyRowUnitLabel, "visible");
    bindingFactory.createBinding(timeBasedRadio, "selected", limitRowUnitLabel, "visible");
    bindingFactory.createBinding(rowBasedRadio, "!selected", sizeTimeUnitLabel, "visible");
    bindingFactory.createBinding(rowBasedRadio, "!selected", everyTimeUnitLabel, "visible");
    bindingFactory.createBinding(rowBasedRadio, "selected", limitTimeUnitLabel, "visible");
    bindingFactory.createBinding(rowBasedRadio, "selected", sizeRowUnitLabel, "visible");
    bindingFactory.createBinding(rowBasedRadio, "selected", everyRowUnitLabel, "visible");
    bindingFactory.createBinding(rowBasedRadio, "!selected", limitRowUnitLabel, "visible");
}
Also used : XulRadio(org.pentaho.ui.xul.components.XulRadio) XulTextbox(org.pentaho.ui.xul.components.XulTextbox) XulLabel(org.pentaho.ui.xul.components.XulLabel) XulGroupbox(org.pentaho.ui.xul.containers.XulGroupbox)

Aggregations

XulLabel (org.pentaho.ui.xul.components.XulLabel)1 XulRadio (org.pentaho.ui.xul.components.XulRadio)1 XulTextbox (org.pentaho.ui.xul.components.XulTextbox)1 XulGroupbox (org.pentaho.ui.xul.containers.XulGroupbox)1