676 }
677
678 private ReadOnlyBooleanWrapper fullScreenPropertyImpl () {
679 if (fullScreen == null) {
680 fullScreen = new ReadOnlyBooleanWrapper(Stage.this, "fullScreen");
681 }
682 return fullScreen;
683 }
684
685 /**
686 * Defines the icon images to be used in the window decorations and when
687 * minimized. The images should be different sizes of the same image and
688 * the best size will be chosen, eg. 16x16, 32,32.
689 *
690 * @defaultValue empty
691 */
692 private ObservableList<Image> icons = new TrackableObservableList<Image>() {
693 @Override protected void onChanged(Change<Image> c) {
694 List<Object> platformImages = new ArrayList<Object>();
695 for (Image icon : icons) {
696 platformImages.add(icon.impl_getPlatformImage());
697 }
698 if (impl_peer != null) {
699 impl_peer.setIcons(platformImages);
700 }
701 }
702 };
703
704 /**
705 * Gets the icon images to be used in the window decorations and when
706 * minimized. The images should be different sizes of the same image and
707 * the best size will be chosen, eg. 16x16, 32,32.
708 * @return An observable list of icons of this window
709 */
710 public final ObservableList<Image> getIcons() {
711 return icons;
712 }
713
714 /**
715 * Defines the title of the {@code Stage}.
716 *
1169 /**
1170 * @treatAsPrivate implementation detail
1171 * @deprecated This is an internal API that is not intended for use and will be removed in the next version
1172 */
1173 @Deprecated
1174 @Override protected void impl_visibleChanged(boolean value) {
1175 super.impl_visibleChanged(value);
1176
1177 if (value) {
1178 // Finish initialization
1179 impl_peer.setImportant(isImportant());
1180 impl_peer.setResizable(isResizable());
1181 impl_peer.setFullScreen(isFullScreen());
1182 impl_peer.setAlwaysOnTop(isAlwaysOnTop());
1183 impl_peer.setIconified(isIconified());
1184 impl_peer.setMaximized(isMaximized());
1185 impl_peer.setTitle(getTitle());
1186
1187 List<Object> platformImages = new ArrayList<Object>();
1188 for (Image icon : icons) {
1189 platformImages.add(icon.impl_getPlatformImage());
1190 }
1191 if (impl_peer != null) {
1192 impl_peer.setIcons(platformImages);
1193 }
1194 }
1195
1196 if (!value) {
1197 // Remove form active stage list
1198 stages.remove(this);
1199 }
1200
1201 if (!value && inNestedEventLoop) {
1202 inNestedEventLoop = false;
1203 Toolkit.getToolkit().exitNestedEventLoop(this, null);
1204 }
1205 }
1206
1207 /**
1208 * Bring the {@code Window} to the foreground. If the {@code Window} is
1209 * already in the foreground there is no visible difference.
|
676 }
677
678 private ReadOnlyBooleanWrapper fullScreenPropertyImpl () {
679 if (fullScreen == null) {
680 fullScreen = new ReadOnlyBooleanWrapper(Stage.this, "fullScreen");
681 }
682 return fullScreen;
683 }
684
685 /**
686 * Defines the icon images to be used in the window decorations and when
687 * minimized. The images should be different sizes of the same image and
688 * the best size will be chosen, eg. 16x16, 32,32.
689 *
690 * @defaultValue empty
691 */
692 private ObservableList<Image> icons = new TrackableObservableList<Image>() {
693 @Override protected void onChanged(Change<Image> c) {
694 List<Object> platformImages = new ArrayList<Object>();
695 for (Image icon : icons) {
696 platformImages.add(Toolkit.getImageAccessor().getPlatformImage(icon));
697 }
698 if (impl_peer != null) {
699 impl_peer.setIcons(platformImages);
700 }
701 }
702 };
703
704 /**
705 * Gets the icon images to be used in the window decorations and when
706 * minimized. The images should be different sizes of the same image and
707 * the best size will be chosen, eg. 16x16, 32,32.
708 * @return An observable list of icons of this window
709 */
710 public final ObservableList<Image> getIcons() {
711 return icons;
712 }
713
714 /**
715 * Defines the title of the {@code Stage}.
716 *
1169 /**
1170 * @treatAsPrivate implementation detail
1171 * @deprecated This is an internal API that is not intended for use and will be removed in the next version
1172 */
1173 @Deprecated
1174 @Override protected void impl_visibleChanged(boolean value) {
1175 super.impl_visibleChanged(value);
1176
1177 if (value) {
1178 // Finish initialization
1179 impl_peer.setImportant(isImportant());
1180 impl_peer.setResizable(isResizable());
1181 impl_peer.setFullScreen(isFullScreen());
1182 impl_peer.setAlwaysOnTop(isAlwaysOnTop());
1183 impl_peer.setIconified(isIconified());
1184 impl_peer.setMaximized(isMaximized());
1185 impl_peer.setTitle(getTitle());
1186
1187 List<Object> platformImages = new ArrayList<Object>();
1188 for (Image icon : icons) {
1189 platformImages.add(Toolkit.getImageAccessor().getPlatformImage(icon));
1190 }
1191 if (impl_peer != null) {
1192 impl_peer.setIcons(platformImages);
1193 }
1194 }
1195
1196 if (!value) {
1197 // Remove form active stage list
1198 stages.remove(this);
1199 }
1200
1201 if (!value && inNestedEventLoop) {
1202 inNestedEventLoop = false;
1203 Toolkit.getToolkit().exitNestedEventLoop(this, null);
1204 }
1205 }
1206
1207 /**
1208 * Bring the {@code Window} to the foreground. If the {@code Window} is
1209 * already in the foreground there is no visible difference.
|