public class

ToolbarSwitcherState

extends BaseObservable
java.lang.Object
   ↳ com.pdftron.pdf.widget.base.BaseObservable
     ↳ com.pdftron.pdf.dialog.toolbarswitcher.model.ToolbarSwitcherState

Summary

Public Constructors
ToolbarSwitcherState(List<ToolbarSwitcherItem> toolbars)
Public Methods
ToolbarSwitcherItem get(int index)
ToolbarSwitcherItem getSelectedToolbar()
String getToolbarTagWithButtonId(int buttonId)
Returns the toolbar that contains the toolbar button with the given id.
boolean hasMultipleToolbars()
void selectToolbar(String toolbarId)
Selects the toolbar specified by its tag if available.
void setToolbarVisibility(String toolbarId, boolean isVisible)
int size()
boolean updateToolbarSwitcherItem(ToolbarSwitcherItem item)
[Expand]
Inherited Methods
From class com.pdftron.pdf.widget.base.BaseObservable
From class java.lang.Object

Public Constructors

public ToolbarSwitcherState (List<ToolbarSwitcherItem> toolbars)

Public Methods

public ToolbarSwitcherItem get (int index)

public ToolbarSwitcherItem getSelectedToolbar ()

public String getToolbarTagWithButtonId (int buttonId)

Returns the toolbar that contains the toolbar button with the given id. If the current toolbar contains the toolbar button, then return the tag for the current toolbar. Otherwise, search all toolbars in order and returns the first toolbar that contains the button.

Parameters
buttonId unique identifier for the toolbar button to look for
Returns
  • unique tag that identifies the toolbar, null if none found

public boolean hasMultipleToolbars ()

public void selectToolbar (String toolbarId)

Selects the toolbar specified by its tag if available.

Parameters
toolbarId tag that uniquely defines a toolbar

public void setToolbarVisibility (String toolbarId, boolean isVisible)

public int size ()

public boolean updateToolbarSwitcherItem (ToolbarSwitcherItem item)