Package totalcross.ui

Class Bar.BarButton

  • Enclosing class:
    Bar

    public class Bar.BarButton
    extends Control
    A Bar's button. You can create an extension of this class using:
          Bar b = new Bar();
          b.new BarButton("Hi",null)
          {
             ... other methods
          };
     
    • Field Detail

      • buttonTitleAlign

        public int buttonTitleAlign
      • buttonCanSelectTitle

        public boolean buttonCanSelectTitle
      • isShadedText

        public boolean isShadedText
      • isSticky

        public boolean isSticky
      • down

        public boolean down
      • fillColor

        public int fillColor
    • Constructor Detail

      • BarButton

        public BarButton​(java.lang.String title,
                         Image icon)
    • Method Detail

      • setTitle

        public void setTitle​(java.lang.String s)
      • onFontChanged

        public void onFontChanged()
        Description copied from class: Control
        Called after a setFont
        Overrides:
        onFontChanged in class Control
      • onBoundsChanged

        public void onBoundsChanged​(boolean b)
        Description copied from class: Control
        Called after a setRect.
        Overrides:
        onBoundsChanged in class Control
        Parameters:
        b - If the bounds were changed due to a screen change (rotation, collapse)
      • onPaint

        public void onPaint​(Graphics g)
        Description copied from class: Control
        Called to draw the control. When this method is called, the graphics object passed has been translated into the coordinate system of the control and the area behind the control has already been painted.
        Overrides:
        onPaint in class Control
        Parameters:
        g - the graphics object for drawing
        See Also:
        Graphics
      • 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