# Class Progress

java.lang.Object
com.codename1.ui.Component
com.codename1.ui.Container
com.codename1.ui.Form
com.codename1.ui.Dialog
com.codename1.components.Progress

All Implemented Interfaces:
  `AbstractDialog, Animation, Editable, ActionListener<NetworkEvent>, StyleListener, Iterable<Component>`

public class Progress extends Dialog implements ActionListener<NetworkEvent>
Displays a progress dialog with the ability to cancel an ongoing operation

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from class Form

  `Form.TabIterator`

- ## Field Summary

  ### Fields inherited from class Dialog

  `TYPE_ALARM, TYPE_CONFIRMATION, TYPE_ERROR, TYPE_INFO, TYPE_NONE, TYPE_WARNING`

  ### Fields inherited from class Form

  `focusScrolling`

  ### Fields inherited from class Component

  `BASELINE, BOTTOM, BRB_CENTER_OFFSET, BRB_CONSTANT_ASCENT, BRB_CONSTANT_DESCENT, BRB_OTHER, CENTER, CROSSHAIR_CURSOR, DEFAULT_CURSOR, DRAG_REGION_IMMEDIATELY_DRAG_X, DRAG_REGION_IMMEDIATELY_DRAG_XY, DRAG_REGION_IMMEDIATELY_DRAG_Y, DRAG_REGION_LIKELY_DRAG_X, DRAG_REGION_LIKELY_DRAG_XY, DRAG_REGION_LIKELY_DRAG_Y, DRAG_REGION_NOT_DRAGGABLE, DRAG_REGION_POSSIBLE_DRAG_X, DRAG_REGION_POSSIBLE_DRAG_XY, DRAG_REGION_POSSIBLE_DRAG_Y, E_RESIZE_CURSOR, HAND_CURSOR, LEFT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NW_RESIZE_CURSOR, RIGHT, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, TOP, W_RESIZE_CURSOR, WAIT_CURSOR`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Progress(String title, ConnectionRequest request)`
  Binds the progress UI to the completion of this request
  `Progress(String title, ConnectionRequest request, boolean showPercentage)`
  Binds the progress UI to the completion of this request

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `actionCommand(Command cmd)`
  Invoked to allow subclasses of form to handle a command from one point rather than implementing many command instances
  `void`
  `actionPerformed(NetworkEvent ev)`
  Invoked when an action occurred on a component
  `void`
  `dispose()`
  Closes the current form and returns to the previous form, releasing the EDT in the process
  `boolean`
  `isAutoShow()`
  Shows the progress automatically when the request processing is started
  `boolean`
  `isDisposeOnCompletion()`

  ###### Returns

  `void`
  `setAutoShow(boolean autoShow)`
  Shows the progress automatically when the request processing is started
  `void`
  `setDisposeOnCompletion(boolean disposeOnCompletion)`

  ###### Parameters

  ### Methods inherited from class Dialog

  `addComponent, addComponent, addComponent, addComponent, animate, autoAdjust, configureCommands, getBlurBackgroundRadius, getContentPane, getDefaultBlurBackgroundRadius, getDefaultDialogPosition, getDefaultDialogType, getDialogComponent, getDialogPosition, getDialogPreferredSize, getDialogStyle, getDialogType, getDialogUIID, getLayout, getPopupDirectionBiasPortrait, getTitle, getTitleComponent, getTitleStyle, growOrShrink, initGlobalToolbar, initLaf, isAutoAdjustDialogSize, isAutoDispose, isCommandsAsButtons, isDefaultDisposeWhenPointerOutOfBounds, isDefaultInteractionDialogMode, isDefaultTitleCentered, isDisableStaticDialogScrolling, isDisposeWhenPointerOutOfBounds, isInteractionDialogMode, isTitleCentered, keyReleased, onShow, placeButtonCommands, pointerPressed, pointerReleased, removeAll, removeComponent, setAutoAdjustDialogSize, setAutoDispose, setBlurBackgroundRadius, setCommandsAsButtons, setDefaultBlurBackgroundRadius, setDefaultDialogPosition, setDefaultDialogType, setDefaultDisposeWhenPointerOutOfBounds, setDefaultInteractionDialogMode, setDefaultTitleCentered, setDialogPosition, setDialogStyle, setDialogType, setDialogUIID, setDisableStaticDialogScrolling, setDisposeWhenPointerOutOfBounds, setInteractionDialogMode, setLayout, setPopupDirectionBiasPortrait, setPreviousForm, setScrollable, setTimeout, setTitle, setTitleCentered, setTitleComponent, setTitleComponent, setTransitions, setUIIDByPopupPosition, show, show, show, show, show, show, show, show, show, show, show, show, show, show, show, show, show, showAtPosition, showBack, showDialog, showModeless, showPacked, showPopupDialog, showPopupDialog, showStetched, showStretched, wasDisposedDueToOutOfBoundsTouch, wasDisposedDueToRotation`

  ### Methods inherited from class Form

  `addCommand, addCommand, addCommandListener, addComponentAwaitingRelease, addGameKeyListener, addKeyListener, addOrientationListener, addPasteListener, addShowListener, addSizeChangedListener, animateHierarchy, animateHierarchyAndWait, animateHierarchyFade, animateHierarchyFadeAndWait, animateLayout, animateLayoutAndWait, animateLayoutFade, animateLayoutFadeAndWait, animateUnlayout, animateUnlayoutAndWait, checkPopGuard, clearComponentsAwaitingRelease, createStatusBar, deregisterAnimated, dispatchCommand, dispatchPaste, findCurrentlyEditingComponent, findNextFocusHorizontal, findNextFocusVertical, getAnimationManager, getBackCommand, getClearCommand, getCommand, getCommandCount, getComponentForm, getComponentIndex, getCurrentInputDevice, getDefaultCommand, getDragRegionStatus, getEditOnShow, getFocused, getFormLayeredPane, getFormLayeredPaneIfExists, getGlassPane, getInvisibleAreaUnderVKB, getLayeredPane, getLayeredPane, getLayeredPane, getLayeredPaneIfExists, getMenuBar, getMenuStyle, getNextComponent, getPopGuard, getPreviousComponent, getPropertyNames, getPropertyTypeNames, getPropertyTypes, getPropertyValue, getSafeArea, getScrollAnimationSpeed, getSideGap, getSoftButton, getSoftButtonCount, getSourceCommand, getTabIterator, getTextSelection, getTintColor, getTitleArea, getToolbar, getTransitionInAnimator, getTransitionOutAnimator, getUIManager, grabAnimationLock, hasMedia, hideNotify, isAlwaysTensile, isCyclicFocus, isDragRegion, isEditing, isEnableCursors, isFocusScrolling, isFormBottomPaddingEditingMode, isMinimizeOnBack, isScrollable, isScrollableX, isScrollableY, isScrollVisible, isSingleFocusMode, isSmoothScrolling, keyPressed, keyRepeated, longKeyPress, longPointerPress, onRegisterAnimated, onShowCompleted, paint, paintBackground, paintScrollbars, paramString, pointerDragged, pointerDragged, pointerHover, pointerHoverPressed, pointerHoverReleased, refreshTheme, registerAnimated, releaseAnimationLock, removeAllCommands, removeAllShowListeners, removeCommand, removeCommandListener, removeComponentAwaitingRelease, removeGameKeyListener, removeKeyListener, removeOrientationListener, removePasteListener, removeShowListener, removeSizeChangedListener, replace, replaceAndWait, resumeDragAfterScrolling, scrollComponentToVisible, setAllowEnableLayoutOnPaint, setAlwaysTensile, setBackCommand, setBackCommand, setBgImage, setClearCommand, setCurrentInputDevice, setCyclicFocus, setDefaultCommand, setEditOnShow, setEnableCursors, setFocused, setFocusScrolling, setFormBottomPaddingEditingMode, setGlassPane, setMenuBar, setMenuCellRenderer, setMenuTransitions, setMinimizeOnBack, setOverrideInvisibleAreaUnderVKB, setPopGuard, setPropertyValue, setRTL, setSafeAreaChanged, setScrollableX, setScrollableY, setScrollAnimationSpeed, setScrollVisible, setSmoothScrolling, setSourceCommand, setTintColor, setTitleStyle, setToolbar, setToolBar, setTransitionInAnimator, setTransitionOutAnimator, setUIManager, setVisible, shouldPaintStatusBar, shouldSendPointerReleaseToOtherForm, showNotify, sizeChanged, stopEditing`

  ### Methods inherited from class Container

  `add, add, add, add, add, add, addAll, applyRTL, calcPreferredSize, cancelRepaints, clearClientProperties, constrainHeightWhenScrollable, constrainWidthWhenScrollable, contains, createAnimateHierarchy, createAnimateHierarchyFade, createAnimateLayout, createAnimateLayoutFade, createAnimateLayoutFadeAndWait, createAnimateMotion, createAnimateUnlayout, createReplaceTransition, dragInitiated, drop, encloseIn, encloseIn, findDropTargetAt, findFirstFocusable, fireClicked, flushReplace, forceRevalidate, getBottomGap, getChildrenAsList, getClosestComponentTo, getComponentAt, getComponentAt, getComponentCount, getGridPosX, getGridPosY, getLayoutHeight, getLayoutWidth, getLeadComponent, getLeadParent, getResponderAt, getSafeAreaRoot, getScrollIncrement, invalidate, isEnabled, isSafeArea, isSafeAreaRoot, isSelectableInteraction, isSurface, iterator, iterator, layoutContainer, morph, morphAndWait, paintComponentBackground, paintGlass, replace, replaceAndWait, replaceAndWait, revalidate, revalidateLater, revalidateWithAnimationSafety, setCellRenderer, setEnabled, setLeadComponent, setSafeArea, setSafeAreaRoot, setScrollIncrement, setShouldCalcPreferredSize, setShouldLayout, updateTabIndices`

  ### Methods inherited from class Component

  `accessibilityChanged, accessibilityChanged, addContextMenuListener, addDragFinishedListener, addDragOverListener, addDropListener, addFocusListener, addLongPressListener, addMouseWheelListener, addPointerDraggedListener, addPointerPressedListener, addPointerReleasedListener, addPullToRefresh, addScrollListener, addStateChangeListener, addStylusListener, announceForAccessibility, bindProperty, blocksSideSwipe, calcScrollSize, consumesRawTextInput, contains, containsOrOwns, createStyleAnimation, deinitialize, deinitializeCustomStyle, dragEnter, dragExit, dragFinished, draggingOver, drawDraggedImage, focusGained, focusLost, getAbsoluteX, getAbsoluteY, getAccessibilityNode, getAccessibilityText, getAllStyles, getBaseline, getBaselineResizeBehavior, getBindablePropertyNames, getBindablePropertyTypes, getBorder, getBoundPropertyValue, getBounds, getBounds, getClientProperty, getCloudBoundProperty, getCloudDestinationProperty, getComponentState, getCursor, getDefaultDragTransparency, getDirtyRegion, getDisabledStyle, getDraggedx, getDraggedy, getDragImage, getDragSpeed, getDragTransparency, getEditingDelegate, getHeight, getInlineAllStyles, getInlineDisabledStyles, getInlinePressedStyles, getInlineSelectedStyles, getInlineStylesTheme, getInlineUnselectedStyles, getInnerHeight, getInnerPreferredH, getInnerPreferredW, getInnerWidth, getInnerX, getInnerY, getLabelForComponent, getName, getNativeOverlay, getNextFocusDown, getNextFocusLeft, getNextFocusRight, getNextFocusUp, getOuterHeight, getOuterPreferredH, getOuterPreferredW, getOuterWidth, getOuterX, getOuterY, getOwner, getParent, getPreferredH, getPreferredSize, getPreferredSizeStr, getPreferredTabIndex, getPreferredW, getPressedStyle, getSameHeight, getSameWidth, getScrollable, getScrollDimension, getScrollOpacity, getScrollOpacityChangeSpeed, getScrollX, getScrollY, getSelectCommandText, getSelectedRect, getSelectedStyle, getSemantics, getStyle, getTabIndex, getTensileLength, getTextSelectionSupport, getTooltip, getUIID, getUnselectedStyle, getVisibleBounds, getVisibleBounds, getWidth, getX, getY, growShrink, handlesInput, hasFixedPreferredSize, hasFocus, hideNativeOverlay, initComponent, initCustomStyle, initDisabledStyle, initPressedStyle, initSelectedStyle, initUnselectedStyle, installDefaultPainter, isBlockLead, isCellRenderer, isChildOf, isDragActivated, isDragAndDropOperation, isDraggable, isDropTarget, isEditable, isFlatten, isFocusable, isGrabsPointerEvents, isHidden, isHidden, isHideInLandscape, isHideInPortrait, isHScrollThumbGrabbed, isHScrollThumbHover, isIgnorePointerEvents, isInClippingRegion, isInitialized, isOpaque, isOwnedBy, isPinchBlocksDragAndDrop, isRippleEffect, isRTL, isSetCursorSupported, isSnapToGrid, isStickyDrag, isTactileTouch, isTactileTouch, isTensileDragEnabled, isTraversable, isVisible, isVScrollThumbGrabbed, isVScrollThumbHover, laidOut, onScrollX, onScrollY, onSetFocusable, paintBackgrounds, paintBorder, paintBorderBackground, paintComponent, paintComponent, paintIntersectingComponentsAbove, paintLock, paintLockRelease, paintRippleOverlay, paintScrollbarX, paintScrollbarY, paintShadows, parsePreferredSize, pinch, pinch, pinchReleased, pointerPressed, pointerReleased, putClientProperty, refreshTheme, refreshTheme, remove, removeContextMenuListener, removeDragFinishedListener, removeDragOverListener, removeDropListener, removeFocusListener, removeLongPressListener, removeMouseWheelListener, removePointerDraggedListener, removePointerPressedListener, removePointerReleasedListener, removeScrollListener, removeStateChangeListener, removeStylusListener, repaint, repaint, requestFocus, resetFocusable, respondsToPointerEvents, rotation, scrollRectToVisible, scrollRectToVisible, setAccessibilityText, setBlockLead, setBoundPropertyValue, setCloudBoundProperty, setCloudDestinationProperty, setComponentState, setCursor, setDefaultDragTransparency, setDirtyRegion, setDisabledStyle, setDraggable, setDragTransparency, setDropTarget, setEditingDelegate, setFlatten, setFocus, setFocusable, setGrabsPointerEvents, setHandlesInput, setHeight, setHidden, setHidden, setHideInLandscape, setHideInPortrait, setHorizontalScrollBounds, setIgnorePointerEvents, setInitialized, setInlineAllStyles, setInlineDisabledStyles, setInlinePressedStyles, setInlineSelectedStyles, setInlineStylesTheme, setInlineUnselectedStyles, setIsScrollVisible, setLabelForComponent, setName, setNextFocusDown, setNextFocusLeft, setNextFocusRight, setNextFocusUp, setOpaque, setOwner, setPinchBlocksDragAndDrop, setPreferredH, setPreferredSize, setPreferredSizeStr, setPreferredTabIndex, setPreferredW, setPressedStyle, setPullToRefresh, setRippleEffect, setSameHeight, setSameSize, setSameWidth, setScrollOpacityChangeSpeed, setScrollSize, setScrollX, setScrollY, setSelectCommandText, setSelectedStyle, setSize, setSnapToGrid, setTabIndex, setTactileTouch, setTensileDragEnabled, setTensileLength, setTooltip, setTraversable, setUIID, setUIID, setUIIDFinal, setUnselectedStyle, setVerticalScrollBounds, setWidth, setX, setY, shouldBlockSideSwipe, shouldBlockSideSwipeLeft, shouldBlockSideSwipeRight, shouldRenderComponentSelection, showNativeOverlay, startEditingAsync, stripMarginAndPadding, styleChanged, toImage, toString, unbindProperty, updateNativeOverlay, visibleBoundsContains`

  ### Methods inherited from class Object

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

  ### Methods inherited from interface AbstractDialog

  `setDefaultCommand`

  ### Methods inherited from interface Iterable

  `forEach`

- ## Constructor Details

  - ### Progress

    public Progress(String title, ConnectionRequest request)

    Binds the progress UI to the completion of this request

    ###### Parameters

    - `title`: the title of the progress dialog

    - `request`: the network request pending

  - ### Progress

    public Progress(String title, ConnectionRequest request, boolean showPercentage)

    Binds the progress UI to the completion of this request

    ###### Parameters

    - `title`: the title of the progress dialog

    - `request`: the network request pending

    - `showPercentage`: shows percentage on the progress bar

- ## Method Details

  - ### actionCommand

    protected void actionCommand(Command cmd)

    Invoked to allow subclasses of form to handle a command from one point rather than implementing many command instances

    ###### Parameters

    - `cmd`: the action command
    Overrides:
      `actionCommand` in class `Dialog`

  - ### dispose

    public void dispose()
    Closes the current form and returns to the previous form, releasing the EDT in the process
    Specified by:
      `dispose` in interface `AbstractDialog`
    Overrides:
      `dispose` in class `Dialog`

  - ### isDisposeOnCompletion

    public boolean isDisposeOnCompletion()

    ###### Returns

    the disposeOnCompletion

  - ### setDisposeOnCompletion

    public void setDisposeOnCompletion(boolean disposeOnCompletion)

    ###### Parameters

    - `disposeOnCompletion`: the disposeOnCompletion to set

  - ### actionPerformed

    public void actionPerformed(NetworkEvent ev)

    Invoked when an action occurred on a component

    ###### Parameters

    - `evt`: @param evt event object describing the source of the action as well as its trigger
    Specified by:
      `actionPerformed` in interface `ActionListener<NetworkEvent>`

  - ### isAutoShow

    public boolean isAutoShow()

    Shows the progress automatically when the request processing is started

    ###### Returns

    the autoShow

  - ### setAutoShow

    public void setAutoShow(boolean autoShow)

    Shows the progress automatically when the request processing is started

    ###### Parameters

    - `autoShow`: the autoShow to set