crystals
Class AbstractCrystal

java.lang.Object
  extended by crystals.AbstractCrystal
Direct Known Subclasses:
Cbcc, Cfcc, Chex, Cmonobase, Cmonos, Corthobase, Corthobc, Corthofc, Corthos, Cscc, Ctetbc, Ctets, Ctri, Ctrigonal

public abstract class AbstractCrystal
extends java.lang.Object

Contains the functions necessary to communicate with the gui classes. All lattice classes should inherit from this class. As the Constructor of this class has no input argument, all children of this class do not necessarily have an constructor.


Field Summary
(package private)  boolean bMessagebox
           
(package private)  java.awt.Color darkgreen
          Color darkgreen
(package private)  LabeledEdge[] ledges
          List of edges to draw
(package private)  LabeledPoint[] lvertices
          List of points to draw
(package private)  int numberofledges
          Number of edges to draw
(package private)  int numberoflvertices
          Number of points to draw
 
Constructor Summary
AbstractCrystal()
          Constructor of this Class.
 
Method Summary
(package private)  void addBase(Vektor vek, java.lang.String name)
          Adds an Edge, that shall represent a base vector of the reciprocal cell.
(package private)  void addBasis(Vektor vek, java.lang.String name)
          Adds an Edge, that shall represent a basis translation vector of the bravais lattice.
(package private)  void addEdge(Vektor veka, Vektor vekb)
          Adds an edge to the list of edges to draw
(package private)  void addEdge(Vektor veka, Vektor vekb, java.awt.Color farbe)
          Adds an coloured edge to the list of edges.
private  void addEdge(Vektor veka, Vektor vekb, java.awt.Color farbe, int iff)
          Adds a not labeled edge, with an additional distinction.
(package private)  void addEdge(Vektor veka, Vektor vekb, java.lang.String name)
          Adds an labeled edge to the list of edges.
(package private)  void addEdge(Vektor veka, Vektor vekb, java.lang.String name, java.awt.Color farbe)
          Adds an labeled and coloured edge to the list, to be drawn later.
private  void addEdge(Vektor veka, Vektor vekb, java.lang.String name, java.awt.Color farbe, int iff)
          Adds a labeled edge, with an additional distinction.
(package private)  void addPoint(Vektor vek)
          Adds a point to the list of points to draw.
(package private)  void addPoint(Vektor vek, java.awt.Color farbe)
          Adds a coloured point to the list of points.
private  void addPoint(Vektor vek, java.awt.Color farbe, int iff)
          Adds a Point without a label, but an additional distinction.
(package private)  void addPoint(Vektor vek, java.lang.String name)
          Adds a point with a name to the list of points.
(package private)  void addPoint(Vektor vek, java.lang.String name, java.awt.Color farbe)
          Adds a point with name and colour.
private  void addPoint(Vektor vek, java.lang.String name, java.awt.Color farbe, int iff)
          Adds a Point to the list of points to draw, with an additional distinction.
(package private)  void addSymmetricEdge(Vektor vek)
          Adds an unlabeled Point, that shall represent a symmetry point.
(package private)  void addSymmetricEdge(Vektor veka, Vektor vekb)
          Adds an Edge, that shall represent a symmetry line of the reciprocal cell.
(package private)  void addSymmetricEdge(Vektor veka, Vektor vekb, java.lang.String name)
          Adds an Edge, that shall represent a symmetry line of the reciprocal cell.
(package private)  void addSymmetricPoint(Vektor vek, java.lang.String name)
          Adds a labeled Point, that shall represent a symmetry point.
abstract  void calculate(Parameter param)
          Calculates the lattice points.
abstract  double[] getCrystaldefault()
          Returns the default lattice parameter
abstract  java.lang.String getCrystalID()
          Returns a short name for this lattice.
abstract  GuiModel getguiModel()
          Initializes and returns a guiModel appropriate for the lattice.
 LabeledEdge[] getLabeledEdges()
          Returns a list of LabeledEdges, which have to be calculated earlier.
 LabeledPoint[] getLabeledVertices()
          Returns a list of LabeledVertices, which have to be calculated earlier.
abstract  java.lang.String getName()
          Returns the Name of the Lattice.
abstract  java.lang.String getThumbnailID()
          Every lattice has its own icon
 void precalculating()
          Resets the counters for points and edges to zero
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lvertices

LabeledPoint[] lvertices
List of points to draw


ledges

LabeledEdge[] ledges
List of edges to draw


numberoflvertices

int numberoflvertices
Number of points to draw


numberofledges

int numberofledges
Number of edges to draw


darkgreen

java.awt.Color darkgreen
Color darkgreen


bMessagebox

boolean bMessagebox
Constructor Detail

AbstractCrystal

public AbstractCrystal()
Constructor of this Class. Does nothing. However, it is used by default (if not overrided) by all children of this class.

Method Detail

getName

public abstract java.lang.String getName()
Returns the Name of the Lattice. Like it is used in the choice box.

Returns:
Long and detailed name of this lattice.

getCrystaldefault

public abstract double[] getCrystaldefault()
Returns the default lattice parameter

Returns:
a,b,c, alpha,beta,gamma in an array

getThumbnailID

public abstract java.lang.String getThumbnailID()
Every lattice has its own icon

Returns:
String of the filename

getCrystalID

public abstract java.lang.String getCrystalID()
Returns a short name for this lattice. Like it is used in ParamTest to ask for the lattice. The same name is used as parameter for the applet.

Returns:
Short name of this lattice.

calculate

public abstract void calculate(Parameter param)
Calculates the lattice points. Uses param to calculate the appropriate lattice points in the reciprocal lattice space. The results are stored in the public Arrays lvertices and ledges. Every subclass should do this differently.

Parameters:
param - All necessery parameters, especially the lattice constants.

getguiModel

public abstract GuiModel getguiModel()
Initializes and returns a guiModel appropriate for the lattice.


getLabeledVertices

public LabeledPoint[] getLabeledVertices()
Returns a list of LabeledVertices, which have to be calculated earlier.

Returns:
List of Points with their names and colour.

getLabeledEdges

public LabeledEdge[] getLabeledEdges()
Returns a list of LabeledEdges, which have to be calculated earlier.

Returns:
List of Edges with their names and colour.

precalculating

public void precalculating()
Resets the counters for points and edges to zero


addPoint

void addPoint(Vektor vek)
Adds a point to the list of points to draw. The default color is black. The Point is drawn in DrawPanel as a small square.

Parameters:
vek - Pointing to the point.

addPoint

void addPoint(Vektor vek,
              java.lang.String name)
Adds a point with a name to the list of points. The default color is black. The name is shown above the point, and the point itself is not drawn. When the name is "none", the behavior is like addPoint(Vektor).

Parameters:
vek - Pointing to the point.
name - Name of the point. For example "A" or "?", displaying a Gamma.

addPoint

void addPoint(Vektor vek,
              java.awt.Color farbe)
Adds a coloured point to the list of points. Otherwise behaves like addPoint(Vektor).

Parameters:
vek - Pointing to the point.
farbe - Colour of the Point (or the name of the point.)

addPoint

void addPoint(Vektor vek,
              java.lang.String name,
              java.awt.Color farbe)
Adds a point with name and colour.

Parameters:
vek - Coordinates of the point
name - Label of the point
farbe - Colour of the point

addEdge

void addEdge(Vektor veka,
             Vektor vekb)
Adds an edge to the list of edges to draw

Parameters:
veka - Starting point of the edge
vekb - Ending point of the edge

addEdge

void addEdge(Vektor veka,
             Vektor vekb,
             java.lang.String name)
Adds an labeled edge to the list of edges. The name is draw above the center of the line representing the edge.

Parameters:
veka - Starting point of the edge.
vekb - Ending point of the edge
name - Label of the edge.

addEdge

void addEdge(Vektor veka,
             Vektor vekb,
             java.awt.Color farbe)
Adds an coloured edge to the list of edges. Behaves like addEdge(Vektor, Vektor), but now a colour for the line can be specified.

Parameters:
veka - Starting point of the edge
vekb - Ending point of the edge
farbe - Colour of the line representing the edge

addEdge

void addEdge(Vektor veka,
             Vektor vekb,
             java.lang.String name,
             java.awt.Color farbe)
Adds an labeled and coloured edge to the list, to be drawn later.

Parameters:
veka - Starting point of the edge.
vekb - Ending point of the edge.
name - Label of the edge.
farbe - Colour ot line and label representing the edge.

addEdge

private void addEdge(Vektor veka,
                     Vektor vekb,
                     java.lang.String name,
                     java.awt.Color farbe,
                     int iff)
Adds a labeled edge, with an additional distinction.

Parameters:
veka - Starting point of the edge.
vekb - Ending point of the edge.
name - Label of the edge.
farbe - Colour of the edge.
iff - Characterizing the type of edge (0 is a usual edge, 2 an axe, 3 a symmetric edge)

addEdge

private void addEdge(Vektor veka,
                     Vektor vekb,
                     java.awt.Color farbe,
                     int iff)
Adds a not labeled edge, with an additional distinction.

Parameters:
veka - Starting point of the edge.
vekb - Ending point of the edge.
farbe - Colour of the edge.
iff - Characterizing the type of edge (0 is a usual edge, 2 an axe, 3 a symmetric edge)

addBase

void addBase(Vektor vek,
             java.lang.String name)
Adds an Edge, that shall represent a base vector of the reciprocal cell. The corresponding colour is red.

Parameters:
vek - End point of the base vector. (Starting point is always (0,0,0))
name - Label of the base vector.

addSymmetricEdge

void addSymmetricEdge(Vektor veka,
                      Vektor vekb,
                      java.lang.String name)
Adds an Edge, that shall represent a symmetry line of the reciprocal cell. The corresponding colour is darkgreen.

Parameters:
veka - Start point of the symmetry line.
vekb - End point of the symmetry line.
name - Label of the symmetry line.

addSymmetricEdge

void addSymmetricEdge(Vektor veka,
                      Vektor vekb)
Adds an Edge, that shall represent a symmetry line of the reciprocal cell. The corresponding colour is darkgreen, without a certain label.

Parameters:
veka - Start point of the symmetry line.
vekb - End point of the symmetry line.

addPoint

private void addPoint(Vektor vek,
                      java.lang.String name,
                      java.awt.Color farbe,
                      int iff)
Adds a Point to the list of points to draw, with an additional distinction.

Parameters:
vek - Coordinates of the point in 3D space.
name - Label of the point.
farbe - Colour of the point
iff - distinction (0: usual point, 3: symmetry point)

addPoint

private void addPoint(Vektor vek,
                      java.awt.Color farbe,
                      int iff)
Adds a Point without a label, but an additional distinction.

Parameters:
vek - Coordinates of the point in 3D space.
farbe - Label of the point.
iff - distinction (0: usual point, 3: symmetry point)

addSymmetricPoint

void addSymmetricPoint(Vektor vek,
                       java.lang.String name)
Adds a labeled Point, that shall represent a symmetry point. The default color is darkgreen.

Parameters:
vek - Coordinates of the point in 3D-space
name - Label of the point.

addSymmetricEdge

void addSymmetricEdge(Vektor vek)
Adds an unlabeled Point, that shall represent a symmetry point. The default color is darkgreen. Instead of the name displayed, a small square is drawn at the coordinates.

Parameters:
vek - Coordinates of the point in 3D-space

addBasis

void addBasis(Vektor vek,
              java.lang.String name)
Adds an Edge, that shall represent a basis translation vector of the bravais lattice. The corresponding colour is cyan.

Parameters:
vek - End point of the base vector. (Starting point is always (0,0,0))
name - Label of the base vector.