use of org.apache.pivot.wtk.HyperlinkButton in project pivot by apache.
the class HyperlinkButtonTest method startup.
@Override
public void startup(Display display, Map<String, String> properties) throws Exception {
frame = new Frame();
frame.setTitle("Hyperlink Button Test");
frame.setPreferredSize(480, 360);
HyperlinkButton button1 = new HyperlinkButton("http://pivot.apache.org");
HyperlinkButton button2 = new HyperlinkButton("Apache website", "http://apache.org");
TextPane textPane = new TextPane();
Document document = new Document();
TextNode text1 = new TextNode("Link to the Apache Pivot site: ");
TextNode text2 = new TextNode("Main Apache Software Foundation website: ");
ComponentNode compNode1 = new ComponentNode(button1);
ComponentNode compNode2 = new ComponentNode(button2);
Paragraph para1 = new Paragraph();
para1.add(text1);
document.add(para1);
document.add(compNode1);
Paragraph para2 = new Paragraph();
para2.add(text2);
document.add(para2);
document.add(compNode2);
ImageNode image1 = new ImageNode("/org/apache/pivot/tests/house.png");
document.add(image1);
textPane.setDocument(document);
frame.setContent(textPane);
frame.open(display);
}
Aggregations