From 3c7b77df3e857a7c22ed0281c531e82e891f7fda Mon Sep 17 00:00:00 2001 From: bancika Date: Sun, 26 Apr 2020 20:16:20 +0200 Subject: [PATCH] loadline --- .../diylc/components/misc/LoadlineEntity.java | 111 ++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 diylc/diylc-library/src/org/diylc/components/misc/LoadlineEntity.java diff --git a/diylc/diylc-library/src/org/diylc/components/misc/LoadlineEntity.java b/diylc/diylc-library/src/org/diylc/components/misc/LoadlineEntity.java new file mode 100644 index 00000000..48e76139 --- /dev/null +++ b/diylc/diylc-library/src/org/diylc/components/misc/LoadlineEntity.java @@ -0,0 +1,111 @@ +/* + + DIY Layout Creator (DIYLC). + Copyright (c) 2009-2018 held jointly by the individual authors. + + This file is part of DIYLC. + + DIYLC is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DIYLC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DIYLC. If not, see . + +*/ +package org.diylc.components.misc; + +import java.awt.geom.Point2D; +import java.io.Serializable; +import java.util.List; + +import org.diylc.core.measures.Current; +import org.diylc.core.measures.Power; +import org.diylc.core.measures.Voltage; + +/** + * Represents a complete load characteristics, used for tubes and transistors. + * + * @author bancika + */ +public class LoadlineEntity implements Serializable { + + private static final long serialVersionUID = 1L; + + private String name; + private Power maxDissipation; + private Voltage maxVoltage; + private Current maxCurrent; + private List lines; + + public LoadlineEntity() { + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Power getMaxDissipation() { + return maxDissipation; + } + + public void setMaxDissipation(Power maxDissipation) { + this.maxDissipation = maxDissipation; + } + + public Voltage getMaxVoltage() { + return maxVoltage; + } + + public void setMaxVoltage(Voltage maxVoltage) { + this.maxVoltage = maxVoltage; + } + + public Current getMaxCurrent() { + return maxCurrent; + } + + public void setMaxCurrent(Current maxCurrent) { + this.maxCurrent = maxCurrent; + } + + public List getLines() { + return lines; + } + + public void setLines(List lines) { + this.lines = lines; + } + + // Individual load line, tied to the grid voltage + public static class Line { + private Voltage voltage; + private Point2D[] controlPoints; + + public Voltage getVoltage() { + return voltage; + } + + public void setVoltage(Voltage voltage) { + this.voltage = voltage; + } + + public Point2D[] getControlPoints() { + return controlPoints; + } + + public void setControlPoints(Point2D[] controlPoints) { + this.controlPoints = controlPoints; + } + } +}