arcade.ads
Class AdsManager

java.lang.Object
  extended by arcade.ads.AdsManager

public class AdsManager
extends java.lang.Object

Ads manager helps ads distributor to place ads in their framework. It can add new ads, remove ads, update and render ads. It can also check ads' validity. It can move to the next or the previous ads. It supports fancy operation like ads rotation, flip, etc...


Field Summary
static java.util.List<BasicAds> ads
           
static int index
           
 
Constructor Summary
AdsManager()
          Initialize ads pool
AdsManager(int xMin, int xMax, int yMin, int yMax)
          Set up displaying area
 
Method Summary
 void add(BasicAds ad)
          add one ad to the rear of the list
 void fitWindow()
          adjust ads so that it fits in the window
 BasicAds getCurrentAd()
           
 java.sql.Time getTime()
          get current time
static void nextAds()
          move to the next ads
static void prevAds()
          move to the previous ads
 void remove(BasicAds ad)
          remove a specific ad
 void removeFirst()
          remove the first ad
 void removeLast()
          remove the last ad
 void render()
          render ads
 java.lang.String retrieve()
          retrieve new ads from web server
 void rotate()
          rotate ads
 void runAdsManager()
           
 void setAds(java.lang.String file)
           
 void setGraphics(java.awt.Graphics gs)
           
 void setTime(java.sql.Time time)
          set timer
 void stoprotate()
           
 void update()
          update ads
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ads

public static java.util.List<BasicAds> ads

index

public static int index
Constructor Detail

AdsManager

public AdsManager()
Initialize ads pool


AdsManager

public AdsManager(int xMin,
                  int xMax,
                  int yMin,
                  int yMax)
Set up displaying area

Parameters:
xMin -
xMax -
yMin -
yMax -
Method Detail

runAdsManager

public void runAdsManager()

add

public void add(BasicAds ad)
add one ad to the rear of the list

Parameters:
ad -

removeFirst

public void removeFirst()
remove the first ad


removeLast

public void removeLast()
remove the last ad


remove

public void remove(BasicAds ad)
remove a specific ad

Parameters:
ad -

rotate

public void rotate()
rotate ads


stoprotate

public void stoprotate()

fitWindow

public void fitWindow()
adjust ads so that it fits in the window


update

public void update()
update ads


render

public void render()
render ads


retrieve

public java.lang.String retrieve()
retrieve new ads from web server


getCurrentAd

public BasicAds getCurrentAd()

nextAds

public static void nextAds()
move to the next ads


prevAds

public static void prevAds()
move to the previous ads


setTime

public void setTime(java.sql.Time time)
set timer

Parameters:
time -

getTime

public java.sql.Time getTime()
get current time

Returns:

setGraphics

public void setGraphics(java.awt.Graphics gs)

setAds

public void setAds(java.lang.String file)