net.yura.mobile.gui.components
Class ProgressBar

java.lang.Object
  extended by net.yura.mobile.gui.components.Component
      extended by net.yura.mobile.gui.components.ProgressBar

public class ProgressBar
extends Component

Author:
Yura Mamyrin
See Also:
JProgressBar

Field Summary
protected  boolean go
           
protected  int loaded
           
protected  int loading
           
protected  int wait
           
 
Fields inherited from class net.yura.mobile.gui.components.Component
background, empty, FOCUS_GAINED, FOCUS_LOST, focusable, foreground, height, parent, posX, posY, preferredHeight, preferredWidth, state, theme, width
 
Constructor Summary
ProgressBar()
          Creates a horizontal progress bar that displays a border but no progress string.
ProgressBar(javax.microedition.lcdui.game.Sprite sp)
           
 
Method Summary
 void animate()
          goes from 0 to loaded (inclusive), then goes back to 0 and start again
 String getDefaultName()
           
 int getMaximum()
           
 Object getValue()
           
 void paintComponent(Graphics2D g)
           
 void setIndeterminate(boolean v)
           
 void setMaximum(int max)
           
 void setValue(int v)
           
 void updateUI()
           
 void workoutMinimumSize()
          This sets the width and height of this component to the MINIMUM that is needed for this component
 
Methods inherited from class net.yura.mobile.gui.components.Component
add, add, add, addFocusListener, addImpl, clip, consumesMotionEvents, focusGained, focusLost, getBackground, getBorder, getCurrentState, getDesktopPane, getFocusListeners, getForeground, getHeight, getHeightWithBorder, getInsets, getName, getParent, getPreferredHeight, getPreferredWidth, getState, getToolTipLocationX, getToolTipLocationY, getToolTipText, getWidth, getWidthWithBorder, getWindow, getX, getXOnScreen, getXWithBorder, getY, getYOnScreen, getYWithBorder, insert, insert, isComponentVisible, isFocusable, isFocusOwner, isOpaque, isRectVisible, isShowing, isVisible, makeVisible, paint, paintBorder, processKeyEvent, processMouseEvent, processMultitouchEvent, removeFocusListener, removeParent, repaint, requestFocusInWindow, revalidate, scrollRectToVisible, scrollUpDown, setBackground, setBorder, setBounds, setBoundsWithBorder, setFocusable, setForeground, setLocation, setName, setPreferredSize, setSize, setState, setToolTipText, setupState, setValue, setVisible, toString, transferFocus, validate, wait, workoutSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

go

protected boolean go

loaded

protected int loaded

loading

protected int loading

wait

protected int wait
Constructor Detail

ProgressBar

public ProgressBar()
Creates a horizontal progress bar that displays a border but no progress string. The initial and minimum values are 0, and the maximum is 100.

See Also:
JProgressBar.JProgressBar

ProgressBar

public ProgressBar(javax.microedition.lcdui.game.Sprite sp)
Method Detail

animate

public void animate()
             throws InterruptedException
goes from 0 to loaded (inclusive), then goes back to 0 and start again

Overrides:
animate in class Component
Throws:
InterruptedException

getDefaultName

public String getDefaultName()
Specified by:
getDefaultName in class Component

getMaximum

public int getMaximum()
See Also:
JProgressBar.getMaximum

getValue

public Object getValue()
Overrides:
getValue in class Component
See Also:
JProgressBar.getValue

paintComponent

public void paintComponent(Graphics2D g)
Specified by:
paintComponent in class Component
See Also:
JComponent.paintComponent

setIndeterminate

public void setIndeterminate(boolean v)
Parameters:
v - TRUE to start the animation, FALSE to end the animation
See Also:
JProgressBar.setIndeterminate

setMaximum

public void setMaximum(int max)
See Also:
JProgressBar.setMaximum

setValue

public void setValue(int v)
Parameters:
v - The new value
See Also:
JProgressBar.setValue

updateUI

public void updateUI()
Overrides:
updateUI in class Component
See Also:
JComponent.updateUI

workoutMinimumSize

public void workoutMinimumSize()
Description copied from class: Component
This sets the width and height of this component to the MINIMUM that is needed for this component

Specified by:
workoutMinimumSize in class Component
See Also:
JComponent.getMinimumSize