CPD Results
The following document contains the results of PMD's CPD 7.7.0.
Duplications
| File | Line |
|---|---|
| org/opentrafficsim/swing/gui/AnimationToggles.java | 125 |
| org/opentrafficsim/swing/gui/AnimationToggles.java | 172 |
true, false);
panel.addToggleAnimationButtonIcon("Lane", LaneData.class, "/icons/Lane24.png", "Show/hide lanes", true, false);
panel.addToggleAnimationButtonIcon("LaneId", LaneAnimation.Text.class, "/icons/Id24.png", "Show/hide lane ids", false,
true);
panel.addToggleAnimationButtonIcon("Stripe", StripeData.class, "/icons/Stripe24.png", "Show/hide stripes", true, false);
panel.addToggleAnimationButtonIcon("LaneCenter", CenterLine.class, "/icons/CenterLine24.png",
"Show/hide lane center lines", false, true);
panel.addToggleAnimationButtonIcon("Shoulder", ShoulderData.class, "/icons/Shoulder24.png", "Show/hide shoulders", true,
false);
panel.addToggleAnimationButtonIcon("GTU", GtuData.class, "/icons/Gtu24.png", "Show/hide GTUs", true, false);
panel.addToggleAnimationButtonIcon("GTUId", DefaultCarAnimation.Text.class, "/icons/Id24.png", "Show/hide GTU ids",
false, true);
panel.addToggleAnimationButtonIcon("Perception", PerceptionAnimation.ChannelAttention.class, "/icons/Perception24.png",
"Show/hide perception (circle = attention, color = perception delay)", false, false);
panel.addToggleAnimationButtonIcon("Detector", DetectorData.class, "/icons/Detector24.png", "Show/hide detectors", true, | |
| File | Line |
|---|---|
| org/opentrafficsim/swing/gui/AnimationToggles.java | 58 |
| org/opentrafficsim/swing/gui/AnimationToggles.java | 90 |
panel.addToggleAnimationButtonText("Priority", PriorityData.class, "Show/hide link priority", true);
panel.addToggleAnimationButtonText("Lane", LaneData.class, "Show/hide lanes", true);
panel.addToggleAnimationButtonText("LaneId", LaneAnimation.Text.class, "Show/hide lane ids", false);
panel.addToggleAnimationButtonText("LaneCenter", LaneAnimation.CenterLine.class, "Show/hide lane center lines", false);
panel.addToggleAnimationButtonText("Stripe", StripeData.class, "Show/hide stripes", true);
panel.addToggleAnimationButtonText("Shoulder", ShoulderData.class, "Show/hide shoulders", true);
panel.addToggleAnimationButtonText("GTU", GtuData.class, "Show/hide GTUs", true);
panel.addToggleAnimationButtonText("GTUId", DefaultCarAnimation.Text.class, "Show/hide GTU ids", false);
panel.addToggleAnimationButtonText("Perception", PerceptionAnimation.ChannelAttention.class,
"Show/hide perception (circle = attention, color = perception delay)", false);
panel.addToggleAnimationButtonText("Detector", DetectorData.class, "Show/hide detectors", true); | |
| File | Line |
|---|---|
| org/opentrafficsim/swing/gui/OtsAnimationPanel.java | 674 |
| org/opentrafficsim/swing/gui/OtsControlPanel.java | 352 |
public DisposeOnCloseThread(final OtsAnimationPanel panel)
{
this.panel = panel;
}
@Override
public final void run()
{
Container root = this.panel;
while (!(root instanceof JFrame))
{
try
{
Thread.sleep(10);
}
catch (InterruptedException exception)
{
// nothing to do
}
// Search towards the root of the Swing components until we find a JFrame
root = this.panel;
while (null != root.getParent() && !(root instanceof JFrame))
{
root = root.getParent();
}
}
JFrame frame = (JFrame) root;
frame.addWindowListener(this.panel);
this.panel.closeHandlerRegistered = true;
}
@Override
public final String toString()
{
return "DisposeOnCloseThread of OtsAnimationPanel [panel=" + this.panel + "]"; | |
