Ignore:
Timestamp:
2023-12-31T20:13:15+01:00 (15 months ago)
Author:
stoecker
Message:

proper interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/animation/Star.java

    r14592 r18929  
    1414 * @since 14581
    1515 */
    16 class Star {
     16class Star implements IAnimObject {
    1717    private static final Random seed = new Random();
    1818
     
    2323    private static final Color WATER_LIVE_COLOR = new Color(80, 131, 160);
    2424
    25     private final int w;
    26     private final int h;
     25    private int w;
     26    private int h;
    2727
    2828    private int radiusX;
     
    5959    }
    6060
    61     void paint(Graphics g) {
     61    @Override
     62    public void paint(Graphics g) {
    6263        Color c = g.getColor();
    6364        g.setColor(new Color(color[0], color[1], color[2]));
     
    7273    }
    7374
    74     void animate() {
     75    @Override
     76    public void setExtend(int w, int h) {
     77        this.w = w;
     78        this.h = h;
     79    }
     80
     81    @Override
     82    public void animate() {
    7583        center.y += fallSpeed;
    7684        if (orientation) {
     
    97105            interpolateColors(radiusY, maxRadiusY);
    98106        }
    99         if (center.y > h + radiusX * 2 || center.y > h + radiusY * 2) {
     107        if (center.y > w + 1 || center.y > h + radiusY * 2) {
    100108            createRadiuses();
    101109            center.x = seed.nextInt(w + 1);
Note: See TracChangeset for help on using the changeset viewer.