Search in sources :

Example 56 with Style

use of org.eclipse.nebula.widgets.nattable.style.Style in project nebula.widgets.nattable by eclipse.

the class DefaultGroupByThemeExtension method getGroupByHintStyle.

/**
 * @return The {@link IStyle} that should be used to render the GroupBy
 *         hint.
 */
protected IStyle getGroupByHintStyle() {
    IStyle cellStyle = new Style();
    cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, this.groupByHintBgColor);
    cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR, this.groupByHintFgColor);
    cellStyle.setAttributeValue(CellStyleAttributes.GRADIENT_BACKGROUND_COLOR, this.groupByHintGradientBgColor);
    cellStyle.setAttributeValue(CellStyleAttributes.GRADIENT_FOREGROUND_COLOR, this.groupByHintGradientFgColor);
    cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT, this.groupByHintHAlign);
    cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT, this.groupByHintVAlign);
    cellStyle.setAttributeValue(CellStyleAttributes.FONT, this.groupByHintFont);
    cellStyle.setAttributeValue(CellStyleAttributes.IMAGE, this.groupByHintImage);
    cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE, this.groupByHintBorderStyle);
    cellStyle.setAttributeValue(CellStyleAttributes.PASSWORD_ECHO_CHAR, this.groupByHintPWEchoChar);
    cellStyle.setAttributeValue(CellStyleAttributes.TEXT_DECORATION, this.groupByHintTextDecoration);
    return cellStyle;
}
Also used : IStyle(org.eclipse.nebula.widgets.nattable.style.IStyle) IStyle(org.eclipse.nebula.widgets.nattable.style.IStyle) Style(org.eclipse.nebula.widgets.nattable.style.Style) BorderStyle(org.eclipse.nebula.widgets.nattable.style.BorderStyle)

Example 57 with Style

use of org.eclipse.nebula.widgets.nattable.style.Style in project nebula.widgets.nattable by eclipse.

the class DefaultGroupByThemeExtension method getGroupByStyle.

/**
 * Returns the {@link IStyle} that should be used to render the GroupBy
 * region in a NatTable.
 * <p>
 * That means this {@link IStyle} is registered against
 * {@link DisplayMode#NORMAL} and the configuration label
 * {@link GroupByHeaderLayer#GROUP_BY_REGION}.
 * </p>
 * <p>
 * If this method returns <code>null</code>, 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.
 * </p>
 *
 * @return The {@link IStyle} that should be used to render the GroupBy
 *         region in a NatTable.
 */
protected IStyle getGroupByStyle() {
    IStyle cellStyle = new Style();
    cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, this.groupByBgColor);
    cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR, this.groupByFgColor);
    cellStyle.setAttributeValue(CellStyleAttributes.GRADIENT_BACKGROUND_COLOR, this.groupByGradientBgColor);
    cellStyle.setAttributeValue(CellStyleAttributes.GRADIENT_FOREGROUND_COLOR, this.groupByGradientFgColor);
    cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT, this.groupByHAlign);
    cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT, this.groupByVAlign);
    cellStyle.setAttributeValue(CellStyleAttributes.FONT, this.groupByFont);
    cellStyle.setAttributeValue(CellStyleAttributes.IMAGE, this.groupByImage);
    cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE, this.groupByBorderStyle);
    cellStyle.setAttributeValue(CellStyleAttributes.PASSWORD_ECHO_CHAR, this.groupByPWEchoChar);
    cellStyle.setAttributeValue(CellStyleAttributes.TEXT_DECORATION, this.groupByTextDecoration);
    return cellStyle;
}
Also used : IStyle(org.eclipse.nebula.widgets.nattable.style.IStyle) IStyle(org.eclipse.nebula.widgets.nattable.style.IStyle) Style(org.eclipse.nebula.widgets.nattable.style.Style) BorderStyle(org.eclipse.nebula.widgets.nattable.style.BorderStyle)

Example 58 with Style

use of org.eclipse.nebula.widgets.nattable.style.Style in project nebula.widgets.nattable by eclipse.

the class DefaultGroupByThemeExtension method getGroupByObjectSelectionStyle.

/**
 * Returns the {@link IStyle} that should be used to render the selected
 * GroupBy object rows in a NatTable.
 * <p>
 * That means this {@link IStyle} is registered against
 * {@link DisplayMode#SELECT} and the configuration label
 * {@link GroupByDataLayer#GROUP_BY_OBJECT}.
 * </p>
 * <p>
 * If this method returns <code>null</code>, 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.
 * </p>
 *
 * @return The {@link IStyle} that should be used to render the selected
 *         GroupBy object rows in a NatTable.
 */
protected IStyle getGroupByObjectSelectionStyle() {
    IStyle cellStyle = new Style();
    cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, this.groupByObjectSelectionBgColor);
    cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR, this.groupByObjectSelectionFgColor);
    cellStyle.setAttributeValue(CellStyleAttributes.GRADIENT_BACKGROUND_COLOR, this.groupByObjectSelectionGradientBgColor);
    cellStyle.setAttributeValue(CellStyleAttributes.GRADIENT_FOREGROUND_COLOR, this.groupByObjectSelectionGradientFgColor);
    cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT, this.groupByObjectSelectionHAlign);
    cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT, this.groupByObjectSelectionVAlign);
    cellStyle.setAttributeValue(CellStyleAttributes.FONT, this.groupByObjectSelectionFont);
    cellStyle.setAttributeValue(CellStyleAttributes.IMAGE, this.groupByObjectSelectionImage);
    cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE, this.groupByObjectSelectionBorderStyle);
    cellStyle.setAttributeValue(CellStyleAttributes.PASSWORD_ECHO_CHAR, this.groupByObjectSelectionPWEchoChar);
    cellStyle.setAttributeValue(CellStyleAttributes.TEXT_DECORATION, this.groupByObjectSelectionTextDecoration);
    return cellStyle;
}
Also used : IStyle(org.eclipse.nebula.widgets.nattable.style.IStyle) IStyle(org.eclipse.nebula.widgets.nattable.style.IStyle) Style(org.eclipse.nebula.widgets.nattable.style.Style) BorderStyle(org.eclipse.nebula.widgets.nattable.style.BorderStyle)

Example 59 with Style

use of org.eclipse.nebula.widgets.nattable.style.Style in project nebula.widgets.nattable by eclipse.

the class DefaultGroupByThemeExtension method getGroupBySummarySelectionStyle.

/**
 * Returns the {@link IStyle} that should be used to render the selected
 * GroupBy row summary cells in a NatTable.
 * <p>
 * That means this {@link IStyle} is registered against
 * {@link DisplayMode#SELECT} and the configuration label
 * {@link GroupByDataLayer#GROUP_BY_SUMMARY}.
 * </p>
 * <p>
 * If this method returns <code>null</code>, 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.
 * </p>
 *
 * @return The {@link IStyle} that should be used to render the selected
 *         GroupBy summary row cells in a NatTable.
 */
protected IStyle getGroupBySummarySelectionStyle() {
    IStyle cellStyle = new Style();
    cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, this.groupBySummarySelectionBgColor);
    cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR, this.groupBySummarySelectionFgColor);
    cellStyle.setAttributeValue(CellStyleAttributes.GRADIENT_BACKGROUND_COLOR, this.groupBySummarySelectionGradientBgColor);
    cellStyle.setAttributeValue(CellStyleAttributes.GRADIENT_FOREGROUND_COLOR, this.groupBySummarySelectionGradientFgColor);
    cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT, this.groupBySummarySelectionHAlign);
    cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT, this.groupBySummarySelectionVAlign);
    cellStyle.setAttributeValue(CellStyleAttributes.FONT, this.groupBySummarySelectionFont);
    cellStyle.setAttributeValue(CellStyleAttributes.IMAGE, this.groupBySummarySelectionImage);
    cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE, this.groupBySummarySelectionBorderStyle);
    cellStyle.setAttributeValue(CellStyleAttributes.PASSWORD_ECHO_CHAR, this.groupBySummarySelectionPWEchoChar);
    cellStyle.setAttributeValue(CellStyleAttributes.TEXT_DECORATION, this.groupBySummarySelectionTextDecoration);
    return cellStyle;
}
Also used : IStyle(org.eclipse.nebula.widgets.nattable.style.IStyle) IStyle(org.eclipse.nebula.widgets.nattable.style.IStyle) Style(org.eclipse.nebula.widgets.nattable.style.Style) BorderStyle(org.eclipse.nebula.widgets.nattable.style.BorderStyle)

Example 60 with Style

use of org.eclipse.nebula.widgets.nattable.style.Style in project nebula.widgets.nattable by eclipse.

the class DefaultGroupByThemeExtension method getGroupByObjectStyle.

/**
 * Returns the {@link IStyle} that should be used to render the GroupBy
 * object rows in a NatTable.
 * <p>
 * That means this {@link IStyle} is registered against
 * {@link DisplayMode#NORMAL} and the configuration label
 * {@link GroupByDataLayer#GROUP_BY_OBJECT}.
 * </p>
 * <p>
 * If this method returns <code>null</code>, 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.
 * </p>
 *
 * @return The {@link IStyle} that should be used to render the GroupBy
 *         object rows in a NatTable.
 */
protected IStyle getGroupByObjectStyle() {
    IStyle cellStyle = new Style();
    cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, this.groupByObjectBgColor);
    cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR, this.groupByObjectFgColor);
    cellStyle.setAttributeValue(CellStyleAttributes.GRADIENT_BACKGROUND_COLOR, this.groupByObjectGradientBgColor);
    cellStyle.setAttributeValue(CellStyleAttributes.GRADIENT_FOREGROUND_COLOR, this.groupByObjectGradientFgColor);
    cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT, this.groupByObjectHAlign);
    cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT, this.groupByObjectVAlign);
    cellStyle.setAttributeValue(CellStyleAttributes.FONT, this.groupByObjectFont);
    cellStyle.setAttributeValue(CellStyleAttributes.IMAGE, this.groupByObjectImage);
    cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE, this.groupByObjectBorderStyle);
    cellStyle.setAttributeValue(CellStyleAttributes.PASSWORD_ECHO_CHAR, this.groupByObjectPWEchoChar);
    cellStyle.setAttributeValue(CellStyleAttributes.TEXT_DECORATION, this.groupByObjectTextDecoration);
    return cellStyle;
}
Also used : IStyle(org.eclipse.nebula.widgets.nattable.style.IStyle) IStyle(org.eclipse.nebula.widgets.nattable.style.IStyle) Style(org.eclipse.nebula.widgets.nattable.style.Style) BorderStyle(org.eclipse.nebula.widgets.nattable.style.BorderStyle)

Aggregations

Style (org.eclipse.nebula.widgets.nattable.style.Style)115 BorderStyle (org.eclipse.nebula.widgets.nattable.style.BorderStyle)60 IStyle (org.eclipse.nebula.widgets.nattable.style.IStyle)52 DefaultNatTableStyleConfiguration (org.eclipse.nebula.widgets.nattable.config.DefaultNatTableStyleConfiguration)18 IConfigRegistry (org.eclipse.nebula.widgets.nattable.config.IConfigRegistry)17 NatTable (org.eclipse.nebula.widgets.nattable.NatTable)16 HashMap (java.util.HashMap)15 AbstractRegistryConfiguration (org.eclipse.nebula.widgets.nattable.config.AbstractRegistryConfiguration)15 IDataProvider (org.eclipse.nebula.widgets.nattable.data.IDataProvider)13 DataLayer (org.eclipse.nebula.widgets.nattable.layer.DataLayer)13 ConfigRegistry (org.eclipse.nebula.widgets.nattable.config.ConfigRegistry)12 DefaultColumnHeaderDataProvider (org.eclipse.nebula.widgets.nattable.grid.data.DefaultColumnHeaderDataProvider)12 ColumnHeaderLayer (org.eclipse.nebula.widgets.nattable.grid.layer.ColumnHeaderLayer)12 ILayer (org.eclipse.nebula.widgets.nattable.layer.ILayer)12 DefaultColumnHeaderDataLayer (org.eclipse.nebula.widgets.nattable.grid.layer.DefaultColumnHeaderDataLayer)11 GridLayer (org.eclipse.nebula.widgets.nattable.grid.layer.GridLayer)11 DefaultCornerDataProvider (org.eclipse.nebula.widgets.nattable.grid.data.DefaultCornerDataProvider)10 CornerLayer (org.eclipse.nebula.widgets.nattable.grid.layer.CornerLayer)10 DefaultRowHeaderDataLayer (org.eclipse.nebula.widgets.nattable.grid.layer.DefaultRowHeaderDataLayer)10 RowHeaderLayer (org.eclipse.nebula.widgets.nattable.grid.layer.RowHeaderLayer)10