public abstract class AbstractToolPanel<ToolClass extends AbstractEditorTool>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
AbstractToolPanel.ToolView |
Modifier and Type | Field and Description |
---|---|
protected static int |
ANIMATION_DURATION |
protected android.view.ViewGroup |
parentView |
protected AbstractToolPanel.ToolView |
toolView |
protected float |
uiDensity |
Constructor and Description |
---|
AbstractToolPanel() |
Modifier and Type | Method and Description |
---|---|
android.view.View |
attach(android.view.ViewGroup parentView) |
protected void |
callAttached(android.content.Context context,
android.view.View panelView) |
protected abstract android.animation.Animator |
createExitAnimator(android.view.View panelView) |
protected abstract android.animation.Animator |
createShowAnimator(android.view.View panelView) |
void |
detach(boolean revertChanges) |
protected abstract int |
getLayoutResource() |
protected void |
init(ToolClass tool) |
boolean |
isAttached() |
boolean |
isInited() |
protected void |
onAttached(android.content.Context context,
android.view.View panelView,
ToolClass tool)
Called on attached the View.
|
protected int |
onBeforeDetach(android.view.View panelView,
boolean revertChanges)
Called before the View will detached.
|
protected abstract void |
onDetached()
Called after View would detached.
|
void |
refresh() |
void |
updateStageOverlapping(int bottomScreenPos) |
protected static final int ANIMATION_DURATION
protected android.view.ViewGroup parentView
protected AbstractToolPanel.ToolView toolView
protected float uiDensity
@MainThread public final android.view.View attach(@NonNull android.view.ViewGroup parentView)
protected final void callAttached(android.content.Context context, @NonNull android.view.View panelView)
@NonNull @MainThread protected abstract android.animation.Animator createExitAnimator(@NonNull android.view.View panelView)
@NonNull @MainThread protected abstract android.animation.Animator createShowAnimator(@NonNull android.view.View panelView)
@MainThread public final void detach(boolean revertChanges)
@LayoutRes protected abstract int getLayoutResource()
@MainThread protected final void init(ToolClass tool)
public boolean isAttached()
public boolean isInited()
@CallSuper protected void onAttached(android.content.Context context, @NonNull android.view.View panelView, ToolClass tool)
context
- the view contextpanelView
- the tool paneltool
- the tool@MainThread @CallSuper protected int onBeforeDetach(@NonNull android.view.View panelView, boolean revertChanges)
protected abstract void onDetached()
public void refresh()
public void updateStageOverlapping(int bottomScreenPos)