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:
Animation, Editable, ActionListener<NetworkEvent>, StyleListener, Iterable<Component>
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_WARNINGFields inherited from class Form
focusScrollingFields 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
ConstructorsConstructorDescriptionProgress(String title, ConnectionRequest request) Binds the progress UI to the completion of this requestProgress(String title, ConnectionRequest request, boolean showPercentage) Binds the progress UI to the completion of this request -
Method Summary
Modifier and TypeMethodDescriptionprotected voidactionCommand(Command cmd) Invoked to allow subclasses of form to handle a command from one point rather than implementing many command instancesvoidInvoked when an action occurred on a componentvoiddispose()Closes the current form and returns to the previous form, releasing the EDT in the processbooleanShows the progress automatically when the request processing is startedbooleanReturns
voidsetAutoShow(boolean autoShow) Shows the progress automatically when the request processing is startedvoidsetDisposeOnCompletion(boolean disposeOnCompletion) Parameters
Methods inherited from class Dialog
addComponent, addComponent, addComponent, addComponent, animate, autoAdjust, getBlurBackgroundRadius, getContentPane, getDefaultBlurBackgroundRadius, getDefaultDialogPosition, getDefaultDialogType, getDialogComponent, getDialogPosition, getDialogPreferredSize, getDialogStyle, getDialogType, getDialogUIID, getLayout, getPopupDirectionBiasPortrait, getTitle, getTitleComponent, getTitleStyle, growOrShrink, initGlobalToolbar, initLaf, isAutoAdjustDialogSize, isAutoDispose, isCommandsAsButtons, isDefaultDisposeWhenPointerOutOfBounds, isDisableStaticDialogScrolling, isDisposeWhenPointerOutOfBounds, keyReleased, onShow, placeButtonCommands, pointerPressed, pointerReleased, removeAll, removeComponent, setAutoAdjustDialogSize, setAutoDispose, setBlurBackgroundRadius, setCommandsAsButtons, setDefaultBlurBackgroundRadius, setDefaultDialogPosition, setDefaultDialogType, setDefaultDisposeWhenPointerOutOfBounds, setDialogPosition, setDialogStyle, setDialogType, setDialogUIID, setDisableStaticDialogScrolling, setDisposeWhenPointerOutOfBounds, setLayout, setPopupDirectionBiasPortrait, setPreviousForm, setScrollable, setTimeout, setTitle, setTitleComponent, setTitleComponent, 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, wasDisposedDueToRotationMethods inherited from class Form
addCommand, addCommand, addCommandListener, addComponentAwaitingRelease, addGameKeyListener, addKeyListener, addOrientationListener, addPasteListener, addShowListener, addSizeChangedListener, animateHierarchy, animateHierarchyAndWait, animateHierarchyFade, animateHierarchyFadeAndWait, animateLayout, animateLayoutAndWait, animateLayoutFade, animateLayoutFadeAndWait, animateUnlayout, animateUnlayoutAndWait, 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, 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, setPropertyValue, setRTL, setSafeAreaChanged, setScrollableX, setScrollableY, setScrollAnimationSpeed, setScrollVisible, setSmoothScrolling, setSourceCommand, setTintColor, setTitleStyle, setToolbar, setToolBar, setTransitionInAnimator, setTransitionOutAnimator, setUIManager, setVisible, shouldPaintStatusBar, shouldSendPointerReleaseToOtherForm, showNotify, sizeChanged, stopEditingMethods 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, updateTabIndicesMethods inherited from class Component
addDragFinishedListener, addDragOverListener, addDropListener, addFocusListener, addLongPressListener, addPointerDraggedListener, addPointerPressedListener, addPointerReleasedListener, addPullToRefresh, addScrollListener, addStateChangeListener, announceForAccessibility, bindProperty, blocksSideSwipe, calcScrollSize, contains, containsOrOwns, createStyleAnimation, deinitialize, deinitializeCustomStyle, dragEnter, dragExit, dragFinished, draggingOver, drawDraggedImage, focusGained, focusLost, getAbsoluteX, getAbsoluteY, 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, 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, isIgnorePointerEvents, isInClippingRegion, isInitialized, isOpaque, isOwnedBy, isPinchBlocksDragAndDrop, isRippleEffect, isRTL, isSetCursorSupported, isSnapToGrid, isStickyDrag, isTactileTouch, isTactileTouch, isTensileDragEnabled, isTraversable, isVisible, 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, removeDragFinishedListener, removeDragOverListener, removeDropListener, removeFocusListener, removeLongPressListener, removePointerDraggedListener, removePointerPressedListener, removePointerReleasedListener, removeScrollListener, removeStateChangeListener, repaint, repaint, requestFocus, resetFocusable, respondsToPointerEvents, 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, setIgnorePointerEvents, setInitialized, setInlineAllStyles, setInlineDisabledStyles, setInlinePressedStyles, setInlineSelectedStyles, setInlineStylesTheme, setInlineUnselectedStyles, setIsScrollVisible, setLabelForComponent, setName, setNextFocusDown, setNextFocusLeft, setNextFocusRight, setNextFocusUp, setOpaque, setOwner, setPinchBlocksDragAndDrop, setPreferredH, setPreferredSize, setPreferredSizeStr, setPreferredTabIndex, setPreferredW, setPressedStyle, setRippleEffect, setSameHeight, setSameSize, setSameWidth, setScrollOpacityChangeSpeed, setScrollSize, setScrollX, setScrollY, setSelectCommandText, setSelectedStyle, setSize, setSnapToGrid, setTabIndex, setTactileTouch, setTensileDragEnabled, setTensileLength, setTooltip, setTraversable, setUIID, setUIID, setUIIDFinal, setUnselectedStyle, setWidth, setX, setY, shouldBlockSideSwipe, shouldBlockSideSwipeLeft, shouldBlockSideSwipeRight, shouldRenderComponentSelection, showNativeOverlay, startEditingAsync, stripMarginAndPadding, styleChanged, toImage, toString, unbindProperty, updateNativeOverlay, visibleBoundsContainsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
Progress
Binds the progress UI to the completion of this request
Parameters
-
title: the title of the progress dialog -
request: the network request pending
-
-
Progress
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
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:
actionCommandin classDialog
-
dispose
-
isDisposeOnCompletion
public boolean isDisposeOnCompletion()Returns
the disposeOnCompletion
-
setDisposeOnCompletion
public void setDisposeOnCompletion(boolean disposeOnCompletion) Parameters
disposeOnCompletion: the disposeOnCompletion to set
-
actionPerformed
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:
actionPerformedin interfaceActionListener<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
-