예제 #1
0
        /// <summary>
        /// Create a slice header table that will contain the slice key titles and values
        /// </summary>
        /// <param name="state">
        /// The current state
        /// </param>
        /// <returns>
        /// The slice header table
        /// </returns>
        protected Table CreateSliceHeaderTable(RendererState state)
        {
            var table = new Table();

            table.AddClass(HtmlClasses.SliceKeys);
            table.AddAttribute(HtmlConstants.CellPadding, ZeroValue);
            table.AddAttribute(HtmlConstants.CellSpacing, ZeroValue);
            foreach (string key in state.Model.SliceKeys)
            {
                var row = new TableRow();
                table.AddElement(row);

                var value = state.InputRow[key] as string;
                value = value ?? " ";
                var title = new TableCell(state.Model.AllValidKeys[key]);
                title.AddClass(HtmlClasses.SliceKeyTitle);
                row.AddElement(title);

                string text = this.GetLocalizedName(key, value);
                var    val  = new TableCell();

                // Implemented like in java to show description only
                val.SetupDisplayText(value, text, key, DisplayMode.Description, false);
                val.AddClass(HtmlClasses.SliceKeyValue);
                row.AddElement(val);
            }

            return(table);
        }
예제 #2
0
        /// <summary>
        /// Create and setup the titles for vertical dimensions
        /// </summary>
        /// <param name="model">
        /// The DataSetModel to use
        /// </param>
        /// <returns>
        /// The row with the titles
        /// </returns>
        private TableRow CreateVerticalTitles(IDataSetModel model)
        {
            var verticalTitles = new TableRow();

            verticalTitles.AddClass(HtmlClasses.VerticalKeys);
            foreach (string dim in model.VerticalKeys)
            {
                TableCell tableCell = this.CreateTitle(model.AllValidKeys[dim], dim, HtmlClasses.VerticalKeyTitle);

                // new TD();
                verticalTitles.AddElement(tableCell);
            }

            return(verticalTitles);
        }
예제 #3
0
        /// <summary>
        /// Create the container table. The container table holds the slice header and slice data tables.
        /// </summary>
        /// <returns>
        /// The table that holds the slice header and data
        /// </returns>
        private static Table CreateContainerTable()
        {
            var containerTable = new Table();

            containerTable.AddClass(HtmlClasses.Container);
            containerTable.AddAttribute(HtmlConstants.CellPadding, ZeroValue);
            containerTable.AddAttribute(HtmlConstants.CellSpacing, ZeroValue);
            var sliceRow = new TableRow();

            containerTable.AddElement(sliceRow);
            var skeys = new TableCell();

            skeys.AddClass(HtmlClasses.SliceKeys);
            sliceRow.AddElement(skeys);

            var hvkeys = new TableRow(new TableCell());

            hvkeys.AddClass(HtmlClasses.HorizontalVerticalKeys);
            containerTable.AddElement(hvkeys);

            return(containerTable);
        }
예제 #4
0
        /// <summary>
        /// Create the container table. The container table holds the slice header and slice data tables.
        /// </summary>
        /// <returns>
        /// The table that holds the slice header and data
        /// </returns>
        private static Table CreateContainerTable()
        {
            var containerTable = new Table();
            containerTable.AddClass(HtmlClasses.Container);
            containerTable.AddAttribute(HtmlConstants.CellPadding, ZeroValue);
            containerTable.AddAttribute(HtmlConstants.CellSpacing, ZeroValue);
            var sliceRow = new TableRow();
            containerTable.AddElement(sliceRow);
            var skeys = new TableCell();
            skeys.AddClass(HtmlClasses.SliceKeys);
            sliceRow.AddElement(skeys);

            var hvkeys = new TableRow(new TableCell());
            hvkeys.AddClass(HtmlClasses.HorizontalVerticalKeys);
            containerTable.AddElement(hvkeys);

            return containerTable;
        }
예제 #5
0
        /// <summary>
        /// Create a slice header table that will contain the slice key titles and values
        /// </summary>
        /// <param name="state">
        /// The current state
        /// </param>
        /// <returns>
        /// The slice header table
        /// </returns>
        protected Table CreateSliceHeaderTable(RendererState state)
        {
            var table = new Table();
            table.AddClass(HtmlClasses.SliceKeys);
            table.AddAttribute(HtmlConstants.CellPadding, ZeroValue);
            table.AddAttribute(HtmlConstants.CellSpacing, ZeroValue);
            foreach (string key in state.Model.SliceKeys)
            {
                var row = new TableRow();
                table.AddElement(row);

                var value = state.InputRow[key] as string;
                value = value ?? " ";
                var title = new TableCell(state.Model.AllValidKeys[key]);
                title.AddClass(HtmlClasses.SliceKeyTitle);
                row.AddElement(title);

                string text = this.GetLocalizedName(key, value);
                var val = new TableCell();

                // Implemented like in java to show description only
                val.SetupDisplayText(value, text, key, DisplayMode.Description, false);
                val.AddClass(HtmlClasses.SliceKeyValue);
                row.AddElement(val);
            }

            return table;
        }
예제 #6
0
        /// <summary>
        /// Create and setup the titles for vertical dimensions
        /// </summary>
        /// <param name="model">
        /// The DataSetModel to use
        /// </param>
        /// <returns>
        /// The row with the titles
        /// </returns>
        private TableRow CreateVerticalTitles(IDataSetModel model)
        {
            var verticalTitles = new TableRow();
            verticalTitles.AddClass(HtmlClasses.VerticalKeys);
            foreach (string dim in model.VerticalKeys)
            {
                TableCell tableCell = this.CreateTitle(model.AllValidKeys[dim], dim, HtmlClasses.VerticalKeyTitle);
                // new TD();
                verticalTitles.AddElement(tableCell);
            }

            return verticalTitles;
        }