com.microstrategy.web.objects.WebGridWidths |
This interface is for grid column width manipulations. User can choose different scenario for row and column axes. A scenario controls how the column width would be configured for the specific axis.
For column axis, the valid scenarios are in EnumDSSXMLWidthScenario
.
For row axis, the valid scenarios are DssXmlWidthFitToContent and DssXmlWidthFixed in EnumDSSXMLWidthScenario
.
After making neccessary manipulations about grid widths, user needs to apply these manipulations (applyChanges()
),
and get result of new report instance to see the effect.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | PROPERTY_SET_CW_NAME | ||||||||||
String | PROPERTY_SET_TEMPLATE_FORMATTING |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void |
clearAllWidths()
Resets all columns to use the default width.
| ||||||||||
abstract void |
clearWidth(int type)
Clears the width for a specific column class, which can be the header, grid, extra.
| ||||||||||
abstract int |
getColumnScenario()
Returns the column scenario.
| ||||||||||
abstract WebColumns |
getColumns(boolean compact)
Returns the collection of WebColumn objects.
| ||||||||||
abstract WebColumns |
getColumns()
Returns the collection of resizable column widths.
| ||||||||||
abstract WebColumns |
getColumns(boolean compact, boolean suppressOutlineMode)
This method is deprecated.
The function should not be used under normal circumstances
| ||||||||||
abstract int |
getDefaultGridWidth()
Returns default column grid width.
| ||||||||||
abstract int |
getDefaultHeaderWidth()
Returns default column header width.
| ||||||||||
abstract int |
getExtraWidth()
Returns the width of the extra column, which separates the row headers and grid values.
| ||||||||||
abstract int |
getRowHeight()
Returns the row height.
| ||||||||||
abstract int |
getRowScenario()
Returns the row scenario.
| ||||||||||
abstract int |
getWidth(String columnKey)
Returns the width of the
WebColumn matching the given
column key. | ||||||||||
abstract void |
setColumnScenario(int scenario)
Sets the column scenario.
| ||||||||||
abstract void |
setColumnScenario(int scenario, int defaultWidth)
Set Column Scenario.
| ||||||||||
abstract void |
setColumnScenario(int scenario, int defaultHeaderWidth, int defaultGridWidth)
Sets the column scenario.
| ||||||||||
abstract void |
setExtraWidth(int extraWidth)
Sets the width of the extra column, which separates the row headers and grid values.
| ||||||||||
abstract void |
setMetricsHeaderWidth(int width)
Sets the width of the "metrics" header.
| ||||||||||
abstract void |
setRowScenario(int scenario, int rowHeight)
Sets the row scenario.
| ||||||||||
abstract void |
setRowScenario(int scenario)
Sets the row scenario.
| ||||||||||
abstract void |
setWidth(int width, String columnKey)
Sets the width of a column on the template.
| ||||||||||
abstract void |
setWidth(int width, WebObjectInfo target)
Sets the width of a column on the template.
| ||||||||||
abstract void |
setWidth(int width, WebObjectInfo target, int subtitleDepth)
Sets the width of a column on the template.
|
Resets all columns to use the default width.
WebObjectsException |
---|
Clears the width for a specific column class, which can be the header, grid, extra.
type | A value in EnumDSSXMLColumnClass .
|
---|
WebObjectsException |
---|
Returns the column scenario.
EnumDSSXMLWidthScenario
.WebObjectsException | thrown when error happens during retrieving the column width information. |
---|
Returns the collection of WebColumn objects. The "compact" option, if
true it returns a unique set of data headers, otherwise the data headers
are repeated according to the grid layout. Requires column scenario of
DssXmlWidthFixed
), and that the result
flags include DssXmlResultGrid
.
compact | if true, repeated data headers are suppressed |
---|
WebColumn
objectsWebObjectsException | if any error occurs while retrieving or constructing the columns. |
---|
Returns the collection of resizable column widths.
Invokes getColumns(boolean)
with compact set to false
getColumns(boolean)
with compact equals to false.WebObjectsException |
---|
This method is deprecated.
The function should not be used under normal circumstances
Returns the collection of WebColumn objects. The "compact" option, if
true it returns a unique set of data headers, otherwise the data headers
are repeated according to the grid layout. Requires column scenario of
DssXmlWidthFixed
), and that the result
flags include DssXmlResultGrid
.
compact | if true, repeated data headers are suppressed |
---|---|
suppressOutlineMode | if true, suppress the columns to be merged for outline mode |
WebColumn
objectsWebObjectsException | if any error occurs while retrieving or constructing the columns. |
---|
Returns default column grid width.
WebObjectsException | thrown when error happens during retrieving the column width information. |
---|
Returns default column header width.
WebObjectsException | thrown when error happens during retrieving the column width information. |
---|
Returns the width of the extra column, which separates the row headers and grid values.
WebObjectsException | thrown when error happens during retrieving the column width information. |
---|
Returns the row height.
WebObjectsException | thrown when error happens during retrieving the column width information. |
---|
Returns the row scenario.
EnumDSSXMLWidthScenario
.WebObjectsException | thrown when error happens during retrieving the column width information. |
---|
Returns the width of the WebColumn
matching the given
column key.
columnKey | key of the WebColumn |
---|
IllegalArgumentException | if key is malformed or empty. |
---|---|
WebObjectsException |
Sets the column scenario. When the input scenario is DssXmlWidthFixed, the default header width and grid width will be set to 0. When the input scenario is any value other than DssWidthFixed, then all fixed width information set for column are cleared.
scenario | A value in EnumDSSXMLWidthScenario . |
---|
IllegalArgumentException | Thrown when the input scenario is not
a valid value in the enumeration EnumDSSXMLWidthScenario .
|
---|
Set Column Scenario.
Invokes setColumnScenario(int, int, int)
with the same width for
the header and grid defaults.
scenario | A value in EnumDSSXMLWidthScenario . |
---|---|
defaultWidth | The default value to set for both header width and grid width |
IllegalArgumentException | Thrown when the input scenario is not
a valid value in the enumeration EnumDSSXMLWidthScenario , or the
width input is less than -1.
|
---|
Sets the column scenario. When the input scenario is DssXmlWidthFixed, the default header width and grid width will be set. When the input scenario is any value other than DssWidthFixed, then all fixed width information set for column are cleared.
scenario | A value in EnumDSSXMLWidthScenario . |
---|---|
defaultHeaderWidth | The default header width to be set |
defaultGridWidth | The default grid width to be set |
IllegalArgumentException | Thrown when the input scenario is not
a valid value in the enumeration EnumDSSXMLWidthScenario , or the two
width inputs are less than -1.
|
---|
Sets the width of the extra column, which separates the row headers and grid values.
extraWidth | The width to set to the extra column. |
---|
WebObjectsException |
---|
Sets the width of the "metrics" header.
width | The width in pixel to set for the "metrics" header. |
---|
Sets the row scenario. When the input scenario is DssXmlWidthFixed, the row height will be set. When the input scenario is any value other than DssWidthFixed, then height information set for row are cleared.
scenario | DssXmlWidthFitToContent or DssXmlWidthFixed in EnumDSSXMLWidthScenario . |
---|---|
rowHeight | The value for row height |
IllegalArgumentException | Thrown when the input scenario is not
a valid value in the enumeration EnumDSSXMLWidthScenario , or row height is
less than -1.
|
---|
Sets the row scenario. When the input scenario is DssXmlWidthFixed, the row height will be set to 0. When the input scenario is any value other than DssWidthFixed, then height information set for row are cleared.
scenario | DssXmlWidthFitToContent or DssXmlWidthFixed in EnumDSSXMLWidthScenario . |
---|
IllegalArgumentException | Thrown when the input scenario DssXmlWidthFitToContent or DssXmlWidthFixed
in the enumeration EnumDSSXMLWidthScenario .
|
---|
Sets the width of a column on the template. The column specified by the column key.
width | width of the column in pixels. |
---|---|
columnKey | column identifier. |
IllegalArgumentException | if key is invalid. |
---|---|
WebObjectsException | if column width could not be set. |
Sets the width of a column on the template. The column specified by the template unit object. If this template unit corresponds to multiple columns, this setting will be applied to all columns.
width | The width to be set to the column. |
---|---|
target | The target on the template unit, whose column(s) will be set. |
Sets the width of a column on the template. The column specified by the template unit object, and its subtitle depth.
width | the width to set for this column |
---|---|
target | the object on this template unit. |
subtitleDepth | position on a 1-based index. For example, for attribute "employee", there are two forms, "first name" and "last name". So, there are two columns corresponding to "employee" unit. Then if you want to change the width of "first name", you should pass "1" as the subtitleDepth. When subtitleDepth gets set to 0, it means to apply this setting to all columns corresponding to this template unit. |