mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-14 07:17:13 -04:00
added some documentation
This commit is contained in:
parent
4211422d44
commit
118c66a797
@ -7,6 +7,7 @@ import de.neemann.digital.draw.graphics.Vector;
|
||||
|
||||
/**
|
||||
* Puts the pins name and the pins x-y-position together!
|
||||
*
|
||||
* @author hneemann
|
||||
*/
|
||||
public class Pin extends PinInfo {
|
||||
@ -16,27 +17,58 @@ public class Pin extends PinInfo {
|
||||
private ObservableValue readerValue; // reader for bidirectional pins
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new pin
|
||||
*
|
||||
* @param pos the position
|
||||
* @param pin the PinDescription
|
||||
*/
|
||||
public Pin(Vector pos, PinDescription pin) {
|
||||
super(pin);
|
||||
this.pos = pos;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the pins position
|
||||
*/
|
||||
public Vector getPos() {
|
||||
return pos;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the value which represents the pin state
|
||||
*/
|
||||
public ObservableValue getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value which represents the pins state
|
||||
*
|
||||
* @param value the ObservableValue
|
||||
*/
|
||||
public void setValue(ObservableValue value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* If the pin is bidirectional there are two values, one which can be used to read the pins state
|
||||
* and one to write the pins state. The readers value is generated so that all the writers are checked to
|
||||
* find and select the one writer which is not in high Z state. If more then one writer is in an not high Z
|
||||
* state an exception is thrown.
|
||||
*
|
||||
* @return returns the bidirectional reader
|
||||
*/
|
||||
public ObservableValue getReaderValue() {
|
||||
return readerValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the bidirectional reader.
|
||||
*
|
||||
* @param readerValue the bidirectional reader
|
||||
* @see Pin#getReaderValue()
|
||||
*/
|
||||
public void setReaderValue(ObservableValue readerValue) {
|
||||
this.readerValue = readerValue;
|
||||
}
|
||||
|
@ -21,7 +21,9 @@ public class WindowPosManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a new window
|
||||
* Registers a new window.
|
||||
* If an old window with the same id is found, its position and size is set to the new window.
|
||||
* After that the old window is disposed.
|
||||
*
|
||||
* @param id the id of the window
|
||||
* @param window the window itself
|
||||
|
Loading…
x
Reference in New Issue
Block a user