Package totalcross.ui

Class SideMenuContainer

  • All Implemented Interfaces:
    EventHandler, PenListener

    public class SideMenuContainer
    extends Container
    implements PenListener
    Template for navigation based on a menu using a navbar and a sidenav.

    This is an incubating feature, therefore backwards compatibility is not guaranteed

    • Field Detail

    • Constructor Detail

      • SideMenuContainer

        public SideMenuContainer​(java.lang.String title,
                                 Control... items)
      • SideMenuContainer

        public SideMenuContainer​(int direction,
                                 java.lang.String title,
                                 Control... items)
    • Method Detail

      • initUI

        public void initUI()
        Description copied from class: Container
        Called to initialize the User Interface of this container. This differs from the onAddAgain method by that this method is called only once, at the first time the control is added to the parent. When the container is being setup, the initUI method is called; then, the onAddAgain is called every time the container is added again.
        Overrides:
        initUI in class Container
      • setBarFont

        public void setBarFont​(Font f)
      • swap

        public void swap​(SideMenuContainer.Item item)
        Presents the given SideMenuContainer.Item, swapping the caption and the contents of this SideMenu.
        Parameters:
        item - The item to be presented
      • setForeColor

        public void setForeColor​(int color)
        Description copied from class: Control
        Set the foreground color of this control.
        Overrides:
        setForeColor in class Control
      • setItemForeColor

        public void setItemForeColor​(int color)
      • setBackColor

        public void setBackColor​(int color)
        Description copied from class: Control
        Set the background color of this control.
        Overrides:
        setBackColor in class Control