fi.jyu.mit.graphics
Class DrawableCollection

java.lang.Object
  extended by fi.jyu.mit.graphics.BasicShape
      extended by fi.jyu.mit.graphics.BasicDrawableCollection
          extended by fi.jyu.mit.graphics.DrawableCollection
All Implemented Interfaces:
Drawable, Transformable
Direct Known Subclasses:
CarSample.Car, UkkoSample.Ukko

public class DrawableCollection
extends BasicDrawableCollection

Luokka kuvio-oliokokoelmille. Tehdään julkiseksi BasicDrawableCollection metodeja jotta tätä voi käyttää itsenäisenä luokkana.

Author:
Markus Kivioja, vesal

Constructor Summary
DrawableCollection()
          Luo uuden oliokokelman
 
Method Summary
 Drawable add(Drawable pDrawable)
          Lisää olion tähän kokoelmaan
 Drawable getDrawable(int i)
          Paluattaa paikaas i oleva piirrettävän olion
 int getIndex(Drawable pDrawable)
          Palauttaa annetun olion indeksin tässä kokoelmassa
 void remove(Drawable pDrawable)
          Poistaa olion tästä kokoelmasta
 
Methods inherited from class fi.jyu.mit.graphics.BasicDrawableCollection
drawShape, getDrawables, justAdd, justRemove, redraw, registerSpace, unRegisterSpace
 
Methods inherited from class fi.jyu.mit.graphics.BasicShape
changeTransform, draw, getColor, getPoint, getRotator, getRotator, getTransform, getTransform, initGraphics, move, rotate, scale, setColor, setColor, setParent, setRotator, setTransform, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawableCollection

public DrawableCollection()
Luo uuden oliokokelman

Method Detail

getDrawable

public Drawable getDrawable(int i)
Paluattaa paikaas i oleva piirrettävän olion

Overrides:
getDrawable in class BasicDrawableCollection
Parameters:
i - missä paikass aoleva olio otetaan
Returns:
paikassa i oleva olio

add

public Drawable add(Drawable pDrawable)
Lisää olion tähän kokoelmaan

Overrides:
add in class BasicDrawableCollection
Parameters:
pDrawable - lisättävä olio
Returns:
lisätty olio

remove

public void remove(Drawable pDrawable)
Poistaa olion tästä kokoelmasta

Overrides:
remove in class BasicDrawableCollection
Parameters:
pDrawable - poistettava olio

getIndex

public int getIndex(Drawable pDrawable)
Palauttaa annetun olion indeksin tässä kokoelmassa

Overrides:
getIndex in class BasicDrawableCollection
Parameters:
pDrawable - olio jonka indeksia haetaan
Returns:
annetun olion indeksi