<?xml version="1.0" encoding="utf-8"?>

<!--
  ~ Copyright 2012 Red Hat, Inc. and/or its affiliates.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~       http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
             xmlns:g='urn:import:com.google.gwt.user.client.ui'
             xmlns:b="urn:import:org.gwtbootstrap3.client.ui"
             xmlns:df="urn:import:org.dashbuilder.displayer.client.widgets.filter"
             xmlns:dg="urn:import:org.dashbuilder.displayer.client.widgets.group">

  <ui:with field="i18n" type="org.dashbuilder.displayer.client.resources.i18n.CommonConstants"/>

  <ui:style>
    .statusLabel{
      color: red;
    }
    .sectionLabel {
      font-weight: bold;
    }
    .cellPaddingPanel {
      padding: 3px;
    }
    .groupDatePanel {
      width: 200px;
      padding: 10px;
      background: #dddddd;
      border-radius: 5px;
    }
  </ui:style>

  <g:FlowPanel>
    <g:FlowPanel styleName="{style.cellPaddingPanel}">
      <b:Label ui:field="statusLabel" visible="false" styleName="{style.statusLabel}" />
      <g:Label styleName="{style.sectionLabel}" text="{i18n.dataset_dataset}"/>
      <b:ListBox ui:field="dataSetListBox" width="200px" />
    </g:FlowPanel>
    <g:FlowPanel ui:field="filtersControlPanel" visible="false" styleName="{style.cellPaddingPanel}">
      <g:Label styleName="{style.sectionLabel}" text="{i18n.dataset_filters}"/>
      <df:DataSetFilterEditor ui:field="filterEditor" />
    </g:FlowPanel>
    <g:FlowPanel ui:field="groupControlPanel" visible="false" styleName="{style.cellPaddingPanel}">
      <g:Label ui:field="groupControlLabel" styleName="{style.sectionLabel}" text="{i18n.dataset_rows}"/>
      <g:HorizontalPanel styleName="{style.cellPaddingPanel}">
        <b:ListBox ui:field="groupColumnListBox" width="200px" />
        <b:Icon type="ARROW_DOWN" ui:field="groupDetailsIcon" size="LARGE"/>
      </g:HorizontalPanel>
      <g:FlowPanel ui:field="groupDatePanel" visible="false" styleName="{style.groupDatePanel}">
        <dg:DataSetGroupDateEditor ui:field="groupDateEditor" />
      </g:FlowPanel>
    </g:FlowPanel>
    <g:FlowPanel ui:field="columnsControlPanel" visible="false" styleName="{style.cellPaddingPanel}">
        <g:Label ui:field="columnsControlLabel" styleName="{style.sectionLabel}" text="{i18n.dataset_columns}"/>
        <g:FlowPanel ui:field="columnsPanel"/>
        <b:Button ui:field="addColumnButton" type="LINK" visible="false" text="{i18n.common_button_addnew}"/>
    </g:FlowPanel>
  </g:FlowPanel>
</ui:UiBinder>
