public class ProcessNew extends java.lang.Object implements Basic
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PREFIX_PROCESS |
static java.lang.String |
PREFIX_RESOURCE |
Constructor and Description |
---|
ProcessNew(Model model,
java.lang.String praefix,
java.lang.String id,
java.lang.String listId)
Constructor of an non-abstract Processes.
|
ProcessNew(Model model,
java.lang.String praefix,
java.lang.String id,
java.lang.String resourceType,
int resourceTotal,
java.lang.String listId)
Constructor of abstract Processes.
|
Modifier and Type | Method and Description |
---|---|
void |
addEntry(java.lang.String[] processEntityIds,
int resourceEntityAnz,
long time)
adds set of process- and no. of resources to process.
|
void |
addEntry(java.lang.String[] processEntityIds,
java.lang.String[] resourceEntityIds,
long time)
adds set of process- and resource-entities to process.
|
boolean |
contains(java.lang.String id)
check if an entity with id stored in process
|
Grafic |
createGrafic(java.lang.String viewId,
int x,
int y,
java.lang.String defaultEntityTypeId,
int anzVisible,
boolean horizontal,
boolean showResources,
java.awt.Dimension deltaSize)
create a ProcessGrafic
|
java.awt.Color |
getCommentColor() |
java.awt.Font |
getCommentFont() |
java.lang.String |
getCommentText() |
int |
getEntriesAnz()
gets no. of entries (process-sets) actual processed.
|
Grafic |
getGrafic()
get ProcessGrafic, created before
|
java.lang.String |
getId()
get id of process-station
|
java.lang.String |
getListId()
get id of list, where are the processed entities are before
this may be null
|
Model |
getModel() |
java.lang.String |
getName()
get name of process-station
|
java.lang.String[] |
getProcessEntries(int index)
gets entity-id's of process-set in entry with index
|
java.lang.String[] |
getResourceEntries(int index)
gets entity-id's of resource-set in entry with index
|
int |
getResourceEntriesAnz(int index)
gets no. of resources in resource-set in entry with index
|
int |
getResourceFree()
compute no. of free resources, as difference between total and used resources.
|
int |
getResourceTotal()
gets total of resources.
|
java.lang.String |
getResourceType()
get resource type.
|
int |
getResourceUsed()
compute no of used resources.
|
boolean |
isAbstractResource()
informs about abstractness of process
|
boolean |
isCommentSizeExt() |
void |
printEntries()
makes a control-print on System.out
|
java.lang.String[][] |
removeEntry(java.lang.String entityId,
long time)
remove an entry(process- and resource-set) that include the entity with id entityId
|
void |
setCommentColor(java.awt.Color color) |
void |
setCommentFont(int style,
int size) |
void |
setCommentSizeExt(boolean commentSizeExt) |
void |
setCommentText(java.lang.String text) |
void |
setName(java.lang.String name)
set name of process-station
|
void |
setResourceTotal(int total)
sets total of resources.
|
void |
setResourceType(java.lang.String type)
sets resource type (only for information)
|
public static final java.lang.String PREFIX_PROCESS
public static final java.lang.String PREFIX_RESOURCE
public ProcessNew(Model model, java.lang.String praefix, java.lang.String id, java.lang.String resourceType, int resourceTotal, java.lang.String listId)
model
- used animation.model.Modelid
- processIdresourceType
- resourceTypeName (only for information, its no Id)resourceTotal
- total number of available resources (only for information)listId
- optional id of a list, which include all processed entities beforepublic ProcessNew(Model model, java.lang.String praefix, java.lang.String id, java.lang.String listId)
id
- processIdlistId
- optional id of a list, which include all processed entities beforepublic java.lang.String getId()
getId
in interface ClassBasic
public void setName(java.lang.String name)
name
- public java.lang.String getName()
public java.lang.String getListId()
public java.lang.String getCommentText()
public void setCommentText(java.lang.String text)
public java.awt.Color getCommentColor()
public void setCommentColor(java.awt.Color color)
public java.awt.Font getCommentFont()
public void setCommentFont(int style, int size)
public boolean isCommentSizeExt()
public void setCommentSizeExt(boolean commentSizeExt)
public boolean isAbstractResource()
public void setResourceType(java.lang.String type) throws ModelException
type
- ModelException,
- when process is non abstract.ModelException
public java.lang.String getResourceType()
public void setResourceTotal(int total) throws ModelException
total
- ModelException,
- when process is non abstract.ModelException
public int getResourceTotal()
public int getResourceUsed()
public int getResourceFree()
public int getEntriesAnz()
public java.lang.String[] getProcessEntries(int index)
index
- public java.lang.String[] getResourceEntries(int index)
index
- public int getResourceEntriesAnz(int index)
index
- public void addEntry(java.lang.String[] processEntityIds, java.lang.String[] resourceEntityIds, long time) throws ModelException
processEntityIds
- array of process-entity-id'sresourceEntityIds
- array of resource-entity-id'stime
- simulation-timeModelException,
- when an added entity isn't freeModelException
public void addEntry(java.lang.String[] processEntityIds, int resourceEntityAnz, long time) throws ModelException
processEntityIds
- array of process-entity-id'sresourceEntityAnz
- no. of resources used to process this process-entitiestime
- actual simulation-timeModelException,
- when an added entity isn't freeModelException
public java.lang.String[][] removeEntry(java.lang.String entityId, long time) throws ModelException
entityId
- entityId to find an entrytime
- simulation timeModelException,
- when this.getId contains a Cmd.VALUE_SEPARATORModelException
public boolean contains(java.lang.String id)
id
- public void printEntries()
public Grafic createGrafic(java.lang.String viewId, int x, int y, java.lang.String defaultEntityTypeId, int anzVisible, boolean horizontal, boolean showResources, java.awt.Dimension deltaSize)
viewId
- Id of viewx
- middle point x-coordinatey
- middle point y-coordinatedefaultEntityTypeId
- for sizing