Package totalcross.ui

Class ShadedButton

    • Constructor Detail

      • ShadedButton

        public ShadedButton​(java.lang.String text,
                            Image back0,
                            int fcolor,
                            int bcolor)
    • Method Detail

      • onBoundsChanged

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

        public int getPreferredWidth()
        Description copied from class: Button
        Returns the preffered width of this control.
        Overrides:
        getPreferredWidth in class Button
      • getPreferredHeight

        public int getPreferredHeight()
        Description copied from class: Button
        Returns the preffered height of this control.
        Overrides:
        getPreferredHeight in class Button
      • onPaint

        public void onPaint​(Graphics g)
        Description copied from class: Button
        Called by the system to draw the button. it cuts the text if the button is too small.
        Overrides:
        onPaint in class Button
        Parameters:
        g - the graphics object for drawing
        See Also:
        Graphics