Interface Portlet
- All Known Subinterfaces:
DashboardApi
,ResultMatrix
- All Known Implementing Classes:
AbstractChartBuilder
,AbstractPortletDto
,BarLineChart
,BoxplotChart
,BubbleChart
,ConfiguratorEntry
,ConfiguratorEntryArray
,DashboardController
,DataTableChart
,DetailedTimeSeriesChart
,HeatmapChart
,HistogramChart
,PieChart
,ResultFlexChart
,ResultGauge
,ResultHighchart
,ResultHighmap
,ResultMatrix
,ScatterChart
,TimeSeriesChart
,TimeSeriesScatterChart
,WaterfallChart
,WaterfallComparisonChart
public interface Portlet
Common interface for the portlet behavior.
Note: These settings done on Portlet are inherited for embedded dashboard which contains this Portlet.
From embedded dashboard point of view, you can override these settings via
DashboardApi
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionwithDragDrop
(boolean enabled) Enables or disables the drag&drop feature for portlets.withHeight
(int height) Builder style method for setting the height in pixels.withHeight
(int height, String unit) Builder style method for setting the height in supported units.withLayout
(int width, int height) Builder style method for setting width and height in pixels.withLayout
(int width, int height, String unit) Builder style method for setting width and height in specified units.withResizing
(boolean enabled) Enables or disables the resizing feature for portlets.withWidth
(int width) Builder style method for setting the width in pixels.Builder style method for setting the width in supported units.
-
Field Details
-
UNIT_PX
The pixels unit.- See Also:
-
UNIT_GRID
The grid unit for 12 column layout system.- See Also:
-
-
Method Details
-
withWidth
Builder style method for setting the width in pixels.- Parameters:
width
- specify the width of the portlet (in pixels)- Returns:
- The current portlet object of the specified size.
- Since:
- 9.0 - Hurricane
- See Also:
-
withHeight
Builder style method for setting the height in pixels.- Parameters:
height
- specify the height of the portlet (in pixels)- Returns:
- The current portlet object of the specified size.
- Since:
- 9.0 - Hurricane
- See Also:
-
withLayout
Builder style method for setting width and height in pixels.- Parameters:
width
- specify the width of the portlet (in pixels)height
- specify the height of the portlet (in pixels)- Returns:
- The current portlet object of the specified size.
- Since:
- 9.0 - Hurricane
- See Also:
-
withDragDrop
Enables or disables the drag&drop feature for portlets. Set tofalse
to disable the drag&drop option. Default state is ENABLED.Example - disables the drag&drop of the Result Matrix portlet:
def matrix = api.newMatrix("column1", "column2", "column3") matrix.addRow(1, "a", "f") matrix.addRow(2, "b", "g") matrix.withDragDrop(false) return matrix
- Parameters:
enabled
- on/off switch. Default =true
.- Returns:
- this Portlet instance
-
withResizing
Enables or disables the resizing feature for portlets. Set tofalse
to disable the resizing of the portlet. Default state is ENABLED.Example - disables the resizing option of the Result Matrix portlet:
def matrix = api.newMatrix("column1", "column2", "column3") matrix.addRow(1, "a", "f") matrix.addRow(2, "b", "g") matrix.withResizing(false) return matrix
- Parameters:
enabled
- on/off switch. Default =true
.- Returns:
- this Portlet instance
-
withWidth
Builder style method for setting the width in supported units.Example – setting the width using the 12-column system (grid):
Example – setting the width using pixels:portlet.withWidth(12, "grid")
portlet.withWidth(400, "px") // == portlet.withWidth(400)
-
withHeight
Builder style method for setting the height in supported units.Example – setting the height using the 12-column system (grid):
Example – setting the height using pixels:portlet.withHeight(12, "grid")
portlet.withHeight(800, "px") // == portlet.withHeight(800)
-
withLayout
Builder style method for setting width and height in specified units.Example - sets the portlet size to the specified grid size:
def matrix = api.newMatrix("column1", "column2", "column3") matrix.addRow(1, "a", "f") matrix.addRow(2, "b", "g") matrix.withLayout(3, 3, "grid") return matrix
-