mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-14 15:26:52 -04:00
Minor changes to In class
This commit is contained in:
parent
6b31d36e90
commit
e903f427ff
@ -14,6 +14,9 @@ import de.neemann.digital.lang.Lang;
|
|||||||
*/
|
*/
|
||||||
public class In implements Element {
|
public class In implements Element {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The inputs description
|
||||||
|
*/
|
||||||
public static final ElementTypeDescription DESCRIPTION = new ElementTypeDescription(In.class) {
|
public static final ElementTypeDescription DESCRIPTION = new ElementTypeDescription(In.class) {
|
||||||
@Override
|
@Override
|
||||||
public String getDescription(ElementAttributes elementAttributes) {
|
public String getDescription(ElementAttributes elementAttributes) {
|
||||||
@ -29,10 +32,14 @@ public class In implements Element {
|
|||||||
|
|
||||||
private final ObservableValue output;
|
private final ObservableValue output;
|
||||||
private final String label;
|
private final String label;
|
||||||
private final boolean highZ;
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new instance
|
||||||
|
*
|
||||||
|
* @param attributes the inputs attributes
|
||||||
|
*/
|
||||||
public In(ElementAttributes attributes) {
|
public In(ElementAttributes attributes) {
|
||||||
highZ = attributes.get(AttributeKey.IsHighZ);
|
boolean highZ = attributes.get(AttributeKey.IsHighZ);
|
||||||
output = new ObservableValue("out", attributes.get(AttributeKey.Bits), highZ);
|
output = new ObservableValue("out", attributes.get(AttributeKey.Bits), highZ);
|
||||||
output.setValue(attributes.get(AttributeKey.Default));
|
output.setValue(attributes.get(AttributeKey.Default));
|
||||||
label = attributes.get(AttributeKey.Label);
|
label = attributes.get(AttributeKey.Label);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user