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.Adapter() {
@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);