while (parent.getParent() != null) {
parent = parent.getParent();
}
if (parent instanceof Frame) {
DialogTableau dialogTableau = DialogTableau.createDialog(
(Frame) parent, _configuration,
((TableauFrame) parent).getEffigy(),
PortConfigurerDialog.class, (Entity) target);
if (dialogTableau != null) {
dialogTableau.show();
}
}
}
};
retv = menu.add(configPortsAction, _configPorts);
Action configUnitsAction = new AbstractAction(_configUnits) {
public void actionPerformed(ActionEvent e) {
Component parent = menu.getInvoker();
while (parent.getParent() != null) {
parent = parent.getParent();
}
if (parent instanceof Frame) {
DialogTableau dialogTableau = DialogTableau.createDialog(
(Frame) parent, _configuration,
((TableauFrame) parent).getEffigy(),
UnitConstraintsDialog.class, (Entity) target);
if (dialogTableau != null) {
dialogTableau.show();
}
}
}
};