|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jdom.Content
org.jdom.Element
verinec.netsim.loggers.events.EventDetail
public abstract class EventDetail
EventDetail is the abstract Class that has all common features of event details
| Field Summary | |
|---|---|
private boolean |
anim_init
|
protected double |
dHeight
the label's height |
protected double |
dWidth
the labels width |
protected double |
dx
one moving step in on the x axis |
protected double |
dy
one moving step in on the y axis |
protected int |
endX
end position of the moving label on x axis |
protected int |
endY
end position of the moving label on y axis |
protected JLabel |
label
the label of this event, used to display a graphic |
protected PCNode |
ownerPCNode
the node, on which this event will be displayed |
protected int |
startX
start position of the moving label on x axis |
protected int |
startY
start position of the moving label on y axis |
| Fields inherited from class org.jdom.Element |
|---|
additionalNamespaces, name, namespace |
| Fields inherited from class org.jdom.Content |
|---|
parent |
| Constructor Summary | |
|---|---|
EventDetail(String name)
Constructs a new Event Detail |
|
EventDetail(String name,
String type)
Constructs a new Event Detail |
|
| Method Summary | |
|---|---|
void |
animate(int time,
int substep,
int myPhase,
int totalPhase)
Alternates Events if they occur on the same location during the same periode of time. |
abstract Event |
createSimEvent(Model model,
ILogger logger)
creates a schedulable Simulation event from a Logevent |
String |
getType()
gets the Type of the Event Detail |
void |
initAnimation(DrawPanel drawPanel)
Initializes the event to be displayed on a panel as a animation |
abstract void |
initializeLabel(DrawPanel drawpanel)
Initializes the label (the animated object) |
boolean |
isAnimationInitialized()
checks if the animation is initialized |
void |
setType(String type)
sets the Type of the Event Detail |
protected abstract void |
subanimate(int time,
int substep,
int myPhase,
int totalPhase)
animates a substep of the whole animation |
String |
toString()
|
| Methods inherited from class org.jdom.Content |
|---|
detach, equals, getDocument, getParent, getParentElement, hashCode, setParent |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jdom.Parent |
|---|
getDocument, getParent |
| Field Detail |
|---|
private boolean anim_init
protected JLabel label
protected int startX
protected int startY
protected int endX
protected int endY
protected double dx
protected double dy
protected PCNode ownerPCNode
protected double dHeight
protected double dWidth
| Constructor Detail |
|---|
public EventDetail(String name,
String type)
name - a Name of the detailtype - a Typepublic EventDetail(String name)
name - a Name of the detail| Method Detail |
|---|
public final String getType()
public final void setType(String type)
type - a Typepublic String toString()
toString in class ElementElement.toString()public boolean isAnimationInitialized()
public void initAnimation(DrawPanel drawPanel)
throws NetSimException
drawPanel - the panel on which this event is displayed graphically
NetSimException - if the node for this even't can't be found
public final void animate(int time,
int substep,
int myPhase,
int totalPhase)
throws NetSimException
time - Current simulation time.substep - Current substep.myPhase - Phase the event belongs to.totalPhase - Total number of events occurring at the same time and location.
NetSimException - if the DrawPanel is not set
public abstract Event createSimEvent(Model model,
ILogger logger)
throws NetSimException
model - a network modellogger - a log event
NetSimException - if the event can't be gererated. E.g. it references to a non existing host
public abstract void initializeLabel(DrawPanel drawpanel)
throws NetSimException
drawpanel - the panel containing the label
NetSimException - if the label can't be set up
protected abstract void subanimate(int time,
int substep,
int myPhase,
int totalPhase)
time - actual timesubstep - the n'th substep that is animatedmyPhase - the phase length that is animated in this substeptotalPhase - the complete phase length
|
Copyright © 2005 Verinec, DIUF | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||