Package totalcross.ui

Class TopMenu.Item

    • Constructor Detail

      • Item

        protected Item()
        Used when you want to fully customize your Item by extending this class.
      • Item

        public Item​(Control c,
                    Image icon)
        Pass a Control and optionally an icon
      • Item

        public Item​(Control c,
                    Control icon)
        Pass a Control and optionally another control that serves as an icon
      • Item

        public Item​(java.lang.String cap,
                    Image icon)
        Creates a Label and optionally an icon
    • 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
      • onEvent

        public void onEvent​(Event e)
        Description copied from class: Control
        Called to process key, pen, control and other posted events.
        Overrides:
        onEvent in class Control
        Parameters:
        e - the event to process
        See Also:
        Event, KeyEvent, PenEvent