25 |
* |
* |
26 |
* Contributors: |
* Contributors: |
27 |
* Martin O. J. Schmitz - initial API and implementation |
* Martin O. J. Schmitz - initial API and implementation |
28 |
* Stefan A. Krüger - additional utility classes |
* Stefan A. Tzeggai - additional utility classes |
29 |
******************************************************************************/ |
******************************************************************************/ |
30 |
package skrueger.swing; |
package skrueger.swing; |
31 |
|
|
98 |
* This class handles the cancel button itself. You may still want to listen |
* This class handles the cancel button itself. You may still want to listen |
99 |
* to PROPERTY_APPLY_AND_CLOSE events. This dialog is modal. The dialog has |
* to PROPERTY_APPLY_AND_CLOSE events. This dialog is modal. The dialog has |
100 |
* to be set visible afterwards.<br/> |
* to be set visible afterwards.<br/> |
|
* |
|
|
* @param owner |
|
|
* A component of the GUI that this dialog is related to. If no |
|
|
* {@link Window} is passed, SwingUtil.getParentWindow(owner) is |
|
|
* called. |
|
101 |
*/ |
*/ |
102 |
public TranslationAskJDialog(Component owner, |
public TranslationAskJDialog(Component owner, |
103 |
final JComponent... translationEditJPanels) { |
final JComponent... translationEditJPanels) { |
104 |
super(SwingUtil.getParentWindow(owner)); |
super(owner); |
105 |
setComponents(translationEditJPanels); |
setComponents(translationEditJPanels); |
106 |
} |
} |
107 |
|
|
117 |
* Using this constructor, you have to call setComponents afterwards. |
* Using this constructor, you have to call setComponents afterwards. |
118 |
*/ |
*/ |
119 |
public TranslationAskJDialog(Component owner) { |
public TranslationAskJDialog(Component owner) { |
120 |
super(SwingUtil.getParentWindow(owner)); |
super(owner); |
121 |
} |
} |
122 |
|
|
123 |
/** |
/** |
157 |
setTitle(SwingUtil.R("TranslationAskJDialog.Title")); |
setTitle(SwingUtil.R("TranslationAskJDialog.Title")); |
158 |
setModal(true); |
setModal(true); |
159 |
pack(); |
pack(); |
160 |
SwingUtil.centerFrameOnScreen(this); |
SwingUtil.setRelativeFramePosition(this, getParent(), .5, .5); |
161 |
} |
} |
162 |
|
|
163 |
public void setOptionalButtons(JButton... optionalButtons) { |
public void setOptionalButtons(JButton... optionalButtons) { |