Beispiel #1
0
  private synchronized void asyncInitFrame() {
    if (active) {
      Scene scene = new Scene(root);
      scene.setFill(Color.TRANSPARENT);
      for (File f : styles) {
        scene.getStylesheets().add(f.toURI().toString());
      }
      styles = null;

      this.frame = FrameFactory.create(scene);
      double x = Double.isNaN(memento.x) ? frame.getX() : memento.x;
      double y = Double.isNaN(memento.y) ? frame.getY() : memento.y;
      frame.setLocation(x, y);
    }
  }
Beispiel #2
0
 public synchronized void close() {
   active = false;
   beanUtils.getTaskRegistry().shutDown();
   if (frame != null) {
     frame.close();
   }
 }
Beispiel #3
0
 public synchronized void setMemento(Object o) {
   if (o instanceof JidgetMemento) {
     JidgetMemento m = (JidgetMemento) o;
     memento.x = m.x;
     memento.y = m.y;
     if (frame != null) {
       frame.setLocation(m.x, m.y);
     }
   }
 }