|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthades.simulator.SimObject
hades.models.special.Counter
Counter - a generic counter for events on SignalStdLogic1164 signals. Possible event types include 'events', 'value 0' ... 'value D', 'rising edge', 'falling edge', '0 hazards', ...
The counter offers data and clear inputs. The counter may also be cleared interactively.
You can specify the color to use at the display via the via the "Hades.Counter.DisplayColor" property in aarrggbb format.
Nested Class Summary | |
class |
Counter.DecimalValueFormatter
|
class |
Counter.TypeFormatter
|
Field Summary | |
int |
_0
|
int |
_0hazards
|
int |
_1
|
int |
_1hazards
|
int |
_D
|
int |
_events
|
int |
_falling
|
int |
_H
|
int |
_L
|
int |
_rising
|
int |
_U
|
int |
_W
|
int |
_X
|
int |
_Z
|
(package private) javax.swing.JPanel |
buttonPanel
|
(package private) javax.swing.JButton |
changeNameButton
|
(package private) javax.swing.JButton |
clearAllButton
|
(package private) javax.swing.JButton |
clearSelectedButton
|
(package private) javax.swing.JButton |
closeButton
|
protected java.lang.String[] |
counterNames
|
(package private) javax.swing.JPanel |
counterPanel
|
protected long[] |
counters
|
(package private) javax.swing.JComboBox |
eventChoice
|
protected Label |
symbolTypeLabel
|
protected ColoredValueLabel |
symbolValueLabel
|
(package private) javax.swing.JFrame |
topFrame
|
(package private) javax.swing.JLabel |
valueField
|
Fields inherited from class hades.simulator.SimObject |
classloader, console, debug, editor, name, parent, ports, propertySheet, simulator, symbol, versionId, visible |
Constructor Summary | |
Counter()
Counter(): simple constructor |
Method Summary | |
void |
buildGUI()
|
void |
buildGUICallbacks()
|
void |
changeName()
|
void |
clearAllCounters()
|
void |
clearSelectedCounter()
|
void |
configure()
create and display a 'ConfigDialog' to set the parameters for a SimObject. |
SimObject |
copy()
copy(): create a clone of the current Counter, including its color |
void |
elaborate(java.lang.Object arg)
elaborate(): This method is called by the simulation engine to initialize the simulation object. |
void |
evaluate(java.lang.Object arg)
evaluate(): called by the simulation engine on all events that concern this object. |
static java.lang.String |
formatPaddedLong(long value,
int n_chars)
|
long |
getCounterValue(int index)
|
int |
getMaxCounterIndex()
|
java.awt.Component |
getPropertySheet()
return a reference to the 'property sheet' or configuration window for this SimObject. |
java.lang.String |
getToolTip(java.awt.Point position,
long millis)
construct a (short) tool tip message for a SimObject. |
boolean |
initialize(java.lang.String s)
read the versionID (currently ignored) and the index of the active counter (_event ... |
static void |
main(java.lang.String[] argv)
main(): simple selftest of the Counter's GUI |
void |
mousePressed(java.awt.event.MouseEvent evt)
mousePressed: currently, the Counter defines two mouse click reactions. |
void |
setCounterValue(int index,
long value)
|
void |
setSymbol(Symbol s)
|
void |
showSelectedCounter()
|
java.lang.String |
toString()
toString() - the usual info method |
void |
write(java.io.PrintWriter ps)
write the versionID and the currently active counter |
Methods inherited from class hades.simulator.SimObject |
constructDynamicSymbol, getBindkey, getClassLoader, getDebug, getEditor, getExternalResources, getFullName, getName, getParent, getPort, getPorts, getResourceAsStream, getSimulator, getSymbol, getSymbolResourceName, getVersionId, isVisible, keyPressed, message, needsDynamicSymbol, needsExternalResources, setClassLoader, setConsole, setDebug, setEditor, setName, setParent, setPorts, setSimulator, setVersionId, setVisible, tearDown |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface hades.simulator.Simulatable |
message |
Field Detail |
public final int _events
public final int _rising
public final int _falling
public final int _U
public final int _X
public final int _0
public final int _1
public final int _Z
public final int _L
public final int _H
public final int _W
public final int _D
public final int _0hazards
public final int _1hazards
protected java.lang.String[] counterNames
protected long[] counters
protected Label symbolTypeLabel
protected ColoredValueLabel symbolValueLabel
javax.swing.JFrame topFrame
javax.swing.JPanel counterPanel
javax.swing.JPanel buttonPanel
javax.swing.JLabel valueField
javax.swing.JComboBox eventChoice
javax.swing.JButton clearAllButton
javax.swing.JButton clearSelectedButton
javax.swing.JButton closeButton
javax.swing.JButton changeNameButton
Constructor Detail |
public Counter()
Method Detail |
public void setSymbol(Symbol s)
setSymbol
in class SimObject
public void buildGUI()
public void buildGUICallbacks()
public void clearAllCounters()
public void clearSelectedCounter()
public void showSelectedCounter()
public long getCounterValue(int index)
public void setCounterValue(int index, long value)
public int getMaxCounterIndex()
public void changeName()
public void write(java.io.PrintWriter ps)
write
in class SimObject
public boolean initialize(java.lang.String s)
initialize
in class SimObject
public void configure()
SimObject
configure
in class SimObject
public java.awt.Component getPropertySheet()
SimObject
getPropertySheet
in class SimObject
public void mousePressed(java.awt.event.MouseEvent evt)
mousePressed
in class SimObject
public void elaborate(java.lang.Object arg)
elaborate
in interface Simulatable
elaborate
in class SimObject
arg
- This parameter is ignored by Counterpublic void evaluate(java.lang.Object arg)
evaluate
in interface Simulatable
evaluate
in class SimObject
arg
- An arbitrary and unused objectpublic static java.lang.String formatPaddedLong(long value, int n_chars)
public SimObject copy()
copy
in class SimObject
public java.lang.String getToolTip(java.awt.Point position, long millis)
SimObject
getToolTip
in interface ContextToolTip
getToolTip
in class SimObject
public java.lang.String toString()
toString
in class SimObject
public static void main(java.lang.String[] argv)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |