Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * @(#)  1.1  2010-08-03
  * Copyright (c) 2010 Werner Randelshofer, Goldau, Switzerland.
  * All rights reserved.
  * You may not use, copy or modify this file, except in compliance with the
  * license agreement you entered into with Werner Randelshofer.
  * For details see accompanying license terms.

Base class for color cycling in an IFF ILBM image.

Werner Randelshofer
1.1 2010-08-03 Added support for blended cycles.
1.0 2010-01-22 Created.
public abstract class ColorCycle implements Cloneable {

Cycle rate.
    protected int rate;
Time scale of the cycle rate. Dividing the rate by the time scale yields the rate per second.
    protected int timeScale;
Whether the color cycle is active.
    protected boolean isActive;

Whether colors are blended into each other when shifted.
    protected boolean isBlended;
    public ColorCycle(int rateint timeScaleboolean isActive) {
        this. = rate;
        this. = timeScale;
        this. = isActive;
    public boolean isActive() {
        return ;
    public int getRate() {
        return ;
    public int getTimeScale() {
        return ;

Returns true if colors are blended when shifted.
    public boolean isBlended() {
        return ;
Set to true to blend colors when they are shifted.
    public void setBlended(boolean newValue) {
    public abstract void doCycle(int[] rgbslong time);
    protected Object clone() {
        try {
            return super.clone();
        } catch (CloneNotSupportedException ex) {
            InternalError error = new InternalError();
            throw error;
New to GrepCode? Check out our FAQ X