Widget.NO_ABBRV,
new AccessMode(AccessMode.RO, AccessMode.NORMAL),
Widget.NO_BUTTON);
typeWidget.addListeners(
new WidgetListener() {
@Override
public void check(final Value value) {
final Value type = typeWidget.getValue();
if (type != null) {
if (MCAST_TYPE.equals(type) || BCAST_TYPE.equals(type)) {
ifaceWidget.setVisible(true);
} else {
ifaceWidget.setVisible(false);
}
if (MCAST_TYPE.equals(type)) {
addrWidget.setVisible(true);
} else {
addrWidget.setVisible(false);
}
if (SERIAL_TYPE.equals(type)) {
serialWidget.setVisible(true);
} else {
serialWidget.setVisible(false);
}
if (UCAST_TYPE.equals(type)) {
ucastLink1Widget.setVisible(true);
ucastLink2Widget.setVisible(true);
} else {
ucastLink1Widget.setVisible(false);
ucastLink2Widget.setVisible(false);
}
application.invokeLater(new Runnable() {
@Override
public void run() {
mcastPanel.setMaximumSize(mcastPanel.getPreferredSize());
}
});
checkInterface();
}
}
});
ifaceWidget.addListeners(new WidgetListener() {
@Override
public void check(final Value value) {
checkInterface();
}
});
serialWidget.setVisible(false);
serialWidget.addListeners(new WidgetListener() {
@Override
public void check(final Value value) {
checkInterface();
}
});
ucastLink1Widget.setVisible(false);
ucastLink2Widget.setVisible(false);
ucastLink1Widget.addListeners(new WidgetListener() {
@Override
public void check(final Value value) {
checkInterface();
}
});
ucastLink2Widget.addListeners(new WidgetListener() {
@Override
public void check(final Value value) {
checkInterface();
}
});
addrWidget.addListeners(new WidgetListener() {
@Override
public void check(final Value value) {
checkInterface();
}
});