@Override
    protected void result(Object object) {
        instance = null;
        if (object != null) {
            if (object instanceof DrawableData) {
                projectData.setChangesSaved(false);
                DrawableData drawable = (DrawableData) object;

                Undoable undoable;
                if (property != null) {
                    undoable = new DrawableUndoable(rootTable, atlasData,
                                    property, property.value, drawable.name);
                } else {
                    undoable = new UndoableManager.CustomDrawableUndoable(main, customProperty, drawable.name);
                }
                undoableManager.addUndoable(undoable, true);
                
                if (listener != null) {
                    listener.confirmed(drawable, this);
                }
            } else if (object instanceof Boolean) {
                if (property != null) {
                    if ((boolean) object) {
                        projectData.setChangesSaved(false);
                        DrawableUndoable undoable =
                                new DrawableUndoable(rootTable, atlasData,
                                        property, property.value, null);
                        undoableManager.addUndoable(undoable, true);
                        
                        if (listener != null) {
                            listener.emptied(this);
                        }
                    } else {
                        boolean hasDrawable = false;
                        for (DrawableData drawable : atlasData.getDrawables()) {
                            if (drawable.name.equals(property.value)) {
                                hasDrawable = true;
                                break;
                            }
                        }

                        if (!hasDrawable) {
                            projectData.setChangesSaved(false);
                            undoableManager.clearUndoables();
                            property.value = null;
                            rootTable.refreshStyleProperties(true);
                        }
                        
                        if (listener != null) {
                            listener.cancelled(this);
                        }
                    }
                } else if (customProperty != null) {
                    if ((boolean) object) {
                        projectData.setChangesSaved(false);
                        CustomDrawableUndoable undoable = new CustomDrawableUndoable(main, customProperty, null);
                        undoableManager.addUndoable(undoable, true);
                        
                        if (listener != null) {
                            listener.emptied(this);
                        }
                    } else {
                        boolean hasDrawable = false;
                        for (DrawableData drawable : atlasData.getDrawables()) {
                            if (drawable.name.equals(customProperty.getValue())) {
                                hasDrawable = true;
                                break;
                            }
                        }

                        if (!hasDrawable) {
                            projectData.setChangesSaved(false);
                            undoableManager.clearUndoables();
                            customProperty.setValue(null);
                            rootTable.refreshStyleProperties(true);
                        }
                        
                        if (listener != null) {
                            listener.cancelled(this);
                        }
                    }
                } else {
                    if (listener != null) {
                        listener.cancelled(this);
                    }
                }
            }
        } else {
            if (listener != null) {
                listener.cancelled(this);
            }
        }
    
        atlasData.produceAtlas();
        rootTable.refreshPreview();
    }
Returns true if any existing drawable has the indicated name.
@param name
@return
core/src/com/ray3k/skincomposer/dialog/DialogDrawables.java