public abstract class AbstractTool extends AbstractConfig implements AbstractConfig.ToolConfigInterface
AbstractConfig.AspectConfigInterface, AbstractConfig.BindData, AbstractConfig.ColorConfigInterface, AbstractConfig.ConfigViewHolder, AbstractConfig.FontConfigInterface<T>, AbstractConfig.ImageFilterInterface, AbstractConfig.StickerConfigInterface, AbstractConfig.ToolConfigInterface| Modifier and Type | Field and Description |
|---|---|
java.lang.Class<? extends AbstractToolPanel> |
panelClass |
NO_THUMBNAIL_ID, ORIGINAL_THUMBNAIL_SIZE| Constructor and Description |
|---|
AbstractTool(int name,
int drawableId,
java.lang.Class<? extends AbstractToolPanel> panelClass) |
| Modifier and Type | Method and Description |
|---|---|
android.view.View |
attachPanel(android.view.ViewGroup parentView,
EditorPreview preview) |
static int |
convertFromRange(float value,
float minValue,
float maxValue,
int steps) |
static float |
convertToRange(int value,
float minValue,
float maxValue,
int steps) |
void |
detachPanel(boolean revertChanges) |
EditorPreview |
getEditorPreview() |
int |
getLayout()
Get the layout res id of the list item view.
|
abstract AbstractOperation |
getOperation() |
Operator |
getOperator() |
int |
getVerticalLayout()
Get the vertical layout res id of the list item view.
|
boolean |
isAttached() |
abstract boolean |
isRevertible() |
boolean |
isSelectable() |
void |
refreshPanel() |
void |
revertChanges() |
protected void |
revertState() |
protected void |
saveState() |
createViewHolder, generateBindData, generateBindDataAsync, getName, getThumbnailBitmap, getThumbnailBitmap, getThumbnailResId, getTitle, hasStaticThumbnail, isClickableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTitlecreateViewHolder, generateBindData, generateBindDataAsync, getName@NonNull public final java.lang.Class<? extends AbstractToolPanel> panelClass
public AbstractTool(@StringRes
int name,
@DrawableRes
int drawableId,
@NonNull
java.lang.Class<? extends AbstractToolPanel> panelClass)
@Nullable public abstract AbstractOperation getOperation()
getOperation in interface AbstractConfig.ToolConfigInterfacepublic abstract boolean isRevertible()
isRevertible in interface AbstractConfig.ToolConfigInterfaceprotected void saveState()
protected void revertState()
public void refreshPanel()
refreshPanel in interface AbstractConfig.ToolConfigInterfacepublic boolean isAttached()
public boolean isSelectable()
isSelectable in interface DataSourceInterface<AbstractConfig.BindData>public android.view.View attachPanel(@NonNull
android.view.ViewGroup parentView,
@NonNull
EditorPreview preview)
public int getVerticalLayout()
DataSourceInterfacegetVerticalLayout in interface DataSourceInterface<AbstractConfig.BindData>getVerticalLayout in class AbstractConfigpublic Operator getOperator()
getOperator in interface AbstractConfig.ToolConfigInterfacepublic void revertChanges()
revertChanges in interface AbstractConfig.ToolConfigInterfacepublic EditorPreview getEditorPreview()
getEditorPreview in interface AbstractConfig.ToolConfigInterfacepublic void detachPanel(boolean revertChanges)
detachPanel in interface AbstractConfig.ToolConfigInterfacepublic static int convertFromRange(float value,
float minValue,
float maxValue,
int steps)
public static float convertToRange(int value,
float minValue,
float maxValue,
int steps)
public int getLayout()
DataSourceInterfacegetLayout in interface DataSourceInterface<AbstractConfig.BindData>