Example usage for com.google.gwt.safehtml.shared SafeHtmlBuilder append

List of usage examples for com.google.gwt.safehtml.shared SafeHtmlBuilder append

Introduction

In this page you can find the example usage for com.google.gwt.safehtml.shared SafeHtmlBuilder append.

Prototype

public SafeHtmlBuilder append(SafeHtml html) 

Source Link

Document

Appends the contents of another SafeHtml object, without applying HTML-escaping to it.

Usage

From source file:org.drools.guvnor.client.widgets.tables.RuleEnabledStateCell.java

License:Apache License

@Override
public void render(Context context, Boolean value, SafeHtmlBuilder sb) {
    if (value) {//www .jav  a2s .com
        sb.append(shtml);
    }
}

From source file:org.drools.guvnor.client.widgets.tables.RuleFormatImageResourceCell.java

License:Apache License

@Override
public void render(Context context, RuleFormatImageResource value, SafeHtmlBuilder sb) {
    SafeHtml html = SafeHtmlUtils.fromTrustedString(AbstractImagePrototype.create(value).getHTML());
    sb.append(html);
}

From source file:org.drools.workbench.screens.enums.client.editor.EnumEditTextCell.java

License:Apache License

@Override
public void render(final Context context, final String value, final SafeHtmlBuilder sb) {
    final EnumRow enumRow = (EnumRow) context.getKey();
    if (!enumRow.disabled()) {
        doRender(context, value, sb);/*  w w  w  .  j  a v a  2  s.  c  om*/

    } else {
        if (!(value == null || value.isEmpty())) {
            sb.append(template.cellContent(EnumEditorResources.INSTANCE.css().disabled(),
                    EnumEditorConstants.INSTANCE.invalidDefinitionDisabled(), value));
        } else {
            sb.append(template.cellContent(EnumEditorResources.INSTANCE.css().disabled(),
                    EnumEditorConstants.INSTANCE.invalidDefinitionDisabled(), "\u00A0"));
        }
    }
}

From source file:org.drools.workbench.screens.guided.dtable.client.widget.analysis.panel.AnalysisLineCell.java

License:Apache License

@Override
public void render(final Context context, final Issue issue, final SafeHtmlBuilder safeHtmlBuilder) {
    safeHtmlBuilder.append(TEMPLATE.text(getStyleName(issue.getSeverity()), getIcon(issue.getSeverity()),
            getLineNumbers(issue.getRowNumbers()), issue.getTitle()));
}

From source file:org.drools.workbench.screens.guided.dtable.client.widget.auditlog.AuditLogEntryCell.java

License:Apache License

@Override
public void render(final Context context, final AuditLogEntry value, final SafeHtmlBuilder sb) {
    if (value == null) {
        return;//from  ww  w.j a  v  a 2 s .  co m
    }

    //Audit Log entry type and date
    final String eventTypeDisplayText = AuditLogEntryCellHelper.getEventTypeDisplayText(value.getGenericType());
    final String whenWhoDisplayText = GuidedDecisionTableConstants.INSTANCE
            .AuditLogEntryOn1(format.format(value.getDateOfEntry()), value.getUserName());
    sb.append(TEMPLATE.entrySummary(eventTypeDisplayText, whenWhoDisplayText));

    //Audit Log entry detail
    sb.append(helper.getSafeHtml(value));
}

From source file:org.drools.workbench.screens.guided.dtable.client.widget.auditlog.AuditLogEntryCellHelper.java

License:Apache License

private SafeHtml getSafeHtml(final InsertRowAuditLogEntry event) {
    SafeHtmlBuilder sb = new SafeHtmlBuilder();
    sb.append(TEMPLATE.commentHeader(
            GuidedDecisionTableConstants.INSTANCE.DecisionTableAuditLogInsertRowAt0(event.getRowIndex() + 1)));
    return sb.toSafeHtml();
}

From source file:org.drools.workbench.screens.guided.dtable.client.widget.auditlog.AuditLogEntryCellHelper.java

License:Apache License

private SafeHtml getSafeHtml(final DeleteRowAuditLogEntry event) {
    SafeHtmlBuilder sb = new SafeHtmlBuilder();
    sb.append(TEMPLATE.commentHeader(
            GuidedDecisionTableConstants.INSTANCE.DecisionTableAuditLogDeleteRowAt0(event.getRowIndex() + 1)));
    return sb.toSafeHtml();
}

From source file:org.drools.workbench.screens.guided.dtable.client.widget.auditlog.AuditLogEntryCellHelper.java

License:Apache License

private SafeHtml getSafeHtml(final DeleteColumnAuditLogEntry event) {
    SafeHtmlBuilder sb = new SafeHtmlBuilder();
    sb.append(TEMPLATE.commentHeader(
            GuidedDecisionTableConstants.INSTANCE.DecisionTableAuditLogDeleteColumn0(event.getColumnHeader())));
    return sb.toSafeHtml();
}

From source file:org.drools.workbench.screens.guided.dtable.client.widget.auditlog.AuditLogEntryCellHelper.java

License:Apache License

private void buildColumnDetailsInsert(final ColumnDetails details, final SafeHtmlBuilder sb) {
    if (details instanceof AttributeColumnDetails) {
        buildColumnDetailsInsert((AttributeColumnDetails) details, sb);
    } else if (details instanceof MetadataColumnDetails) {
        buildColumnDetailsInsert((MetadataColumnDetails) details, sb);
    } else if (details instanceof ConditionColumnDetails) {
        buildColumnDetailsInsert((ConditionColumnDetails) details, sb);
    } else if (details instanceof LimitedEntryConditionColumnDetails) {
        buildColumnDetailsInsert((LimitedEntryConditionColumnDetails) details, sb);
    } else if (details instanceof ActionInsertFactColumnDetails) {
        buildColumnDetailsInsert((ActionInsertFactColumnDetails) details, sb);
    } else if (details instanceof LimitedEntryActionInsertFactColumnDetails) {
        buildColumnDetailsInsert((LimitedEntryActionInsertFactColumnDetails) details, sb);
    } else if (details instanceof ActionSetFieldColumnDetails) {
        buildColumnDetailsInsert((ActionSetFieldColumnDetails) details, sb);
    } else if (details instanceof LimitedEntryActionSetFieldColumnDetails) {
        buildColumnDetailsInsert((LimitedEntryActionSetFieldColumnDetails) details, sb);
    } else if (details instanceof ActionWorkItemColumnDetails) {
        buildColumnDetailsInsert((ActionWorkItemColumnDetails) details, sb);
    } else if (details instanceof ActionWorkItemInsertFactColumnDetails) {
        buildColumnDetailsInsert((ActionWorkItemInsertFactColumnDetails) details, sb);
    } else if (details instanceof ActionWorkItemSetFieldColumnDetails) {
        buildColumnDetailsInsert((ActionWorkItemSetFieldColumnDetails) details, sb);
    } else {//from   w  w w .  j ava 2s.  c o m
        sb.append(TEMPLATE.commentHeader(GuidedDecisionTableConstants.INSTANCE
                .DecisionTableAuditLogInsertColumn0(details.getColumnHeader())));
    }
}

From source file:org.drools.workbench.screens.guided.dtable.client.widget.auditlog.AuditLogEntryCellHelper.java

License:Apache License

private void buildColumnDetailsInsert(final AttributeColumnDetails details, final SafeHtmlBuilder sb) {
    sb.append(TEMPLATE.commentHeader(GuidedDecisionTableConstants.INSTANCE
            .DecisionTableAuditLogInsertAttribute0(details.getAttribute())));
}