lev.gui

## Class LProgressBar

- java.lang.Object
- - java.awt.Component
  - - java.awt.Container
    - - lev.gui.LComponent
      - - lev.gui.LProgressBar

- All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, LProgressBarInterface

      public class LProgressBar
      extends LComponent
      implements LProgressBarInterface

  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.awt.Container

      `java.awt.Container.AccessibleAWTContainer`

    - ### Nested classes/interfaces inherited from class java.awt.Component

      `java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected javax.swing.JProgressBar` | `bar`
    `protected boolean` | `centered`
    `protected boolean` | `pause`
    `protected LLabel` | `status`

    - ### Fields inherited from class java.awt.Component

      `BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT`

    - ### Fields inherited from interface java.awt.image.ImageObserver

      `ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LProgressBar(int width, int height, java.awt.Font footerF, java.awt.Color footerC)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addShadow()`
    `void` | `done()` Sets the current value to the max value (100%).
    `int` | `getBar()`
    `int` | `getMax()`
    `void` | `incrementBar()` Increments the progress bar one unit.
    `void` | `pause(boolean on)` Block the progress bar from updating.
    `boolean` | `paused()`
    `void` | `reset()` Resets the progress bar to zero of max.
    `void` | `setBar(int in)`
    `void` | `setCentered(boolean centered)`
    `void` | `setDoneListener(javax.swing.event.ChangeListener c)`
    `void` | `setMax(int in)`
    `void` | `setMax(int max, java.lang.String reason)`
    `void` | `setSize(int x, int y)`
    `void` | `setStatus(java.lang.String input_)`
    `void` | `setStatusLabel(LLabel label)`
    `void` | `setStatusNumbered(int min, int max, java.lang.String status)` Updates the progress bar status text to display: ([cur]/[max]) [status]
    `void` | `setStatusNumbered(java.lang.String status)` Updates the progress bar status text to display the current step in the form of: ([cur]/[max]) [status]
    `void` | `setStatusOffset(int y)`

    - ### Methods inherited from class lev.gui.LComponent

      `Add, centerIn, centerOn, centerOn, getBottom, getCenter, getRight, putUnder`

    - ### Methods inherited from class java.awt.Container

      `add, add, add, add, add, addContainerListener, addImpl, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, isValidateRoot, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, update, validate, validateTree`

    - ### Methods inherited from class java.awt.Component

      `action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### bar

          protected javax.swing.JProgressBar bar

    - #### pause

          protected boolean pause

    - #### status

          protected LLabel status

    - #### centered

          protected boolean centered

  - ### Constructor Detail

    - #### LProgressBar

          public LProgressBar(int width,
                      int height,
                      java.awt.Font footerF,
                      java.awt.Color footerC)

      Parameters:
        `width` -
        `height` -
        `footerF` -
        `footerC` -

  - ### Method Detail

    - #### setSize

          public void setSize(int x,
                     int y)

      Overrides:
        `setSize` in class `java.awt.Component`

    - #### setCentered

          public void setCentered(boolean centered)

      Parameters:
        `centered` -

    - #### setMax

          public void setMax(int max,
                    java.lang.String reason)

      Specified by:
        `setMax` in interface `LProgressBarInterface`
      Parameters:
        `max` - Value to set as the max unit value of the progress bar.
        `reason` - String to set as the status of the progress bar.

    - #### addShadow

          public void addShadow()

    - #### incrementBar

          public void incrementBar()

      Description copied from interface: `LProgressBarInterface`
      Increments the progress bar one unit.
      Specified by:
        `incrementBar` in interface `LProgressBarInterface`

    - #### setStatusOffset

          public void setStatusOffset(int y)

      Parameters:
        `y` -

    - #### setStatus

          public void setStatus(java.lang.String input_)

      Specified by:
        `setStatus` in interface `LProgressBarInterface`
      Parameters:
        `input_` - String to set as the status of the progress bar.

    - #### setDoneListener

          public void setDoneListener(javax.swing.event.ChangeListener c)

      Parameters:
        `c` -

    - #### setMax

          public void setMax(int in)

      Specified by:
        `setMax` in interface `LProgressBarInterface`
      Parameters:
        `in` - Value to set as the max unit value of the progress bar.

    - #### reset

          public void reset()

      Description copied from interface: `LProgressBarInterface`
      Resets the progress bar to zero of max.
      Specified by:
        `reset` in interface `LProgressBarInterface`

    - #### setBar

          public void setBar(int in)

      Specified by:
        `setBar` in interface `LProgressBarInterface`
      Parameters:
        `in` - value to set the progress bar at.

    - #### getBar

          public int getBar()

      Specified by:
        `getBar` in interface `LProgressBarInterface`
      Returns:
        Current value of the bar

    - #### getMax

          public int getMax()

      Specified by:
        `getMax` in interface `LProgressBarInterface`
      Returns:
        Current max value of the bar

    - #### setStatusNumbered

          public void setStatusNumbered(int min,
                               int max,
                               java.lang.String status)

      Description copied from interface: `LProgressBarInterface`
      Updates the progress bar status text to display:
      ([cur]/[max]) [status]
      Specified by:
        `setStatusNumbered` in interface `LProgressBarInterface`

    - #### setStatusNumbered

          public void setStatusNumbered(java.lang.String status)

      Description copied from interface: `LProgressBarInterface`
      Updates the progress bar status text to display the current step in the form of:
      ([cur]/[max]) [status]
      Specified by:
        `setStatusNumbered` in interface `LProgressBarInterface`
      Parameters:
        `status` -

    - #### setStatusLabel

          public void setStatusLabel(LLabel label)

      Parameters:
        `label` -

    - #### pause

          public void pause(boolean on)

      Description copied from interface: `LProgressBarInterface`
      Block the progress bar from updating.
      Specified by:
        `pause` in interface `LProgressBarInterface`

    - #### paused

          public boolean paused()

      Specified by:
        `paused` in interface `LProgressBarInterface`
      Returns:
        Whether the progress bar is accepting updates.

    - #### done

          public void done()

      Description copied from interface: `LProgressBarInterface`
      Sets the current value to the max value (100%).
      Specified by:
        `done` in interface `LProgressBarInterface`