use of org.apache.pivot.beans.BXMLSerializer in project pivot by apache.
the class TablePaneTest method startup.
@Override
public void startup(final Display display, final Map<String, String> properties) throws Exception {
BXMLSerializer bxmlSerializer = new BXMLSerializer();
window = (Window) bxmlSerializer.readObject(TablePaneTest.class, "table_pane_test.bxml");
window.open(display);
}
use of org.apache.pivot.beans.BXMLSerializer in project pivot by apache.
the class Pivot686 method startup.
@Override
public void startup(Display display, Map<String, String> properties) throws Exception {
System.out.println("startup: start");
String forceFocusParameter = properties.get(FORCE_FOCUS_KEY);
boolean forceFocus = false;
forceFocus = Boolean.parseBoolean(forceFocusParameter);
BXMLSerializer bxmlSerializer = new BXMLSerializer();
window = (Window) bxmlSerializer.readObject(this.getClass(), "pivot_686.bxml");
initializeFields(bxmlSerializer);
window.open(display);
if (forceFocus == true) {
System.out.println("force focus on textInput now");
// force focus on TextInput, Ok when run
textInput.requestFocus();
// as a Java Application, and even as
// Applet
}
System.out.println("textInput has focus: " + textInput.isFocused());
System.out.println("startup: end");
}
use of org.apache.pivot.beans.BXMLSerializer in project pivot by apache.
the class ColorSchemeBuilder method startup.
@Override
public void startup(Display display, Map<String, String> properties) throws Exception {
BXMLSerializer bxmlSerializer = new BXMLSerializer();
window = (ColorSchemeBuilderWindow) bxmlSerializer.readObject(ColorSchemeBuilderWindow.class, "color_scheme_builder_window.bxml");
window.open(display);
}
use of org.apache.pivot.beans.BXMLSerializer in project pivot by apache.
the class ColorSchemeBuilderWindow method reloadContent.
private void reloadContent() {
BXMLSerializer bxmlSerializer = new BXMLSerializer();
try {
Component sampleContent = (Component) bxmlSerializer.readObject(ColorSchemeBuilderWindow.class, "sample_content.bxml");
sampleContentBorder.setContent(sampleContent);
} catch (IOException exception) {
throw new RuntimeException(exception);
} catch (SerializationException exception) {
throw new RuntimeException(exception);
}
}
use of org.apache.pivot.beans.BXMLSerializer in project pivot by apache.
the class DecoratorDemo method startup.
@Override
public void startup(Display display, Map<String, String> properties) throws Exception {
BXMLSerializer bxmlSerializer = new BXMLSerializer();
reflectionWindow = (Window) bxmlSerializer.readObject(DecoratorDemo.class, "reflection_window.bxml");
translucentFrame = (Frame) bxmlSerializer.readObject(DecoratorDemo.class, "translucent_frame.bxml");
final FadeDecorator fadeDecorator = new FadeDecorator();
translucentFrame.getDecorators().insert(fadeDecorator, 0);
translucentFrame.getComponentMouseListeners().add(new ComponentMouseListener() {
@Override
public void mouseOver(Component component) {
fadeDecorator.setOpacity(0.9f);
component.repaint();
}
@Override
public void mouseOut(Component component) {
fadeDecorator.setOpacity(0.5f);
component.repaint();
}
});
reflectionWindow.open(display);
translucentFrame.open(reflectionWindow);
}
Aggregations