Class DefaultHierarchicalTreeLayerThemeExtension

    • Field Detail

      • defaultBgColor

        public org.eclipse.swt.graphics.Color defaultBgColor
      • defaultFgColor

        public org.eclipse.swt.graphics.Color defaultFgColor
      • defaultGradientBgColor

        public org.eclipse.swt.graphics.Color defaultGradientBgColor
      • defaultGradientFgColor

        public org.eclipse.swt.graphics.Color defaultGradientFgColor
      • defaultFont

        public org.eclipse.swt.graphics.Font defaultFont
      • defaultImage

        public org.eclipse.swt.graphics.Image defaultImage
      • defaultBorderStyle

        public BorderStyle defaultBorderStyle
      • defaultPWEchoChar

        public Character defaultPWEchoChar
      • defaultCellPainter

        public ICellPainter defaultCellPainter
      • treeBgColor

        public org.eclipse.swt.graphics.Color treeBgColor
      • treeFgColor

        public org.eclipse.swt.graphics.Color treeFgColor
      • treeGradientBgColor

        public org.eclipse.swt.graphics.Color treeGradientBgColor
      • treeGradientFgColor

        public org.eclipse.swt.graphics.Color treeGradientFgColor
      • treeFont

        public org.eclipse.swt.graphics.Font treeFont
      • treeImage

        public org.eclipse.swt.graphics.Image treeImage
      • treePWEchoChar

        public Character treePWEchoChar
      • treeSelectionBgColor

        public org.eclipse.swt.graphics.Color treeSelectionBgColor
      • treeSelectionFgColor

        public org.eclipse.swt.graphics.Color treeSelectionFgColor
      • treeSelectionGradientBgColor

        public org.eclipse.swt.graphics.Color treeSelectionGradientBgColor
      • treeSelectionGradientFgColor

        public org.eclipse.swt.graphics.Color treeSelectionGradientFgColor
      • treeSelectionFont

        public org.eclipse.swt.graphics.Font treeSelectionFont
      • treeSelectionImage

        public org.eclipse.swt.graphics.Image treeSelectionImage
      • treeSelectionBorderStyle

        public BorderStyle treeSelectionBorderStyle
      • treeSelectionPWEchoChar

        public Character treeSelectionPWEchoChar
      • levelHeaderBgColor

        public org.eclipse.swt.graphics.Color levelHeaderBgColor
      • levelHeaderFgColor

        public org.eclipse.swt.graphics.Color levelHeaderFgColor
      • levelHeaderGradientBgColor

        public org.eclipse.swt.graphics.Color levelHeaderGradientBgColor
      • levelHeaderGradientFgColor

        public org.eclipse.swt.graphics.Color levelHeaderGradientFgColor
      • levelHeaderFont

        public org.eclipse.swt.graphics.Font levelHeaderFont
      • levelHeaderImage

        public org.eclipse.swt.graphics.Image levelHeaderImage
      • levelHeaderBorderStyle

        public BorderStyle levelHeaderBorderStyle
      • levelHeaderPWEchoChar

        public Character levelHeaderPWEchoChar
      • levelHeaderSelectionBgColor

        public org.eclipse.swt.graphics.Color levelHeaderSelectionBgColor
      • levelHeaderSelectionFgColor

        public org.eclipse.swt.graphics.Color levelHeaderSelectionFgColor
      • levelHeaderSelectionGradientBgColor

        public org.eclipse.swt.graphics.Color levelHeaderSelectionGradientBgColor
      • levelHeaderSelectionGradientFgColor

        public org.eclipse.swt.graphics.Color levelHeaderSelectionGradientFgColor
      • levelHeaderSelectionFont

        public org.eclipse.swt.graphics.Font levelHeaderSelectionFont
      • levelHeaderSelectionImage

        public org.eclipse.swt.graphics.Image levelHeaderSelectionImage
      • levelHeaderSelectionBorderStyle

        public BorderStyle levelHeaderSelectionBorderStyle
      • levelHeaderSelectionPWEchoChar

        public Character levelHeaderSelectionPWEchoChar
      • levelHeaderSelectionTextDecoration

        public TextDecorationEnum levelHeaderSelectionTextDecoration
      • evenRowBgColor

        public org.eclipse.swt.graphics.Color evenRowBgColor
      • evenRowFgColor

        public org.eclipse.swt.graphics.Color evenRowFgColor
      • evenRowGradientBgColor

        public org.eclipse.swt.graphics.Color evenRowGradientBgColor
      • evenRowGradientFgColor

        public org.eclipse.swt.graphics.Color evenRowGradientFgColor
      • evenRowFont

        public org.eclipse.swt.graphics.Font evenRowFont
      • evenRowImage

        public org.eclipse.swt.graphics.Image evenRowImage
      • evenRowBorderStyle

        public BorderStyle evenRowBorderStyle
      • evenRowPWEchoChar

        public Character evenRowPWEchoChar
      • oddRowBgColor

        public org.eclipse.swt.graphics.Color oddRowBgColor
      • oddRowFgColor

        public org.eclipse.swt.graphics.Color oddRowFgColor
      • oddRowGradientBgColor

        public org.eclipse.swt.graphics.Color oddRowGradientBgColor
      • oddRowGradientFgColor

        public org.eclipse.swt.graphics.Color oddRowGradientFgColor
      • oddRowFont

        public org.eclipse.swt.graphics.Font oddRowFont
      • oddRowImage

        public org.eclipse.swt.graphics.Image oddRowImage
      • oddRowBorderStyle

        public BorderStyle oddRowBorderStyle
      • oddRowPWEchoChar

        public Character oddRowPWEchoChar
      • treeSelectionCellPainter

        public ICellPainter treeSelectionCellPainter
      • treeStructurePainter

        public ICellPainter treeStructurePainter
      • treeStructureSelectionPainter

        public ICellPainter treeStructureSelectionPainter
      • collapsedChildPainter

        public ICellPainter collapsedChildPainter
      • levelHeaderCellPainter

        public ICellPainter levelHeaderCellPainter
      • levelHeaderSelectionCellPainter

        public ICellPainter levelHeaderSelectionCellPainter
      • evenRowCellPainter

        public ICellPainter evenRowCellPainter
    • Constructor Detail

      • DefaultHierarchicalTreeLayerThemeExtension

        public DefaultHierarchicalTreeLayerThemeExtension()
    • Method Detail

      • createPainterInstances

        public void createPainterInstances()
        Description copied from interface: IThemeExtension
        Method that is used to create the painter instances that should be registered for styling. Needed to update painters in case zoom operations
        Specified by:
        createPainterInstances in interface IThemeExtension
      • registerStyles

        public void registerStyles​(IConfigRegistry configRegistry)
        Description copied from interface: IThemeExtension
        Register the style configurations that should be added by this IThemeExtension.
        Specified by:
        registerStyles in interface IThemeExtension
        Parameters:
        configRegistry - The IConfigRegistry that is used by the NatTable instance to which the style configurations should be registered.
      • configureDefaultStyle

        protected void configureDefaultStyle​(IConfigRegistry configRegistry)
        Register default style configurations. Typically these configurations are used be the body region and will be overridden by more specific configurations of the header regions or custom styling based on labels.

        It is necessary to override the default configuration provided by the base ThemeConfiguration to render the hierarchical representation correctly. Especially the horizontal and vertical alignment need to be adjusted from the default.

        Parameters:
        configRegistry - The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
      • getDefaultCellStyle

        protected IStyle getDefaultCellStyle()
        Returns:
        The IStyle that should be used by default to render NatTable.
      • getDefaultCellPainter

        protected ICellPainter getDefaultCellPainter()
        Returns the default ICellPainter that is used to render the NatTable.

        Typically this ICellPainter is used to render the body region and is overridden for other regions or other custom styling configurations based on labels.

        Returns:
        The ICellPainter that should be used by default to render NatTable.
      • configureTreeStyle

        protected void configureTreeStyle​(IConfigRegistry configRegistry)
        This method is used to register style configurations for a tree representation. It will only be applied in case a TreeLayer is involved, which adds the configuration label TreeLayer.TREE_COLUMN_CELL to the tree column.
        Parameters:
        configRegistry - The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
      • configureLevelHeaderStyle

        protected void configureLevelHeaderStyle​(IConfigRegistry configRegistry)
        By default the levels in a HierarchicalTreeLayer are separated by additional level header columns. Those columns are marked with the label HierarchicalTreeLayer.LEVEL_HEADER_CELL. In this method the styling for those cells can be configured.
        Parameters:
        configRegistry - The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
      • getTreeStructurePainter

        protected ICellPainter getTreeStructurePainter()
        Returns the ICellPainter that should be used to render the tree structure in a NatTable. It needs to be an IndentedTreeImagePainter to show the expand/collapsed state aswell as the indentation for the tree level. It that can be wrapped with several CellPainterWrapper. If there is no IndentedTreeImagePainter in the painter hierarchy, this configuration attribute will be ignored by the TreeLayer.
        Returns:
        The IndentedTreeImagePainter that should be used to render the tree structure in a NatTable.
      • getTreeStructureSelectionPainter

        protected ICellPainter getTreeStructureSelectionPainter()
        Returns the ICellPainter that should be used to render the selected tree structure in a NatTable. It needs to be an IndentedTreeImagePainter to show the expand/collapsed state aswell as the indentation for the tree level. It that can be wrapped with several CellPainterWrapper. If there is no IndentedTreeImagePainter in the painter hierarchy, this configuration attribute will be ignored by the TreeLayer.
        Returns:
        The IndentedTreeImagePainter that should be used to render the selected tree structure in a NatTable.
      • getTreeStyle

        protected IStyle getTreeStyle()
        Returns the IStyle that should be used to render the tree column cells in a NatTable.

        That means this IStyle is registered against DisplayMode.NORMAL and the configuration label TreeLayer.TREE_COLUMN_CELL.

        If this method returns null, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.

        Returns:
        The IStyle that should be used to render the tree column in a NatTable.
      • getTreeSelectionStyle

        protected IStyle getTreeSelectionStyle()
        Returns the IStyle that should be used to render the selected tree column cells in a NatTable.

        That means this IStyle is registered against DisplayMode.SELECT and the configuration label TreeLayer.TREE_COLUMN_CELL.

        If this method returns null, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.

        Returns:
        The IStyle that should be used to render the selected tree column in a NatTable.
      • getLevelHeaderStyle

        protected IStyle getLevelHeaderStyle()
        Returns the IStyle that should be used to render the level header column cells in a NatTable.

        That means this IStyle is registered against DisplayMode.NORMAL and the configuration label HierarchicalTreeLayer.LEVEL_HEADER_CELL.

        If this method returns null, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.

        Returns:
        The IStyle that should be used to render the tree column in a NatTable.
      • getLevelHeaderSelectionStyle

        protected IStyle getLevelHeaderSelectionStyle()
        Returns the IStyle that should be used to render the selected level header column cells in a NatTable.

        That means this IStyle is registered against DisplayMode.SELECT and the configuration label HierarchicalTreeLayer.LEVEL_HEADER_CELL.

        If this method returns null, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.

        Returns:
        The IStyle that should be used to render the selected tree column in a NatTable.
      • unregisterStyles

        public void unregisterStyles​(IConfigRegistry configRegistry)
        Description copied from interface: IThemeExtension
        Unregister the style configurations that were registered by this IThemeExtension.
        Specified by:
        unregisterStyles in interface IThemeExtension
        Parameters:
        configRegistry - The IConfigRegistry that is used by the NatTable instance to which the style configurations were applied to.