use of org.apache.pivot.wtk.content.ButtonDataRenderer in project pivot by apache.
the class Pivot721 method startup.
@Override
public void startup(Display display, Map<String, String> properties) throws Exception {
BXMLSerializer bxmlSerializer = new BXMLSerializer();
window = (Window) bxmlSerializer.readObject(Pivot721.class, "pivot_721.bxml");
// force fill into button renderer, but only in some buttons ...
ButtonDataRenderer filledButtonDataRenderer = new ButtonDataRenderer();
filledButtonDataRenderer.setFillIcon(true);
PushButton button3 = (PushButton) bxmlSerializer.getNamespace().get("button3");
// ((ButtonDataRenderer)button3.getDataRenderer()).setFillIcon(true); //
// ok, but note that all buttons share a common renderer instance
// set/use the
button3.setDataRenderer(filledButtonDataRenderer);
// customized
// renderer instance
PushButton button4 = (PushButton) bxmlSerializer.getNamespace().get("button4");
// set/use the
button4.setDataRenderer(filledButtonDataRenderer);
// customized
// renderer instance
window.open(display);
}
Aggregations