ee.ut.mrz.volumest
Class Grid

java.lang.Object
  extended by ee.ut.mrz.volumest.Grid

public class Grid
extends Object

Model for one grid.

Author:
Markko Merzin

Method Summary
 void activateGridPoint(Point point, boolean activate)
          Activates or deactivates gridpoint witch is within selection margins.
 void activateIntersectionPoint(Point point, boolean activate)
          Creates new intersectionpoint.
 void beginTransaction()
          Reserved for future use.
 void endTransaction()
          Reserverd for future use.
 int getActivePointsCount()
          Count activated points in grid.
 ArrayList<GridPoint> getGridPoints()
          Returns ArrayList with currently active points set.
 int getIntersectionPointsCount()
          Count intersectionpoints.
 int getPixelsPerGridWitdh()
          Returns pixels per gridwidth.
 int getRedoStepsCount()
          Counts possible redo steps.
 Reper getReper()
          Returns reper.
 int getUndoStepsCount()
          Counts undosteps.
 void redoStep()
          Step forward in undo chain.
 void undoStep()
          Step back in undo chain.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getGridPoints

public ArrayList<GridPoint> getGridPoints()
Returns ArrayList with currently active points set.

Returns:
ArrayList with currently active points set.

activateGridPoint

public void activateGridPoint(Point point,
                              boolean activate)
Activates or deactivates gridpoint witch is within selection margins.

Parameters:
point - Point in affine reper (one on display).
activate - Activate or deactivate.

getActivePointsCount

public int getActivePointsCount()
Count activated points in grid.

Returns:
Count of active points in grid.

getIntersectionPointsCount

public int getIntersectionPointsCount()
Count intersectionpoints.

Returns:
Count of intersections.

getReper

public Reper getReper()
Returns reper.

Returns:
Reper witch is associated with this grid.

beginTransaction

public void beginTransaction()
Reserved for future use. For processing in multiple threads.


endTransaction

public void endTransaction()
Reserverd for future use. For processing in multiple threads.


undoStep

public void undoStep()
Step back in undo chain.


redoStep

public void redoStep()
Step forward in undo chain.


getUndoStepsCount

public int getUndoStepsCount()
Counts undosteps.

Returns:
Count of undosteps.

getRedoStepsCount

public int getRedoStepsCount()
Counts possible redo steps.

Returns:
Count of possible redo steps.

activateIntersectionPoint

public void activateIntersectionPoint(Point point,
                                      boolean activate)
Creates new intersectionpoint.

Parameters:
point - Intersectionpoint in affine reper (one in display).
activate - Wether activate or deactivate point.

getPixelsPerGridWitdh

public int getPixelsPerGridWitdh()
Returns pixels per gridwidth.

Returns:
How many pixels is per grid width.