private void finished() { String type = TYPE_COMMAND; if (selected == bool) { type = TYPE_BOOLEAN; } else if (selected == reporter) { type = TYPE_REPORTER; } String name = blockName.getText(); for (BlockTypeChooserListener m : listeners) { m.finished(type, currCategory, name, currColor); } }
private void cancel() { for (BlockTypeChooserListener m : listeners) { m.cancel(); } }