Search in sources :

Example 16 with Style

use of net.sourceforge.nattable.style.Style in project translationstudio8 by heartsome.

the class DisplayColumnStyleEditorCommandHandler method saveState.

public void saveState(String prefix, Properties properties) {
    prefix = prefix + DOT + PERSISTENCE_PREFIX;
    for (Map.Entry<String, Style> labelToStyle : stylesToPersist.entrySet()) {
        Style style = labelToStyle.getValue();
        String label = labelToStyle.getKey();
        StylePersistor.saveStyle(prefix + DOT + label, properties, style);
    }
}
Also used : Style(net.sourceforge.nattable.style.Style) HashMap(java.util.HashMap) Map(java.util.Map)

Example 17 with Style

use of net.sourceforge.nattable.style.Style in project translationstudio8 by heartsome.

the class DefaultSelectionStyleConfiguration method configureSelectionStyle.

protected void configureSelectionStyle(IConfigRegistry configRegistry) {
    Style cellStyle = new Style();
    cellStyle.setAttributeValue(CellStyleAttributes.FONT, selectionFont);
    cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, selectionBgColor);
    cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR, selectionFgColor);
    configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle, DisplayMode.SELECT);
}
Also used : Style(net.sourceforge.nattable.style.Style) BorderStyle(net.sourceforge.nattable.style.BorderStyle)

Example 18 with Style

use of net.sourceforge.nattable.style.Style in project translationstudio8 by heartsome.

the class DefaultSelectionStyleConfiguration method configureHeaderHasSelectionStyle.

protected void configureHeaderHasSelectionStyle(IConfigRegistry configRegistry) {
    Style cellStyle = new Style();
    cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR, selectedHeaderFgColor);
    cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, selectedHeaderBgColor);
    cellStyle.setAttributeValue(CellStyleAttributes.FONT, selectedHeaderFont);
    cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE, selectedHeaderBorderStyle);
    configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle, DisplayMode.SELECT, GridRegion.COLUMN_HEADER);
    configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle, DisplayMode.SELECT, GridRegion.CORNER);
    configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle, DisplayMode.SELECT, GridRegion.ROW_HEADER);
}
Also used : Style(net.sourceforge.nattable.style.Style) BorderStyle(net.sourceforge.nattable.style.BorderStyle)

Example 19 with Style

use of net.sourceforge.nattable.style.Style in project translationstudio8 by heartsome.

the class DefaultSelectionStyleConfiguration method configureHeaderFullySelectedStyle.

protected void configureHeaderFullySelectedStyle(IConfigRegistry configRegistry) {
    // Header fully selected
    Style cellStyle = new Style() {

        {
            setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, GUIHelper.COLOR_WIDGET_NORMAL_SHADOW);
        }
    };
    configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle, DisplayMode.SELECT, SelectionStyleLabels.COLUMN_FULLY_SELECTED_STYLE);
    configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle, DisplayMode.SELECT, SelectionStyleLabels.ROW_FULLY_SELECTED_STYLE);
}
Also used : Style(net.sourceforge.nattable.style.Style) BorderStyle(net.sourceforge.nattable.style.BorderStyle)

Aggregations

Style (net.sourceforge.nattable.style.Style)19 BorderStyle (net.sourceforge.nattable.style.BorderStyle)9 TagStyle (net.heartsome.cat.common.innertag.TagStyle)3 HashMap (java.util.HashMap)1 Map (java.util.Map)1 XLIFFEditorCompositeLayerConfiguration (net.heartsome.cat.ts.ui.xliffeditor.nattable.config.XLIFFEditorCompositeLayerConfiguration)1 LineNumberPainter (net.heartsome.cat.ts.ui.xliffeditor.nattable.painter.LineNumberPainter)1 StatusPainter (net.heartsome.cat.ts.ui.xliffeditor.nattable.painter.StatusPainter)1 DefaultDisplayConverter (net.sourceforge.nattable.data.convert.DefaultDisplayConverter)1 ILayer (net.sourceforge.nattable.layer.ILayer)1 HorizontalAlignmentEnum (net.sourceforge.nattable.style.HorizontalAlignmentEnum)1 VerticalAlignmentEnum (net.sourceforge.nattable.style.VerticalAlignmentEnum)1 ColumnStyleEditorDialog (net.sourceforge.nattable.style.editor.ColumnStyleEditorDialog)1 Color (org.eclipse.swt.graphics.Color)1 Font (org.eclipse.swt.graphics.Font)1 FontData (org.eclipse.swt.graphics.FontData)1