haifa.shopsim.UI.shopanim
Class JobShopGraphics

java.lang.Object
  |
  +--haifa.shopsim.UI.shopanim.JobShopGraphics
All Implemented Interfaces:
ShopAnimConstants

public class JobShopGraphics
extends java.lang.Object
implements ShopAnimConstants

Represents graphics information as read from a .jbs file.

Version:
1.1

Field Summary
protected  java.util.HashMap[] locationsMaps
           
protected  int numMachines
           
(package private)  int[] routeEndsIndexes
           
(package private)  int[] routeEndsSides
           
(package private)  int[] routeStartsIndexes
           
(package private)  int[] routeStartsSides
           
protected  java.util.HashMap spotMap
           
 
Fields inherited from interface haifa.shopsim.UI.shopanim.ShopAnimConstants
EAST, NORTH, NOT_SET, NUM_MACHINE_SPOTS_HEIGHT, NUM_MACHINE_SPOTS_WIDTH, SOUTH, WEST
 
Constructor Summary
JobShopGraphics(java.io.Reader reader_, ShopData shopData)
          Creates new JobShopGraphics based on a reader.
 
Method Summary
(package private)  java.util.Map getMachineBuffersLocations(int machineNumber)
          Returns a map where the keys are operation objects and the values are degrees(0,30,60,....,330) in Integer objects.
(package private)  SpotInMatrix getMachineSpot(int machineNumber)
           
(package private)  int getRouteIndex(int routeNumber, int startOrEnd)
          Returns the index of the routeNumber's start or end.
(package private)  int getRouteSide(int routeNumber, int startOrEnd)
          Returns the side (NORTH,EAST, SOUTH or WEST) of the routeNumber's start or end.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

numMachines

protected int numMachines

locationsMaps

protected java.util.HashMap[] locationsMaps

spotMap

protected java.util.HashMap spotMap

routeStartsSides

int[] routeStartsSides

routeStartsIndexes

int[] routeStartsIndexes

routeEndsSides

int[] routeEndsSides

routeEndsIndexes

int[] routeEndsIndexes
Constructor Detail

JobShopGraphics

public JobShopGraphics(java.io.Reader reader_,
                       ShopData shopData)
                throws NoJobShopGraphicsInfoException,
                       JobShopFileFormatException
Creates new JobShopGraphics based on a reader. Uses the shopData.
Method Detail

getMachineSpot

SpotInMatrix getMachineSpot(int machineNumber)

getMachineBuffersLocations

java.util.Map getMachineBuffersLocations(int machineNumber)
Returns a map where the keys are operation objects and the values are degrees(0,30,60,....,330) in Integer objects.

getRouteSide

int getRouteSide(int routeNumber,
                 int startOrEnd)
Returns the side (NORTH,EAST, SOUTH or WEST) of the routeNumber's start or end. If startOrEnd==0 returns start, else returns end.

getRouteIndex

int getRouteIndex(int routeNumber,
                  int startOrEnd)
Returns the index of the routeNumber's start or end. If startOrEnd==0 returns start, else returns end.