import net.haspamelodica.swt.helper.gcs.GeneralGC;
import net.haspamelodica.swt.helper.swtobjectwrappers.Font;
import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
import net.haspamelodica.swt.helper.gcs.GeneralGC;
import net.haspamelodica.swt.helper.swtobjectwrappers.Font;
import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
- private final WireArray wa;
- private final List<WireArray> connectedWireArrays;
- private final List<Point> wireArrayConnectionPoints;
+ private final WireEnd we;
+ private final List<WireEnd> connectedWireEnds;
+ private final List<Point> wireEndConnectionPoints;
- List<WireArray> connectedWireArraysModifiable = new ArrayList<>();
- List<Point> wireArrayConnectionPointsModifiable = new ArrayList<>();
+ List<WireEnd> connectedWireEndsModifiable = new ArrayList<>();
+ List<Point> wireEndConnectionPointsModifiable = new ArrayList<>();
- connectedWireArraysModifiable.add(output);
- wireArrayConnectionPointsModifiable.add(new Point(20, 7.5));
+ connectedWireEndsModifiable.add(output);
+ wireEndConnectionPointsModifiable.add(new Point(20, 7.5));
- this.connectedWireArrays = Collections.unmodifiableList(connectedWireArraysModifiable);
- this.wireArrayConnectionPoints = Collections.unmodifiableList(wireArrayConnectionPointsModifiable);
+ this.connectedWireEnds = Collections.unmodifiableList(connectedWireEndsModifiable);
+ this.wireEndConnectionPoints = Collections.unmodifiableList(wireEndConnectionPointsModifiable);
{
return new Rectangle(0, 0, 20, 15);
}
{
return new Rectangle(0, 0, 20, 15);
}
@Override
public void render(GeneralGC gc)
{
gc.drawRectangle(0, 0, 20, 15);
@Override
public void render(GeneralGC gc)
{
gc.drawRectangle(0, 0, 20, 15);
Font oldFont = gc.getFont();
Font labelFont = new Font(oldFont.getName(), 6, oldFont.getStyle());
gc.setFont(labelFont);
Font oldFont = gc.getFont();
Font labelFont = new Font(oldFont.getName(), 6, oldFont.getStyle());
gc.setFont(labelFont);
gc.drawText(label, 10 - textExtent.x / 2, 7.5 - textExtent.y / 2, true);
gc.setFont(oldFont);
}
gc.drawText(label, 10 - textExtent.x / 2, 7.5 - textExtent.y / 2, true);
gc.setFont(oldFont);
}