FDDA - Tips and Tricks
Modelling
- If you press the <shift> key while selecting a modelling
tool (such as the node or connection creation tool), it will stay selected
after usage. This works also if you select the tool in the menu or
with the F-key.
- Double-click on a connection to add a small intermediate
point. With these points, you can control the exact course of the
line, e.g. avoiding nodes.
- Such intermediate points can also be added by pressing the
<shift> key and starting to drag on the line. As soon as you
begin to drag, a new intermediate point appears.
- If the grid is shown (controlled by the menu view),
nodes and intermediate points will snap to the nearest grid
points. This helps much if you like your lines to be exactly vertical
or horizontal. The width of the grid can be set in the options
dialog.
- You may select several nodes either by holding the <ctrl>
key and clicking or by opening a selecting rectangle with the mouse
(just drag while not over a node or point)
Demonstration
- You may pause the demonstration at any point of time by pressing
the pause button - and continue it again in the same way
- While you can't use most modelling features if a demonstration is
running, you may still control whether nodes and connections are
working.
- The statistics dialog is also available while the demonstration is
still running or paused. You may update the statistics with the
button.
- The statistics dialog is not modal, so you can use all other
features of FDDA while it is shown (e.g. disabling a node)
- You may export the shown project to a jpeg file (using
Window-Export as JPEG) even while the demo is
running. It's easiest to pause the demo first.
- You can control the overall speed of the algorithm through the
options dialog. There you can specify how long a cycle of the demo
will take at least (if your machine is slow, it may take longer), and
how far a message will go in one cycle. I hope you don't need to
experiment with these options, but you may if the graphics look weird
on your computer.
Algorithm programming
- The class fdda.algorithm.NodeAdapter provides empty
implementations for the abstract methods. You may use it as superclass
if you just need one or two of the methods.
- You may add your own properties to your nodes, which can be edited
by the user. You may also change some properties which fdda provides
(but be careful with that). For an example, see the source code for the token ring election
algorithm.
- You can set the color of a node with
setPrimaryColor(Color)
and the color of the border of a
message with Message.setColor(Color)
.
- You may either put classes and description file of your algorithm
in a subfolder of $HOME/fdda/algorithms like they are or you can
package them into a jar file and put that jar file in the
subfolder.