lphystudio.app.graphicalmodelpanel.viewer.BooleanArrayLabel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lphy-studio Show documentation
Show all versions of lphy-studio Show documentation
The GUI for LPhy language.
The newest version!
package lphystudio.app.graphicalmodelpanel.viewer;
import lphy.core.model.Value;
import javax.swing.*;
//TODO not used
public class BooleanArrayLabel extends JLabel {
public BooleanArrayLabel(Value values) {
StringBuilder builder = new StringBuilder();
builder.append("[");
builder.append(values.value()[0]);
for (int i = 1; i < values.value().length; i++) {
if (i % 8 == 0) {
builder.append(",
");
} else {
builder.append(", ");
}
builder.append(values.value()[i]);
}
builder.append("]");
String str = builder.toString();
setText(str);
}
}