public class Toolbar extends Container
BASELINE, BOTTOM, BRB_CENTER_OFFSET, BRB_CONSTANT_ASCENT, BRB_CONSTANT_DESCENT, BRB_OTHER, CENTER, DRAG_REGION_LIKELY_DRAG_X, DRAG_REGION_LIKELY_DRAG_XY, DRAG_REGION_LIKELY_DRAG_Y, DRAG_REGION_NOT_DRAGGABLE, DRAG_REGION_POSSIBLE_DRAG_X, DRAG_REGION_POSSIBLE_DRAG_XY, DRAG_REGION_POSSIBLE_DRAG_Y, LEFT, RIGHT, TOP
Constructor and Description |
---|
Toolbar()
Empty Constructor
|
Toolbar(boolean layered)
This constructor places the Toolbar on a different layer on top of the
Content Pane.
|
Modifier and Type | Method and Description |
---|---|
void |
addCommandToLeftBar(Command cmd)
Adds a Command to the TitleArea on the left side.
|
void |
addCommandToOverflowMenu(Command cmd)
Adds a Command to the overflow menu
|
void |
addCommandToRightBar(Command cmd)
Adds a Command to the TitleArea on the right side.
|
void |
addCommandToSideMenu(Command cmd)
Adds a Command to the side navigation menu
|
void |
addComponentToSideMenu(Component cmp)
Adds a Component to the side navigation menu.
|
void |
addComponentToSideMenu(Component cmp,
Command cmd)
Adds a Component to the side navigation menu.
|
boolean |
animate()
Allows the animation to reduce "repaint" calls when it returns false.
|
protected List |
createOverflowCommandList(Vector commands)
Creates the list component containing the commands within the given
vector used for showing the menu dialog
|
MenuBar |
getMenuBar()
Returns the associated SideMenuBar object of this Toolbar.
|
void |
hideToolbar()
Hide the Toolbar if it is currently showing
|
protected void |
initTitleBarStatus()
Adds a status bar space to the north of the Component, subclasses can
override this default behavior.
|
void |
setScrollOffUponContentPane(boolean scrollOff)
Sets the Toolbar to scroll off the screen upon content scroll.
|
void |
setTitle(String title)
Sets the title of the Toolbar.
|
void |
setTitleComponent(Component titleCmp)
Sets the Toolbar title component.
|
protected Command |
showOverflowMenu(Dialog menu) |
void |
showToolbar()
Show the Toolbar if it is currently not showing
|
addComponent, addComponent, addComponent, addComponent, animateHierarchy, animateHierarchyAndWait, animateHierarchyFade, animateHierarchyFadeAndWait, animateLayout, animateLayoutAndWait, animateLayoutFade, animateLayoutFadeAndWait, animateUnlayout, animateUnlayoutAndWait, applyRTL, calcPreferredSize, cancelRepaints, clearClientProperties, contains, createAnimateMotion, dragInitiated, drop, findFirstFocusable, fireClicked, flushReplace, forceRevalidate, getBottomGap, getClosestComponentTo, getComponentAt, getComponentAt, getComponentCount, getComponentIndex, getGridPosX, getGridPosY, getLayout, getLayoutHeight, getLayoutWidth, getLeadComponent, getLeadParent, getScrollIncrement, getSideGap, getUIManager, initLaf, invalidate, isEnabled, isScrollableX, isScrollableY, isSelectableInteraction, keyPressed, keyReleased, layoutContainer, morph, morphAndWait, paint, paintComponentBackground, paintGlass, paramString, pointerHover, pointerPressed, refreshTheme, removeAll, removeComponent, replace, replace, replaceAndWait, replaceAndWait, replaceAndWait, revalidate, scrollComponentToVisible, setCellRenderer, setEnabled, setLayout, setLeadComponent, setScrollable, setScrollableX, setScrollableY, setScrollIncrement, setShouldCalcPreferredSize, setShouldLayout, setUIManager
addDragOverListener, addDropListener, addFocusListener, addPointerDraggedListener, addPointerPressedListener, addPointerReleasedListener, addPullToRefresh, addScrollListener, bindProperty, calcScrollSize, contains, deinitialize, deinitializeCustomStyle, dragEnter, dragExit, draggingOver, drawDraggedImage, focusGained, focusLost, getAbsoluteX, getAbsoluteY, getBaseline, getBaselineResizeBehavior, getBindablePropertyNames, getBindablePropertyTypes, getBorder, getBoundPropertyValue, getBounds, getClientProperty, getCloudBoundProperty, getCloudDestinationProperty, getComponentForm, getComponentState, getDirtyRegion, getDisabledStyle, getDraggedx, getDraggedy, getDragImage, getDragRegionStatus, getDragSpeed, getHeight, getLabelForComponent, getName, getNextFocusDown, getNextFocusLeft, getNextFocusRight, getNextFocusUp, getParent, getPreferredH, getPreferredSize, getPreferredW, getPressedStyle, getPropertyNames, getPropertyTypeNames, getPropertyTypes, getPropertyValue, getSameHeight, getSameWidth, getScrollable, getScrollAnimationSpeed, getScrollDimension, getScrollOpacity, getScrollOpacityChangeSpeed, getScrollX, getScrollY, getSelectCommandText, getSelectedRect, getSelectedStyle, getStyle, getTensileLength, getUIID, getUnselectedStyle, getVisibleBounds, getWidth, getX, getY, growShrink, handlesInput, hasFocus, initComponent, initCustomStyle, installDefaultPainter, isAlwaysTensile, isCellRenderer, isDragActivated, isDragAndDropOperation, isDraggable, isDragRegion, isDropTarget, isFlatten, isFocusable, isGrabsPointerEvents, isHideInPortrait, isInClippingRegion, isInitialized, isRTL, isScrollable, isScrollVisible, isSmoothScrolling, isSnapToGrid, isStickyDrag, isTactileTouch, isTactileTouch, isTensileDragEnabled, isVisible, keyRepeated, laidOut, longKeyPress, longPointerPress, onScrollX, onScrollY, paintBackground, paintBackgrounds, paintBorder, paintComponent, paintComponent, paintLock, paintLockRelease, paintScrollbars, paintScrollbarX, paintScrollbarY, pinch, pointerDragged, pointerDragged, pointerHoverPressed, pointerHoverReleased, pointerPressed, pointerReleased, pointerReleased, putClientProperty, refreshTheme, refreshTheme, removeDragOverListener, removeDropListener, removeFocusListener, removePointerDraggedListener, removePointerPressedListener, removePointerReleasedListener, removeScrollListener, repaint, repaint, requestFocus, resetFocusable, scrollRectToVisible, scrollRectToVisible, setAlwaysTensile, setBoundPropertyValue, setCloudBoundProperty, setCloudDestinationProperty, setComponentState, setDirtyRegion, setDisabledStyle, setDraggable, setDropTarget, setFlatten, setFocus, setFocusable, setGrabsPointerEvents, setHandlesInput, setHeight, setHideInPortrait, setInitialized, setIsScrollVisible, setLabelForComponent, setName, setNextFocusDown, setNextFocusLeft, setNextFocusRight, setNextFocusUp, setPreferredH, setPreferredSize, setPreferredW, setPressedStyle, setPropertyValue, setRTL, setSameHeight, setSameWidth, setScrollAnimationSpeed, setScrollOpacityChangeSpeed, setScrollSize, setScrollVisible, setScrollX, setScrollY, setSelectCommandText, setSelectedStyle, setSize, setSmoothScrolling, setSnapToGrid, setTactileTouch, setTensileDragEnabled, setTensileLength, setUIID, setUnselectedStyle, setVisible, setWidth, setX, setY, shouldBlockSideSwipe, styleChanged, toString, unbindProperty
public Toolbar()
public Toolbar(boolean layered)
layered
- if true places the Toolbar on top of the Content Panepublic void setTitle(String title)
title
- the Toolbar titlepublic void setTitleComponent(Component titleCmp)
titleCmp
- Comoponent to place in the Toolbar center.public void addCommandToOverflowMenu(Command cmd)
cmd
- a Commandpublic void addCommandToSideMenu(Command cmd)
cmd
- a Commandpublic void addComponentToSideMenu(Component cmp, Command cmd)
cmp
- c Component to be added to the menucmd
- a Command to handle the eventspublic void addComponentToSideMenu(Component cmp)
cmp
- c Component to be added to the menupublic void addCommandToRightBar(Command cmd)
cmd
- a Commandpublic void addCommandToLeftBar(Command cmd)
cmd
- a Commandpublic MenuBar getMenuBar()
protected List createOverflowCommandList(Vector commands)
commands
- list of command objectsprotected void initTitleBarStatus()
public void setScrollOffUponContentPane(boolean scrollOff)
scrollOff
- if true the Toolbar needs to scroll off the screen when
the Form ContentPane is scrolledpublic void hideToolbar()
public void showToolbar()