126127128129130131132133134135136
builder.startLabel(); builder.startText(); DOMOutputBuffer dom = new TestDOMOutputBuffer(); dom.writeText(text); builder.setText(dom); builder.endText(); builder.endLabel();
175176177178179180181182183184185
builder.setOverImageURL(new LiteralImageAssetReference("over.gif")); builder.endIcon(); builder.startText(); OutputBuffer buffer = new TestDOMOutputBuffer(); buffer.writeText("text"); builder.setText(buffer); builder.endText(); builder.endLabel(); builder.setHref(new LiteralLinkAssetReference("href.xml"));
417418419420421422423424425426427
builder.startLabel(); builder.startText(); DOMOutputBuffer dom = new TestDOMOutputBuffer(); dom.writeText(text); builder.setText(dom); builder.endText(); builder.startIcon(); // this is required or we crash trying to extract the element name in
5657585960616263646566
TestDOMOutputBuffer buffer = new TestDOMOutputBuffer(); if (renderer.open(buffer, item)) { buffer.writeText(content); renderer.close(buffer, item); } // Extract the output from the menu item rendering as a string.
264265266267268269270271272273274
5556575859606162636465
} protected MenuText createMenuText() { ConcreteMenuText text = new ConcreteMenuText(new ElementDetailsStub()); DOMOutputBuffer textBuffer = new TestDOMOutputBuffer(); textBuffer.writeText("[text]"); text.setText(textBuffer); return text; } }