Package jexer

Class TProgressBar

  • All Implemented Interfaces:
    java.lang.Comparable<TWidget>

    public class TProgressBar
    extends TWidget
    TProgressBar implements a simple progress bar.
    • Constructor Detail

      • TProgressBar

        public TProgressBar​(TWidget parent,
                            int x,
                            int y,
                            int width,
                            int value)
        Public constructor.
        Parameters:
        parent - parent widget
        x - column relative to parent
        y - row relative to parent
        width - width of progress bar
        value - initial value of percent complete
    • Method Detail

      • setHeight

        public void setHeight​(int height)
        Override TWidget's height: we can only set height at construction time.
        Overrides:
        setHeight in class TWidget
        Parameters:
        height - new widget height (ignored)
      • draw

        public void draw()
        Draw a static progress bar.
        Overrides:
        draw in class TWidget
      • getMinValue

        public int getMinValue()
        Get the value that corresponds to 0% progress.
        Returns:
        the value that corresponds to 0% progress
      • setMinValue

        public void setMinValue​(int minValue)
        Set the value that corresponds to 0% progress.
        Parameters:
        minValue - the value that corresponds to 0% progress
      • getMaxValue

        public int getMaxValue()
        Get the value that corresponds to 100% progress.
        Returns:
        the value that corresponds to 100% progress
      • setMaxValue

        public void setMaxValue​(int maxValue)
        Set the value that corresponds to 100% progress.
        Parameters:
        maxValue - the value that corresponds to 100% progress
      • getValue

        public int getValue()
        Get the current value of the progress.
        Returns:
        the current value of the progress
      • setValue

        public void setValue​(int value)
        Set the current value of the progress.
        Parameters:
        value - the current value of the progress
      • setLeftBorderChar

        public void setLeftBorderChar​(int ch)
        Set the left border character.
        Parameters:
        ch - the char to use
      • getLeftBorderChar

        public int getLeftBorderChar()
        Get the left border character.
        Returns:
        the char
      • setCompletedChar

        public void setCompletedChar​(int ch)
        Set the filled-in part of the bar.
        Parameters:
        ch - the char to use
      • getCompletedChar

        public int getCompletedChar()
        Get the filled-in part of the bar.
        Returns:
        the char
      • setRemainingChar

        public void setRemainingChar​(int ch)
        Set the remaining to be filled in part of the bar.
        Parameters:
        ch - the char to use
      • getRemainingChar

        public int getRemainingChar()
        Get the remaining to be filled in part of the bar.
        Returns:
        the char
      • setRightBorderChar

        public void setRightBorderChar​(int ch)
        Set the right border character.
        Parameters:
        ch - the char to use
      • getRightBorderChar

        public int getRightBorderChar()
        Get the right border character.
        Returns:
        the char