mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-19 09:54:49 -04:00
updated documentation
This commit is contained in:
parent
d7adf4885c
commit
c33ab2b612
@ -11,8 +11,10 @@ import de.neemann.digital.draw.graphics.Style;
|
||||
public interface Drawable {
|
||||
/**
|
||||
* Draws an element depending on its state.
|
||||
* @param graphic interface to draw to
|
||||
* @param highLight true if a highlighted drawing is required
|
||||
*
|
||||
* @param graphic interface to draw to
|
||||
* @param highLight null means no highlighting at all. If highlight is not null, highlight is active.
|
||||
* The given style should be used to highlight the drawing.
|
||||
*/
|
||||
void drawTo(Graphic graphic, Style highLight);
|
||||
}
|
||||
|
@ -30,13 +30,14 @@ public interface Shape extends Drawable {
|
||||
* to all of the inputs ObservableValues it depends on.
|
||||
* To access the actual state while drawing, the Shape needs to store the IOState or the needed inputs
|
||||
* in a member variable.
|
||||
* <p>
|
||||
* If the shape returns an interactor, this interactors clicked method is called if the
|
||||
* shape is clicked in running mode. If the shape is not interactive siply return null.
|
||||
* shape is clicked in running mode. If the shape is not interactive simply return null.
|
||||
*
|
||||
* @param ioState the state of the element, never null
|
||||
* @param guiObserver can be used to update the GUI by calling hasChanged, maybe null
|
||||
* @return the interactor is called if the shape is clicked during running mode, maybe null
|
||||
* @param guiObserver can be used to update the GUI by calling hasChanged, Is maybe null.
|
||||
* If the shape depends on a signal value, you can add this observer to
|
||||
* the signal. In this case a repaint is initiated, if the signal changes.
|
||||
* @return The interactor which is used to interact with the shape while the simulation runs.
|
||||
*/
|
||||
InteractorInterface applyStateMonitor(IOState ioState, Observer guiObserver);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user