org.apache.maven.doxia.sink.Sink.figureGraphics()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(6.6k)|赞(0)|评价(0)|浏览(111)

本文整理了Java中org.apache.maven.doxia.sink.Sink.figureGraphics()方法的一些代码示例,展示了Sink.figureGraphics()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Sink.figureGraphics()方法的具体详情如下:
包路径:org.apache.maven.doxia.sink.Sink
类名称:Sink
方法名:figureGraphics

Sink.figureGraphics介绍

暂无

代码示例

代码示例来源:origin: apache/maven-surefire

private static void sinkIcon( String type, Sink sink )
{
  sink.figure();
  if ( type.startsWith( "junit.framework" ) || "skipped".equals( type ) )
  {
    sink.figureGraphics( "images/icon_warning_sml.gif" );
  }
  else if ( type.startsWith( "success" ) )
  {
    sink.figureGraphics( "images/icon_success_sml.gif" );
  }
  else
  {
    sink.figureGraphics( "images/icon_error_sml.gif" );
  }
  sink.figure_();
}

代码示例来源:origin: org.apache.maven.plugins/maven-surefire-report-plugin

private static void sinkIcon( String type, Sink sink )
{
  sink.figure();
  if ( type.startsWith( "junit.framework" ) || "skipped".equals( type ) )
  {
    sink.figureGraphics( "images/icon_warning_sml.gif" );
  }
  else if ( type.startsWith( "success" ) )
  {
    sink.figureGraphics( "images/icon_success_sml.gif" );
  }
  else
  {
    sink.figureGraphics( "images/icon_error_sml.gif" );
  }
  sink.figure_();
}

代码示例来源:origin: org.apache.maven.doxia/doxia-module-docbook-simple

private void handleImageDataStart( Sink sink, SinkEventAttributeSet attribs )
    throws XmlPullParserException
{
  final Object fileref = attribs.getAttribute( SimplifiedDocbookMarkup.FILEREF_ATTRIBUTE );
  if ( fileref == null )
  {
    throw new XmlPullParserException( "Missing fileref attribute in imagedata!" );
  }
  sink.figureGraphics( fileref.toString(), attribs );
}

代码示例来源:origin: mojohaus/versions-maven-plugin

protected void renderSuccessIcon()
{
  sink.figure();
  sink.figureGraphics( "images/icon_success_sml.gif" );
  sink.figure_();
}

代码示例来源:origin: mojohaus/license-maven-plugin

protected void renderWarningIcon()
{
  sink.figure();
  sink.figureGraphics( "images/icon_warning_sml.gif" );
  sink.figure_();
}

代码示例来源:origin: org.codehaus.mojo/versions-maven-plugin

protected void renderSuccessIcon()
{
  sink.figure();
  sink.figureGraphics( "images/icon_success_sml.gif" );
  sink.figure_();
}

代码示例来源:origin: org.codehaus.mojo/versions-maven-plugin

protected void renderWarningIcon()
{
  sink.figure();
  sink.figureGraphics( "images/icon_warning_sml.gif" );
  sink.figure_();
}

代码示例来源:origin: org.apache.maven.doxia/doxia-module-twiki

/** {@inheritDoc} */
public final void traverse( final Sink sink )
{
  sink.figure();
  sink.figureGraphics( reference );
  sink.figure_();
}

代码示例来源:origin: org.apache.maven.plugins/maven-checkstyle-plugin

/**
 * Render a simple icon of given level.
 * @param level one of <code>INFO</code>, <code>WARNING</code> or <code>ERROR</code> constants
 */
public void iconSeverity( String level )
{
  sink.figure();
  sink.figureGraphics( "images/icon_" + level + "_sml.gif" );
  sink.figure_();
}

代码示例来源:origin: mojohaus/license-maven-plugin

protected void renderSuccessIcon()
{
  sink.figure();
  sink.figureGraphics( "images/icon_success_sml.gif" );
  sink.figure_();
}

代码示例来源:origin: mojohaus/license-maven-plugin

protected void renderInfoIcon()
{
  sink.figure();
  sink.figureGraphics( "images/icon_info_sml.gif" );
  sink.figure_();
}

代码示例来源:origin: mojohaus/versions-maven-plugin

protected void renderWarningIcon()
{
  sink.figure();
  sink.figureGraphics( "images/icon_warning_sml.gif" );
  sink.figure_();
}

代码示例来源:origin: mojohaus/license-maven-plugin

protected void renderErrorIcon()
{
  sink.figure();
  sink.figureGraphics( "images/icon_error_sml.gif" );
  sink.figure_();
}

代码示例来源:origin: org.xwiki.rendering/xwiki-rendering-syntax-doxia

@Override
public void onImage(ResourceReference reference, boolean freestanding, Map<String, String> parameters)
{
  this.sink.figure();
  // TODO: handle special XWiki format for image locations. How do we pass image bits to Doxia?
  // TODO: Handle parameters
  // TODO: Handle free standing URI (if supported by Doxia)
  this.sink.figureGraphics(reference.getReference());
  this.sink.figure_();
}

代码示例来源:origin: org.apache.maven.plugins/maven-checkstyle-plugin

/**
 * Render an icon of given level with associated text.
 * @param level one of <code>INFO</code>, <code>WARNING</code> or <code>ERROR</code> constants
 * @param textType one of <code>NO_TEXT</code>, <code>TEXT_SIMPLE</code>, <code>TEXT_TITLE</code> or
 * <code>TEXT_ABBREV</code> constants
 */
public void iconSeverity( String level, int textType )
{
  sink.figure();
  sink.figureGraphics( "images/icon_" + level + "_sml.gif" );
  sink.figure_();
  if ( textType > 0 )
  {
    sink.nonBreakingSpace();
    sink.text( bundle.getString( "report.checkstyle." + level + suffix( textType ) ) );
  }
}

代码示例来源:origin: org.apache.maven.doxia/doxia-module-confluence

/** {@inheritDoc} */
  public void traverse( Sink sink )
  {
    sink.figure();
    sink.figureGraphics( location );

    if ( caption != null && caption.length() > 0 )
    {
      sink.figureCaption();
      new TextBlock( caption ).traverse( sink );
      sink.figureCaption_();
    }

    sink.figure_();
  }
}

代码示例来源:origin: org.apache.maven.plugins/maven-project-info-reports-plugin

private void iconSuccess( Locale locale, Sink sink )
{
  sink.figure();
  sink.figureCaption();
  sink.text( getI18nString( locale, "icon.success" ) );
  sink.figureCaption_();
  sink.figureGraphics( IMG_SUCCESS_URL );
  sink.figure_();
}

代码示例来源:origin: de.smartics.testdoc/maven-testdoc-report-plugin

protected void renderJUnitStatusLink(final ResultType resultType,
  final String link)
{
 if (link != null)
 {
  sink.rawText("<div style='text-align:center;'>");
  sink.figure();
  sink.figureGraphics(link);
  sink.figureCaption();
  sink.text(String.valueOf(resultType));
  sink.figureCaption_();
  sink.figure_();
  sink.rawText("</div>");
 }
 else
 {
  sink.text(String.valueOf(resultType));
 }
}

代码示例来源:origin: org.apache.maven.plugins/maven-project-info-reports-plugin

private void iconError( Locale locale, Sink sink )
{
  sink.figure();
  sink.figureCaption();
  sink.text( getI18nString( locale, "icon.error" ) );
  sink.figureCaption_();
  sink.figureGraphics( IMG_ERROR_URL );
  sink.figure_();
}

代码示例来源:origin: kreyssel/selenium2-visualdiff

private void renderScreenshot(final String path, final String type) {
    SinkEventAttributeSet cellAttr = new SinkEventAttributeSet();
    cellAttr.addAttribute(SinkEventAttributes.ALIGN, "center");

    SinkEventAttributeSet smallImagesAttr = new SinkEventAttributeSet();
    smallImagesAttr.addAttribute(SinkEventAttributes.HEIGHT, "200");
    smallImagesAttr.addAttribute(SinkEventAttributes.HSPACE, "20");
    smallImagesAttr.addAttribute(SinkEventAttributes.VSPACE, "10");
    smallImagesAttr.addAttribute(SinkEventAttributes.BORDER, "1");
    smallImagesAttr.addAttribute(SinkEventAttributes.ALT, type);

    sink.tableCell(cellAttr);

    sink.link(path);
    sink.figureGraphics(path, smallImagesAttr);
    sink.link_();

    sink.lineBreak();

    sink.text(type);

    sink.tableCell_();
  }
}

相关文章