org.htmlparser.lexerapplications.thumbelina
public class Sequencer extends Thread
Field Summary | |
---|---|
protected static int | DEFAULT_DELAY
The default delay time, {@value} milliseconds. |
protected boolean | mActive
Activity state.
|
protected int | mDelay
Delay between picture displays. |
protected ArrayList | mPending
Pictures awaiting display. |
protected Random | mRandom
Random number generator for picture placement. |
protected Thumbelina | mThumbelina
The thumbelina object to drive. |
Constructor Summary | |
---|---|
Sequencer(Thumbelina thumbelina)
Creates a new instance of a Sequencer. |
Method Summary | |
---|---|
void | add(Image image, URL url)
Add an image to the pending list. |
void | add(Image image, URL url, boolean background)
Add an image to the panel. |
int | getDelay()
Getter for property delay. |
protected void | place(Picture picture, boolean add)
Place a picture in the display area.
|
protected Point | random(String url, int width, int height)
Compute a random point to load the image.
|
void | reset()
Clears the pending images list. |
void | run()
Display pictures from pending list with delay between.
|
void | setDelay(int delay)
Setter for property delay. |
true
means fetching and displaying, false
not.Parameters: thumbelina The object to push images to.
Parameters: image The image to add. url The url the image came from.
Parameters: image The image to add. url The url the image came from. background If true
, just add to pending list.
Returns: Value of property delay.
Parameters: picture The picture to place on screen. add If true
, the picture is added to the history.
Parameters: url The url this picture was fetched from. Used in computing the random position, so the picture is always placed in the same location, even when refetched. width The width of the image. height The height of the image.
Returns: The random point to use.
Parameters: delay New value of property delay.
HTML Parser is an open source library released under LGPL. | |