| | |
| | | import javax.swing.DefaultComboBoxModel; |
| | | import javax.swing.JComboBox; |
| | | import javax.swing.JComponent; |
| | | import javax.swing.JDialog; |
| | | import javax.swing.JEditorPane; |
| | | import javax.swing.JLabel; |
| | | import javax.swing.JMenuBar; |
| | |
| | | */ |
| | | protected void setEnabledOK(boolean enable) |
| | | { |
| | | Window parent = Utilities.getParentDialog(this); |
| | | if ((parent != null) && (parent instanceof GenericDialog)) |
| | | Window w = Utilities.getParentDialog(this); |
| | | if (w instanceof GenericDialog) |
| | | { |
| | | ((GenericDialog)parent).setEnabledOK(enable); |
| | | ((GenericDialog)w).setEnabledOK(enable); |
| | | } |
| | | else if (w instanceof GenericFrame) |
| | | { |
| | | ((GenericFrame)w).setEnabledOK(enable); |
| | | } |
| | | enableOK = enable; |
| | | } |
| | |
| | | */ |
| | | protected void setEnabledCancel(boolean enable) |
| | | { |
| | | JDialog parent = (JDialog)Utilities.getParentDialog(this); |
| | | if ((parent != null) && (parent instanceof GenericDialog)) |
| | | Window w = Utilities.getParentDialog(this); |
| | | if (w instanceof GenericDialog) |
| | | { |
| | | ((GenericDialog)parent).setEnabledCancel(enable); |
| | | ((GenericDialog)w).setEnabledCancel(enable); |
| | | } |
| | | else if (w instanceof GenericFrame) |
| | | { |
| | | ((GenericFrame)w).setEnabledCancel(enable); |
| | | } |
| | | enableCancel = enable; |
| | | } |