51 LWCToolkit.targetDisposedPeer(fTarget, this);
52 }
53
54 public void setVisible(boolean visible) {
55 if (visible) {
56 Runnable task = () -> {
57 CPrinterDialog printerDialog = (CPrinterDialog)fTarget;
58 printerDialog.setRetVal(printerDialog.showDialog());
59 printerDialog.setVisible(false);
60 };
61 new Thread(null, task, "PrintDialog", 0, false).start();
62 }
63 }
64
65 // unused methods.
66 public void toFront() {}
67 public void toBack() {}
68 public void setResizable(boolean resizable) {}
69 public void setEnabled(boolean enable) {}
70 public void setBounds(int x, int y, int width, int height) {}
71 public boolean handleEvent(Event e) { return false; }
72 public void setForeground(Color c) {}
73 public void setBackground(Color c) {}
74 public void setFont(Font f) {}
75 public boolean requestFocus(boolean temporary, boolean focusedWindowChangeAllowed) {
76 return false;
77 }
78 void start() {}
79 void invalidate(int x, int y, int width, int height) {}
80 public void addDropTarget(DropTarget dt) {}
81 public void removeDropTarget(DropTarget dt) {}
82
83 // 1.5 peer method
84 public boolean isRestackSupported() {
85 return false;
86 }
87
88 // 1.6 peer method
89 public void updateAlwaysOnTopState() {
90 // no-op, since we just show the native print dialog
|
51 LWCToolkit.targetDisposedPeer(fTarget, this);
52 }
53
54 public void setVisible(boolean visible) {
55 if (visible) {
56 Runnable task = () -> {
57 CPrinterDialog printerDialog = (CPrinterDialog)fTarget;
58 printerDialog.setRetVal(printerDialog.showDialog());
59 printerDialog.setVisible(false);
60 };
61 new Thread(null, task, "PrintDialog", 0, false).start();
62 }
63 }
64
65 // unused methods.
66 public void toFront() {}
67 public void toBack() {}
68 public void setResizable(boolean resizable) {}
69 public void setEnabled(boolean enable) {}
70 public void setBounds(int x, int y, int width, int height) {}
71 @SuppressWarnings("deprecation")
72 public boolean handleEvent(Event e) { return false; }
73 public void setForeground(Color c) {}
74 public void setBackground(Color c) {}
75 public void setFont(Font f) {}
76 public boolean requestFocus(boolean temporary, boolean focusedWindowChangeAllowed) {
77 return false;
78 }
79 void start() {}
80 void invalidate(int x, int y, int width, int height) {}
81 public void addDropTarget(DropTarget dt) {}
82 public void removeDropTarget(DropTarget dt) {}
83
84 // 1.5 peer method
85 public boolean isRestackSupported() {
86 return false;
87 }
88
89 // 1.6 peer method
90 public void updateAlwaysOnTopState() {
91 // no-op, since we just show the native print dialog
|