use of org.apache.pivot.beans.BXMLSerializer in project pivot by apache.
the class DeploymentExample method startup.
@Override
public void startup(Display display, Map<String, String> properties) throws Exception {
BXMLSerializer bxmlSerializer = new BXMLSerializer();
window = (Window) bxmlSerializer.readObject(DeploymentExample.class, "deployment_example_window.bxml");
window.open(display);
}
use of org.apache.pivot.beans.BXMLSerializer in project pivot by apache.
the class BaselineTest method startup.
@Override
public void startup(Display display, Map<String, String> properties) throws Exception {
BXMLSerializer bxmlSerializer = new BXMLSerializer();
window = new Window((Component) bxmlSerializer.readObject(getClass().getResource("baseline_test.bxml")));
window.setTitle("Baseline Test");
window.setMaximized(true);
window.open(display);
}
use of org.apache.pivot.beans.BXMLSerializer in project pivot by apache.
the class CardPaneTest method startup.
@Override
public void startup(Display display, Map<String, String> properties) throws Exception {
frame = new Frame(new BoxPane());
frame.getStyles().put(Style.padding, 0);
frame.setTitle("Component Pane Test");
frame.setPreferredSize(800, 600);
frame.setLocation(20, 20);
BXMLSerializer bxmlSerializer = new BXMLSerializer();
sheet = (Sheet) bxmlSerializer.readObject(CardPaneTest.class, "card_pane_test.bxml");
cardPane = (CardPane) bxmlSerializer.getNamespace().get("cardPane");
sizeGroup = (ButtonGroup) bxmlSerializer.getNamespace().get("sizeGroup");
sizeGroup.getButtonGroupListeners().add(new ButtonGroupListener() {
@Override
public void selectionChanged(ButtonGroup buttonGroup, Button previousSelection) {
final Button selection = buttonGroup.getSelection();
int selectedIndex = selection == null ? -1 : selection.getParent().indexOf(selection);
cardPane.getCardPaneListeners().add(new CardPaneListener() {
@Override
public Vote previewSelectedIndexChange(CardPane cardPaneArgument, int selectedIndexArgument) {
if (selection != null) {
selection.getParent().setEnabled(false);
}
return Vote.APPROVE;
}
@Override
public void selectedIndexChangeVetoed(CardPane cardPaneArgument, Vote reason) {
if (selection != null && reason == Vote.DENY) {
selection.getParent().setEnabled(true);
}
}
@Override
public void selectedIndexChanged(CardPane cardPaneArgument, int previousSelectedIndex) {
if (selection != null) {
selection.getParent().setEnabled(true);
}
}
});
cardPane.setSelectedIndex(selectedIndex);
}
});
frame.open(display);
ApplicationContext.queueCallback(() -> sheet.open(frame));
}
use of org.apache.pivot.beans.BXMLSerializer in project pivot by apache.
the class ResolveTest method startup.
@Override
public void startup(Display display, Map<String, String> properties) throws Exception {
BXMLSerializer bxmlSerializer = new BXMLSerializer();
window = (Window) bxmlSerializer.readObject(ResolveTest.class, "resolve_test.bxml", true);
window.open(display);
}
use of org.apache.pivot.beans.BXMLSerializer in project pivot by apache.
the class SaturationDecoratorTest method startup.
@Override
public void startup(Display display, Map<String, String> properties) throws Exception {
BXMLSerializer bxmlSerializer = new BXMLSerializer();
window = (Window) bxmlSerializer.readObject(SaturationDecoratorTest.class, "saturation_decorator_test.bxml");
window.open(display);
}
Aggregations