Examples of StyleBuilder


Examples of ar.com.fdvs.dj.domain.builders.StyleBuilder

    // Add the columns to the report in the whished order
    drb.addColumn(colRightName);
    drb.addColumn(colRightType);

    // TEST
    Style atStyle = new StyleBuilder(true).setFont(Font.VERDANA_SMALL).setTextColor(Color.red).build();
    /**
     * Adding many autotexts in the same position (header/footer and
     * aligment) makes them to be one on top of the other
     */

 
View Full Code Here

Examples of ar.com.fdvs.dj.domain.builders.StyleBuilder

  private DynamicReport createLetterHead() {

    FastReportBuilder rb = new FastReportBuilder();

    // TEST
    Style atStyle = new StyleBuilder(true).setFont(Font.COMIC_SANS_SMALL).setTextColor(Color.red).build();
    /**
     * Adding many autotexts in the same position (header/footer and
     * aligment) makes them to be one on top of the other
     */

 
View Full Code Here

Examples of ar.com.fdvs.dj.domain.builders.StyleBuilder

    /**
     * Adding many autotexts in the same position (header/footer and
     * aligment) makes them to be one on top of the other
     */
    Style atStyle = new StyleBuilder(true).setFont(Font.COMIC_SANS_SMALL).setTextColor(Color.red).build();

    AutoText created = new AutoText(Labels.getLabel("common.Created") + ": " + ZksampleDateFormat.getDateTimeFormater().format(new Date()), AutoText.POSITION_HEADER, HorizontalBandAlignment.RIGHT);
    created.setWidth(new Integer(120));
    created.setStyle(atStyle);
    drb.addAutoText(created);
View Full Code Here

Examples of de.lessvoid.nifty.builder.StyleBuilder

    }}.build(nifty);
    return screen;
  }

  private static void registerMenuButtonHintStyle(final Nifty nifty) {
    new StyleBuilder() {{
      id("special-hint");
      base("nifty-panel-bright");
      childLayoutCenter();
      onShowEffect(new EffectBuilder("fade") {{
        length(150);
        effectParameter("start", "#0");
        effectParameter("end", "#d");
        inherit();
        neverStopRendering(true);
      }});
      onShowEffect(new EffectBuilder("move") {{
        length(150);
        inherit();
        neverStopRendering(true);
        effectParameter("mode", "fromOffset");
        effectParameter("offsetY", "-15");
      }});
      onCustomEffect(new EffectBuilder("fade") {{
        length(150);
        effectParameter("start", "#d");
        effectParameter("end", "#0");
        inherit();
        neverStopRendering(true);
      }});
      onCustomEffect(new EffectBuilder("move") {{
        length(150);
        inherit();
        neverStopRendering(true);
        effectParameter("mode", "toOffset");
        effectParameter("offsetY", "-15");
      }});
    }}.build(nifty);

    new StyleBuilder() {{
      id("special-hint#hint-text");
      base("base-font");
      alignLeft();
      valignCenter();
      textHAlignLeft();
View Full Code Here

Examples of de.lessvoid.nifty.builder.StyleBuilder

      color(new Color("#000f"));
    }}.build(nifty);
  }

  private static void registerStyles(final Nifty nifty) {
    new StyleBuilder() {{
      id("base-font-link");
      base("base-font");
      color("#8fff");
      interactOnRelease("$action");
      onHoverEffect(new HoverEffectBuilder("changeMouseCursor") {{
        effectParameter("id", "hand");
      }});
    }}.build(nifty);

    new StyleBuilder() {{
      id("creditsImage");
      alignCenter();
    }}.build(nifty);

    new StyleBuilder() {{
      id("creditsCaption");
      font("verdana-48-regular.fnt");
      width("100%");
      textHAlignCenter();
    }}.build(nifty);

    new StyleBuilder() {{
      id("creditsCenter");
      base("base-font");
      width("100%");
      textHAlignCenter();
    }}.build(nifty);
View Full Code Here

Examples of org.apache.metamodel.data.StyleBuilder

        final Table table = dc.getDefaultSchema().getTables()[0];
        final Column nameColumn = table.getColumnByName("name");
        dc.executeUpdate(new UpdateScript() {
            @Override
            public void run(UpdateCallback cb) {
                Style clownStyle = new StyleBuilder().bold().foreground(255, 0, 0).background(0, 0, 255).create();

                Style thirtyStyle = new StyleBuilder().italic().underline().centerAligned().foreground(10, 10, 200)
                        .create();

                cb.insertInto(table).value("id", 1000).value(nameColumn, "pennywise the [clown]", clownStyle)
                        .value("gender", "male").value("age", 30, thirtyStyle).execute();
            }
View Full Code Here

Examples of org.apache.metamodel.data.StyleBuilder

        _sharedStringTable = xssfReader.getSharedStringsTable();
        _stylesTable = xssfReader.getStylesTable();

        _value = new StringBuilder();
        _style = new StyleBuilder();
        _rowValues = new ArrayList<String>();
        _styles = new ArrayList<Style>();
        _rowNumber = -1;
        _inCell = false;
        _inFormula = false;
View Full Code Here

Examples of org.apache.metamodel.data.StyleBuilder

        }
        final CellStyle cellStyle = cell.getCellStyle();

        final short fontIndex = cellStyle.getFontIndex();
        final Font font = workbook.getFontAt(fontIndex);
        final StyleBuilder styleBuilder = new StyleBuilder();

        // Font bold, italic, underline
        if (font.getBoldweight() >= Font.BOLDWEIGHT_BOLD) {
            styleBuilder.bold();
        }
        if (font.getItalic()) {
            styleBuilder.italic();
        }
        if (font.getUnderline() != FontUnderline.NONE.getByteValue()) {
            styleBuilder.underline();
        }

        // Font size
        final Font stdFont = workbook.getFontAt((short) 0);
        final short fontSize = font.getFontHeightInPoints();
        if (stdFont.getFontHeightInPoints() != fontSize) {
            styleBuilder.fontSize(fontSize, SizeUnit.PT);
        }

        // Font color
        final short colorIndex = font.getColor();
        if (font instanceof HSSFFont) {
            if (colorIndex != HSSFFont.COLOR_NORMAL) {
                final HSSFWorkbook wb = (HSSFWorkbook) workbook;
                HSSFColor color = wb.getCustomPalette().getColor(colorIndex);
                if (color != null) {
                    short[] triplet = color.getTriplet();
                    styleBuilder.foreground(triplet);
                }
            }
        } else if (font instanceof XSSFFont) {
            XSSFFont xssfFont = (XSSFFont) font;

            XSSFColor color = xssfFont.getXSSFColor();
            if (color != null) {
                String argbHex = color.getARGBHex();
                if (argbHex != null) {
                    styleBuilder.foreground(argbHex.substring(2));
                }
            }
        } else {
            throw new IllegalStateException("Unexpected font type: " + (font == null ? "null" : font.getClass()) + ")");
        }

        // Background color
        if (cellStyle.getFillPattern() == 1) {
            Color color = cellStyle.getFillForegroundColorColor();
            if (color instanceof HSSFColor) {
                short[] triplet = ((HSSFColor) color).getTriplet();
                if (triplet != null) {
                    styleBuilder.background(triplet);
                }
            } else if (color instanceof XSSFColor) {
                String argb = ((XSSFColor) color).getARGBHex();
                if (argb != null) {
                    styleBuilder.background(argb.substring(2));
                }
            } else {
                throw new IllegalStateException("Unexpected color type: " + (color == null ? "null" : color.getClass()) + ")");
            }
        }

        // alignment
        switch (cellStyle.getAlignment()) {
        case CellStyle.ALIGN_LEFT:
            styleBuilder.leftAligned();
            break;
        case CellStyle.ALIGN_RIGHT:
            styleBuilder.rightAligned();
            break;
        case CellStyle.ALIGN_CENTER:
            styleBuilder.centerAligned();
            break;
        case CellStyle.ALIGN_JUSTIFY:
            styleBuilder.justifyAligned();
            break;
        }

        return styleBuilder.create();
    }
View Full Code Here

Examples of org.apache.metamodel.data.StyleBuilder

    _sharedStringTable = xssfReader.getSharedStringsTable();
    _stylesTable = xssfReader.getStylesTable();

    _value = new StringBuilder();
    _style = new StyleBuilder();
    _rowValues = new ArrayList<String>();
    _styles = new ArrayList<Style>();
    _rowNumber = -1;
    _inCell = false;
    _inFormula = false;
View Full Code Here

Examples of org.apache.metamodel.data.StyleBuilder

        final Table table = dc.getDefaultSchema().getTables()[0];
        final Column nameColumn = table.getColumnByName("name");
        dc.executeUpdate(new UpdateScript() {
            @Override
            public void run(UpdateCallback cb) {
                Style clownStyle = new StyleBuilder().bold().foreground(255, 0, 0).background(0, 0, 255).create();

                Style thirtyStyle = new StyleBuilder().italic().underline().centerAligned().foreground(10, 10, 200).create();

                cb.insertInto(table).value("id", 1000).value(nameColumn, "pennywise the [clown]", clownStyle)
                        .value("gender", "male").value("age", 30, thirtyStyle).execute();
            }
        });
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.