Skip to content

Commit f8d0bd1

Browse files
author
“jklein94”
committed
Added java doc
1 parent 5b67d98 commit f8d0bd1

File tree

3 files changed

+417
-1
lines changed

3 files changed

+417
-1
lines changed

org-tweetyproject-graphs/src/main/java/org/tweetyproject/graphs/util/AigGraphPlotter.java

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,46 @@
4040
*/
4141
public class AigGraphPlotter<G extends Graph<N>, N extends Node> {
4242
// General options
43+
/**
44+
* Enables LaTeX rendering for labels or formulas.
45+
* When true, LaTeX expressions will be rendered using a compatible renderer (e.g., MathJax).
46+
*/
4347
protected boolean enableLatex = true;
48+
49+
/**
50+
* Enables zoom functionality in the graphical interface.
51+
* When true, users can zoom in and out of the graph view.
52+
*/
4453
protected boolean toggleZoom = true;
54+
55+
/**
56+
* Enables physics-based layout for graph nodes.
57+
* When true, nodes will move according to simulated physical forces (e.g., repulsion).
58+
*/
4559
protected boolean toggleNodePhysics = true;
60+
61+
/**
62+
* Fixes the distance between linked nodes if enabled.
63+
* When false, link lengths can vary; when true, all links maintain a fixed distance.
64+
*/
4665
protected boolean toggleFixedLinkDistance = false;
66+
67+
/**
68+
* Enables interactive graph editing in the GUI.
69+
* When true, users can add, remove, or modify nodes and edges through the interface.
70+
*/
4771
protected boolean toggleGraphEditingInGUI = true;
72+
73+
/**
74+
* Toggles the display of node labels.
75+
* When true, labels for each node will be shown.
76+
*/
4877
protected boolean toggleNodeLabels = true;
78+
79+
/**
80+
* Toggles the display of edge (link) labels.
81+
* When true, labels for each link/edge will be shown.
82+
*/
4983
protected boolean toggleLinkLabels = false;
5084

5185
/** internal storage of nodes */
@@ -174,8 +208,9 @@ public void show() {
174208
}
175209
}
176210

177-
// Node options
211+
/** Allow incomming links */
178212
protected boolean nodeAllowIncomingLinks = true;
213+
/** Allow outgoing links */
179214
protected boolean nodeAllowOutgoingLinks = true;
180215

181216

org-tweetyproject-graphs/src/main/java/org/tweetyproject/graphs/util/AigLink.java

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,30 +99,61 @@ public String toJson() {
9999
return s.toString();
100100
}
101101

102+
/**
103+
* Returns whether the element is deletable.
104+
*
105+
* @return {@code true} if the element can be deleted; {@code false} otherwise.
106+
*/
102107
public boolean isDeletable() {
103108
return deletable;
104109
}
105110

111+
/**
112+
* Sets whether the element is deletable.
113+
*
114+
* @param deletable {@code true} to allow deletion of the element; {@code false} to prevent it.
115+
*/
106116
public void setDeletable(boolean deletable) {
107117
this.deletable = deletable;
108118
}
109119

120+
/**
121+
* Returns whether the label of the element is editable.
122+
*
123+
* @return {@code true} if the label can be edited; {@code false} otherwise.
124+
*/
110125
public boolean isLabelEditable() {
111126
return labelEditable;
112127
}
113128

129+
/**
130+
* Sets whether the label of the element is editable.
131+
*
132+
* @param labelEditable {@code true} to make the label editable; {@code false} to make it read-only.
133+
*/
114134
public void setLabelEditable(boolean labelEditable) {
115135
this.labelEditable = labelEditable;
116136
}
117137

138+
/**
139+
* Returns the color associated with the element.
140+
*
141+
* @return a {@link String} representing the color (e.g., a hex code like {@code "#FF0000"}).
142+
*/
118143
public String getColor() {
119144
return color;
120145
}
121146

147+
/**
148+
* Sets the color associated with the element.
149+
*
150+
* @param color a {@link String} representing the color (e.g., a hex code like {@code "#00FF00"}).
151+
*/
122152
public void setColor(String color) {
123153
this.color = color;
124154
}
125155

156+
126157
@Override
127158
public String toString() {
128159
return getLabel();

0 commit comments

Comments
 (0)