|
@@ -124,7 +124,22 @@ public class VisualizationPanel extends JPanel implements Observer {
|
|
|
|
|
|
paintToolTip(g);
|
|
|
|
|
|
- g.setColor(Color.RED);
|
|
|
+ paintDebugInformation(g);
|
|
|
+
|
|
|
+ paintLinkLabels(g);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Paints debug information like the current interaction mode
|
|
|
+ * @param g Graphics which should be used
|
|
|
+ */
|
|
|
+ private void paintDebugInformation(Graphics g) {
|
|
|
+ if(!config.isDebugModus())
|
|
|
+ return;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Visual representation of the interaction modus
|
|
|
+ */
|
|
|
String modus;
|
|
|
switch (interactor.mode) {
|
|
|
case VisualizationInteractor.DRAG_CONNECTION:
|
|
@@ -149,11 +164,10 @@ public class VisualizationPanel extends JPanel implements Observer {
|
|
|
modus="Unknown";
|
|
|
break;
|
|
|
}
|
|
|
+ g.setColor(Color.RED);
|
|
|
g.drawString("Debug(Modus:"+modus+")", 0, 10);
|
|
|
if(interactor.controlDown)
|
|
|
g.drawString("Control down", 0, 20);
|
|
|
-
|
|
|
- paintLinkLabels(g);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -164,12 +178,19 @@ public class VisualizationPanel extends JPanel implements Observer {
|
|
|
if(!config.isShowLinks()||network.getLinks().isEmpty()||!config.isShowLinkNameList())
|
|
|
return;
|
|
|
g.setColor(Color.BLACK);
|
|
|
- g.drawString("Links:", 0, 35);
|
|
|
- int i = 45;
|
|
|
+ /**
|
|
|
+ * y-position of the next text Link line
|
|
|
+ */
|
|
|
+ int yPositionLink = 10;
|
|
|
+ if(config.isDebugModus())
|
|
|
+ yPositionLink+=25;
|
|
|
+ g.drawString("Links:", 0, yPositionLink);
|
|
|
+ yPositionLink += 10;
|
|
|
for(Link l: network.getLinks()){
|
|
|
+ if(!config.getNetworkTreeSettingsController().isVisible(l))continue;
|
|
|
g.setColor(config.getLinkColors().getColorOfLink(l).getRight());
|
|
|
- g.drawString(l.getName(), 0, i);
|
|
|
- i+=10;
|
|
|
+ g.drawString(l.getName(), 0, yPositionLink);
|
|
|
+ yPositionLink+=10;
|
|
|
}
|
|
|
}
|
|
|
|