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

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The grid unit for 12 column layout system.
    static final String
    The pixels unit.
  • Method Summary

    Modifier and Type
    Method
    Description
    withDragDrop(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.
    withWidth(int width, String unit)
    Builder style method for setting the width in supported units.
  • Field Details

  • Method Details

    • withWidth

      Portlet withWidth(int width)
      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

      Portlet withHeight(int height)
      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

      Portlet withLayout(int width, int height)
      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

      Portlet withDragDrop(boolean enabled)
      Enables or disables the drag&drop feature for portlets. Set to false 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

      Portlet withResizing(boolean enabled)
      Enables or disables the resizing feature for portlets. Set to false 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

      Portlet withWidth(int width, String unit)
      Builder style method for setting the width in supported units.

      Example – setting the width using the 12-column system (grid):

      
       portlet.withWidth(12, "grid")
       
      Example – setting the width using pixels:
      
       portlet.withWidth(400, "px") // == portlet.withWidth(400)
       
      Parameters:
      width - Specifies the width of the portlet (in unit).
      unit - Specifies the unit of the width (grid, px). If the unit is not specified then px is used as default.
      Returns:
      The current portlet object of the specified size.
      Since:
      12.0 - Clover Club
      See Also:
    • withHeight

      Portlet withHeight(int height, String unit)
      Builder style method for setting the height in supported units.

      Example – setting the height using the 12-column system (grid):

      
       portlet.withHeight(12, "grid")
       
      Example – setting the height using pixels:
      
       portlet.withHeight(800, "px") // == portlet.withHeight(800)
       
      Parameters:
      height - Specifies the height of the portlet (in unit).
      unit - Specifies the unit of the height (grid, px). If the unit is not specified then px is used as default.
      Returns:
      The current portlet object of the specified size.
      Since:
      12.0 - Clover Club
      See Also:
    • withLayout

      Portlet withLayout(int width, int height, String unit)
      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
       
      Parameters:
      width - Specifies the width of the portlet.
      height - Specifies the height of the portlet.
      unit - Specifies a unit of the layout (grid, px).
      Returns:
      The current portlet object of the specified size.
      Since:
      12.0 - Clover Club
      See Also: