Foxit PDF SDK  9.1
com.foxit.uiextensions.controls.toolbar.BaseBar Interface Reference

Classes

enum  TB_Position
 

Public Member Functions

boolean addView (IBaseItem item, TB_Position position)
 
boolean addView (IBaseItem item, TB_Position position, int index)
 
boolean removeItemByTag (int tag)
 
boolean removeItem (IBaseItem item)
 
boolean removeItemByIndex (TB_Position position, int index)
 
void removeAllItems ()
 
void setVisible (boolean visible)
 
View getContentView ()
 
IBaseItem getItem (TB_Position location, int tag)
 
IBaseItem getItemByIndex (TB_Position location, int index)
 
int getItemVisibility (TB_Position location, int tag)
 
int getItemVisibilityByIndex (TB_Position location, int index)
 
void setItemVisibility (TB_Position location, int tag, int visibility)
 
void setItemVisibilityByIndex (TB_Position location, int index, int visibility)
 
int getItemsCount (TB_Position location)
 
void setOrientation (int orientation)
 
void setOrientation (int orientation, int width, int height)
 
void setBackgroundColor (int color)
 
void setBackgroundColor (@ColorInt int lightColor, @ColorInt int darkColor)
 
void setBackgroundResource (int res)
 
void setItemInterval (int space)
 
void setWidth (int width)
 
void setHeight (int height)
 
void setContentView (View v)
 
void setInterceptTouch (boolean isInterceptTouch)
 
void updateLayout ()
 
int getHeight ()
 

Static Public Attributes

static final int HORIZONTAL = 0
 
static final int VERTICAL = 1
 

Detailed Description

Interface that defines information about bar.

Member Function Documentation

◆ addView() [1/2]

boolean com.foxit.uiextensions.controls.toolbar.BaseBar.addView ( IBaseItem  item,
TB_Position  position 
)

Adds a item.

Parameters
itemThe item to add.
positionThe TB_Position to add the item.
Returns
true
if success,
false
otherwise.

◆ addView() [2/2]

boolean com.foxit.uiextensions.controls.toolbar.BaseBar.addView ( IBaseItem  item,
TB_Position  position,
int  index 
)

Adds a item.

Parameters
itemThe item to add.
positionThe TB_Position to add the item.
indexThe position at which to add the item.
Returns
true
if success,
false
otherwise.

◆ getContentView()

View com.foxit.uiextensions.controls.toolbar.BaseBar.getContentView ( )

Retrieve the View attached to this bar, if present.

Returns
The View attached to the bar or null if no View is present.

◆ getHeight()

int com.foxit.uiextensions.controls.toolbar.BaseBar.getHeight ( )
Returns
The bar height

◆ getItem()

IBaseItem com.foxit.uiextensions.controls.toolbar.BaseBar.getItem ( TB_Position  location,
int  tag 
)

Get a item.

Parameters
locationThe TB_Position to get the item.
tagThe tag to get the item.
Returns
The item at the specified layout direction and tag.

◆ getItemByIndex()

IBaseItem com.foxit.uiextensions.controls.toolbar.BaseBar.getItemByIndex ( TB_Position  location,
int  index 
)

Get a item at the specified position in the bar.

Parameters
locationThe TB_Position to get the item.
indexThe position at which to get the bar
Returns
The item at the specified layout direction and position.

◆ getItemsCount()

int com.foxit.uiextensions.controls.toolbar.BaseBar.getItemsCount ( TB_Position  location)

Returns the number of item in the bar at the specified layout direction.

Parameters
locationThe TB_Position to get the the number of item.
Returns
The number of item in the bar

◆ getItemVisibility()

int com.foxit.uiextensions.controls.toolbar.BaseBar.getItemVisibility ( TB_Position  location,
int  tag 
)

Returns the visibility status for this item.

Parameters
locationThe TB_Position to get the item visibility.
tagThe tag to get the item visibility.
Returns
-1
while the item can`t be found, or should be one of View#VISIBLE, View#INVISIBLE, or View#GONE.

◆ getItemVisibilityByIndex()

int com.foxit.uiextensions.controls.toolbar.BaseBar.getItemVisibilityByIndex ( TB_Position  location,
int  index 
)

Returns the visibility status for this item.

Parameters
locationThe TB_Position to get the item visibility.
indexThe position at which to get the bar visibility.
Returns
-1
while the item can`t be found, or should be one of View#VISIBLE, View#INVISIBLE, or View#GONE.

◆ removeAllItems()

void com.foxit.uiextensions.controls.toolbar.BaseBar.removeAllItems ( )

Remove all items of the bar.

◆ removeItem()

boolean com.foxit.uiextensions.controls.toolbar.BaseBar.removeItem ( IBaseItem  item)

Removes the specified item.

Parameters
itemThe item to remove.
Returns
true
if success,
false
otherwise.

◆ removeItemByIndex()

boolean com.foxit.uiextensions.controls.toolbar.BaseBar.removeItemByIndex ( TB_Position  position,
int  index 
)

Removes a item by the specified index.

Parameters
positionThe TB_Position to remove the item.
indexThe position at which to remove the item.
Returns
true
if success,
false
otherwise.

◆ removeItemByTag()

boolean com.foxit.uiextensions.controls.toolbar.BaseBar.removeItemByTag ( int  tag)

Removes a item by the specified tag.

Parameters
tagThe tag to remove the item.
Returns
true
if success,
false
otherwise.

◆ setBackgroundColor() [1/2]

void com.foxit.uiextensions.controls.toolbar.BaseBar.setBackgroundColor ( @ColorInt int  lightColor,
@ColorInt int  darkColor 
)

Sets the background color for this bar, supporting both light and dark mode. This method allows different background colors to be set depending on whether the system is in light or dark mode.

Parameters
lightColorthe background color to be used in light mode
darkColorthe background color to be used in dark mode

◆ setBackgroundColor() [2/2]

void com.foxit.uiextensions.controls.toolbar.BaseBar.setBackgroundColor ( int  color)

Sets the background color for this bar.

Parameters
colorthe color of the background

◆ setBackgroundResource()

void com.foxit.uiextensions.controls.toolbar.BaseBar.setBackgroundResource ( int  res)

Set the background to a given resource. The resource should refer to a Drawable object or 0 to remove the background.

Parameters
resThe identifier of the resource.

◆ setContentView()

void com.foxit.uiextensions.controls.toolbar.BaseBar.setContentView ( View  v)

Sets the View attached to this bar

Parameters
vThe View to set.

◆ setHeight()

void com.foxit.uiextensions.controls.toolbar.BaseBar.setHeight ( int  height)

Sets the height of the bar.

Parameters
heighthow tall the bar wants to be.

◆ setInterceptTouch()

void com.foxit.uiextensions.controls.toolbar.BaseBar.setInterceptTouch ( boolean  isInterceptTouch)

Whether intercepts the touch event.

Parameters
isInterceptTouch

◆ setItemInterval()

void com.foxit.uiextensions.controls.toolbar.BaseBar.setItemInterval ( int  space)

Set space between the items. Must use it after setOrientation(int).

Parameters
spaceThe space between the items.

◆ setItemVisibility()

void com.foxit.uiextensions.controls.toolbar.BaseBar.setItemVisibility ( TB_Position  location,
int  tag,
int  visibility 
)

Set the visibility state of this item.

Parameters
locationThe TB_Position to set the item visibility.
tagThe tag to set the item visibility.
visibilityshould be one of View#VISIBLE, View#INVISIBLE, or View#GONE.

◆ setItemVisibilityByIndex()

void com.foxit.uiextensions.controls.toolbar.BaseBar.setItemVisibilityByIndex ( TB_Position  location,
int  index,
int  visibility 
)

Set the visibility state of this item by the specified index.

Parameters
locationThe TB_Position to set the item visibility.
indexThe position at which to set the bar visibility.
visibilityshould be one of View#VISIBLE, View#INVISIBLE, or View#GONE.

◆ setOrientation() [1/2]

void com.foxit.uiextensions.controls.toolbar.BaseBar.setOrientation ( int  orientation)

Sets a layout direction of this bar view.

Parameters
orientationshould one of HORIZONTAL or VERTICAL.

◆ setOrientation() [2/2]

void com.foxit.uiextensions.controls.toolbar.BaseBar.setOrientation ( int  orientation,
int  width,
int  height 
)

Sets a layout direction of this bar view.

Parameters
orientationshould one of HORIZONTAL or VERTICAL.
widththe width of this bar
heightthe height of this bar

◆ setVisible()

void com.foxit.uiextensions.controls.toolbar.BaseBar.setVisible ( boolean  visible)

Set the visibility state of this bar.

Parameters
visible

◆ setWidth()

void com.foxit.uiextensions.controls.toolbar.BaseBar.setWidth ( int  width)

Sets the width of the bar.

Parameters
widthhow wide the view wants to be.

◆ updateLayout()

void com.foxit.uiextensions.controls.toolbar.BaseBar.updateLayout ( )

Update the layout of the toolbar

Member Data Documentation

◆ HORIZONTAL

final int com.foxit.uiextensions.controls.toolbar.BaseBar.HORIZONTAL = 0
static

Horizontal layout direction of this bar.

◆ VERTICAL

final int com.foxit.uiextensions.controls.toolbar.BaseBar.VERTICAL = 1
static

Vertical layout direction of this bar.