*/
@Override
public void focus() {
- if (getParent() != null) {
- /*
- * When focusing a sub-window it basically means it should be
- * brought to the front. Instead of just moving the keyboard focus
- * we focus the window and bring it top-most.
- */
- bringToFront();
- } else {
- super.focus();
- }
- }
-
- /**
- * Notifies the child components and subwindows that the window is attached
- * to the application.
- */
- @Override
- public void attach() {
- super.attach();
- for (Window w : subwindows) {
- w.attach();
- }
- }
-
- /**
- * Notifies the child components and subwindows that the window is detached
- * from the application.
- */
- @Override
- public void detach() {
- super.detach();
- for (Window w : subwindows) {
- w.detach();
- }
+ /*
+ * When focusing a sub-window it basically means it should be brought to
+ * the front. Instead of just moving the keyboard focus we focus the
+ * window and bring it top-most.
+ */
+ super.focus();
+ bringToFront();
}
- /**
- * Notifies the child components and subwindows that the window is attached
- * to the application.
- */
- @Override
- public void attach() {
- super.attach();
- for (Window w : subwindows) {
- w.attach();
- }
- }
-
- /**
- * Notifies the child components and subwindows that the window is detached
- * from the application.
- */
- @Override
- public void detach() {
- super.detach();
- for (Window w : subwindows) {
- w.detach();
- }
- }
-
}