Search in sources :

Example 1 with RAMInterface

use of de.neemann.digital.core.memory.RAMInterface in project Digital by hneemann.

the class RAMShape method applyStateMonitor.

@Override
public Interactor applyStateMonitor(IOState ioState, Observer guiObserver) {
    return new Interactor() {

        @Override
        public boolean clicked(CircuitComponent cc, Point pos, IOState ioState, Element element, Sync modelSync) {
            if (element instanceof RAMInterface) {
                DataField dataField = ((RAMInterface) element).getMemory();
                DataEditor dataEditor = new DataEditor(cc, dataField, size, dataBits, addrBits, true, modelSync);
                dataEditor.showDialog(dialogTitle, model);
            }
            return false;
        }
    };
}
Also used : DataEditor(de.neemann.digital.gui.components.DataEditor) DataField(de.neemann.digital.core.memory.DataField) CircuitComponent(de.neemann.digital.gui.components.CircuitComponent) IOState(de.neemann.digital.draw.elements.IOState) Sync(de.neemann.digital.gui.sync.Sync) RAMInterface(de.neemann.digital.core.memory.RAMInterface)

Aggregations

DataField (de.neemann.digital.core.memory.DataField)1 RAMInterface (de.neemann.digital.core.memory.RAMInterface)1 IOState (de.neemann.digital.draw.elements.IOState)1 CircuitComponent (de.neemann.digital.gui.components.CircuitComponent)1 DataEditor (de.neemann.digital.gui.components.DataEditor)1 Sync (de.neemann.digital.gui.sync.Sync)1