105 @Override 106 public void setPosition(final int x, final int y) { 107 Application.invokeLater(() -> glassWindow.setPosition(x, y)); 108 } 109 110 @Override 111 public int getPositionX() { 112 final AtomicInteger x = new AtomicInteger(0); 113 Application.invokeAndWait(() -> x.set(glassWindow.getX())); 114 return x.get(); 115 } 116 117 @Override 118 public int getPositionY() { 119 final AtomicInteger y = new AtomicInteger(0); 120 Application.invokeAndWait(() -> y.set(glassWindow.getY())); 121 return y.get(); 122 } 123 124 @Override 125 public float getUIScale() { 126 final AtomicReference<Float> uiScale = new AtomicReference<Float>(0.0f); 127 Application.invokeAndWait(() -> uiScale.set(glassWindow.getPlatformScale())); 128 return uiScale.get(); 129 } 130 131 void dispose() { 132 QuantumToolkit.runWithRenderLock(() -> { 133 glassWindow.close(); 134 //TODO - should update glass scene view state 135 //TODO - doesn't matter because we are disposing 136 return null; 137 }); 138 } 139 140 @Override 141 public void setStageOnTop(Stage topStage) { 142 if (null != topStage) { 143 this.topStage = new WeakReference<Stage>(topStage); 144 } else { 145 this.topStage = null; 146 } 147 } 148 | 105 @Override 106 public void setPosition(final int x, final int y) { 107 Application.invokeLater(() -> glassWindow.setPosition(x, y)); 108 } 109 110 @Override 111 public int getPositionX() { 112 final AtomicInteger x = new AtomicInteger(0); 113 Application.invokeAndWait(() -> x.set(glassWindow.getX())); 114 return x.get(); 115 } 116 117 @Override 118 public int getPositionY() { 119 final AtomicInteger y = new AtomicInteger(0); 120 Application.invokeAndWait(() -> y.set(glassWindow.getY())); 121 return y.get(); 122 } 123 124 @Override 125 public float getPlatformScaleX() { 126 final AtomicReference<Float> pScale = new AtomicReference<Float>(0.0f); 127 Application.invokeAndWait(() -> pScale.set(glassWindow.getPlatformScaleX())); 128 return pScale.get(); 129 } 130 131 @Override 132 public float getPlatformScaleY() { 133 final AtomicReference<Float> pScale = new AtomicReference<Float>(0.0f); 134 Application.invokeAndWait(() -> pScale.set(glassWindow.getPlatformScaleY())); 135 return pScale.get(); 136 } 137 138 void dispose() { 139 QuantumToolkit.runWithRenderLock(() -> { 140 glassWindow.close(); 141 //TODO - should update glass scene view state 142 //TODO - doesn't matter because we are disposing 143 return null; 144 }); 145 } 146 147 @Override 148 public void setStageOnTop(Stage topStage) { 149 if (null != topStage) { 150 this.topStage = new WeakReference<Stage>(topStage); 151 } else { 152 this.topStage = null; 153 } 154 } 155 |