Back to index

wims  3.65+svn20090927
Package Functions | Static Package Functions | Private Member Functions | Private Attributes | Static Private Attributes
ScaleableAtom Class Reference
Collaboration diagram for ScaleableAtom:
Collaboration graph
[legend]

List of all members.

Package Functions

 ScaleableAtom (int Rl, int Gl, int Bl, double Sf)
boolean Exist ()
void paint (Graphics gc, int x, int y, int r)

Static Package Functions

 [static initializer]
static void setApplet (Applet app)

Private Member Functions

final int blend (int fg, int bg, float fgfactor)
void Setup (int nBalls)

Private Attributes

int Rl
int Gl
int Bl
double Sf
Image balls []

Static Private Attributes

static Applet applet
static byte[] data
static final int R = 40
static final int hx = 15
static final int hy = 15
static final int bgGrey = 192
static int maxr

Detailed Description

Definition at line 610 of file LatticeViewer.java.


Constructor & Destructor Documentation

ScaleableAtom.ScaleableAtom ( int  Rl,
int  Gl,
int  Bl,
double  Sf 
) [inline, package]

Definition at line 646 of file LatticeViewer.java.

                                                     {
       this.Rl = Rl;
       this.Gl = Gl;
       this.Bl = Bl;
        this.Sf = Sf;
    }

Member Function Documentation

ScaleableAtom.[static initializer] ( ) [inline, static, package]
final int ScaleableAtom.blend ( int  fg,
int  bg,
float  fgfactor 
) [inline, private]

Definition at line 658 of file LatticeViewer.java.

                                                            {
       return (int) (bg + (fg - bg) * fgfactor);
    }

Here is the caller graph for this function:

boolean ScaleableAtom.Exist ( ) [inline, package]

Definition at line 652 of file LatticeViewer.java.

                    {
       if (Sf==0.0)
            return false;
        else
            return true;
    }

Here is the caller graph for this function:

void ScaleableAtom.paint ( Graphics  gc,
int  x,
int  y,
int  r 
) [inline, package]

Definition at line 683 of file LatticeViewer.java.

                                                 {
       Image ba[] = balls;
       if (ba == null) {
           Setup((int)(16*Sf));
           ba = balls;
       }
        r=(int)(r*Sf);
       Image i = ba[r];
       int size = 10 + r;
       gc.drawImage(i, x - (size >> 1), y - (size >> 1), size, size, applet);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

static void ScaleableAtom.setApplet ( Applet  app) [inline, static, package]

Definition at line 643 of file LatticeViewer.java.

                                      {
       applet = app;
    }

Here is the caller graph for this function:

void ScaleableAtom.Setup ( int  nBalls) [inline, private]

Definition at line 661 of file LatticeViewer.java.

                                   {
       balls = new Image[nBalls];
       byte red[] = new byte[256];
       red[0] = (byte) bgGrey;
       byte green[] = new byte[256];
       green[0] = (byte) bgGrey;
       byte blue[] = new byte[256];
       blue[0] = (byte) bgGrey;
       for (int r = 0; r < nBalls; r++) {
           float b = (float) (r+1) / nBalls;
           for (int i = maxr; i >= 1; --i) {
              float d = (float) i / maxr;
              red[i] = (byte) blend(blend(Rl, 255, d), bgGrey, b);
              green[i] = (byte) blend(blend(Gl, 255, d), bgGrey, b);
              blue[i] = (byte) blend(blend(Bl, 255, d), bgGrey, b);
           }
           IndexColorModel model = new IndexColorModel(8, maxr + 1,
                                                 red, green, blue, 0);
           balls[r] = applet.createImage(
              new MemoryImageSource(R*2, R*2, model, data, 0, R*2));
       }
    }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Applet ScaleableAtom.applet [static, private]

Definition at line 611 of file LatticeViewer.java.

Image ScaleableAtom.balls[] [private]

Definition at line 624 of file LatticeViewer.java.

final int ScaleableAtom.bgGrey = 192 [static, private]

Definition at line 616 of file LatticeViewer.java.

int ScaleableAtom.Bl [private]

Definition at line 621 of file LatticeViewer.java.

byte [] ScaleableAtom.data [static, private]

Definition at line 612 of file LatticeViewer.java.

int ScaleableAtom.Gl [private]

Definition at line 620 of file LatticeViewer.java.

final int ScaleableAtom.hx = 15 [static, private]

Definition at line 614 of file LatticeViewer.java.

final int ScaleableAtom.hy = 15 [static, private]

Definition at line 615 of file LatticeViewer.java.

int ScaleableAtom.maxr [static, private]

Definition at line 617 of file LatticeViewer.java.

final int ScaleableAtom.R = 40 [static, private]

Definition at line 613 of file LatticeViewer.java.

int ScaleableAtom.Rl [private]

Definition at line 619 of file LatticeViewer.java.

double ScaleableAtom.Sf [private]

Definition at line 622 of file LatticeViewer.java.


The documentation for this class was generated from the following file: