use of com.storedobject.common.ArrayListSet in project SODevelopment by syampillai.
the class ObjectBlockEditor method clicked.
@Override
public void clicked(Component c) {
if (c == cancel) {
close();
return;
}
if (c == save) {
ArrayListSet<StoredObject> changed = new ArrayListSet<>();
if (!canSave() || !saveBlockTextInt(changed)) {
return;
}
if (changed.isEmpty()) {
message("No changed made!");
return;
}
if (transact(t -> {
for (StoredObject storedObject : changed) {
storedObject.save(t);
}
})) {
close();
}
return;
}
if (c == expand) {
expand.setVisible(false);
collapse.setVisible(true);
for (TextArea ta : blocks) {
if (!ta.isEnabled()) {
ta.setVisible(true);
}
}
return;
}
if (c == collapse) {
expand.setVisible(true);
collapse.setVisible(false);
for (TextArea ta : blocks) {
if (!ta.isEnabled()) {
ta.setVisible(false);
}
}
}
}
Aggregations