Search in sources :

Example 6 with ITextDisplay

use of de.mossgrabers.framework.controller.display.ITextDisplay in project DrivenByMoss by git-moss.

the class FixedMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final ITextDisplay d = this.surface.getTextDisplay().clearRow(0).clearRow(1);
    d.setBlock(0, 0, "New Clip Length:");
    final int newClipLength = this.surface.getConfiguration().getNewClipLength();
    for (int i = 0; i < 8; i++) d.setCell(1, i, (newClipLength == i ? SLDisplay.RIGHT_ARROW : " ") + FixedMode.CLIP_LENGTHS[i]);
    d.done(0).done(1);
}
Also used : ITextDisplay(de.mossgrabers.framework.controller.display.ITextDisplay)

Example 7 with ITextDisplay

use of de.mossgrabers.framework.controller.display.ITextDisplay in project DrivenByMoss by git-moss.

the class FrameMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final ITextDisplay d = this.surface.getTextDisplay().clearRow(0).clearRow(1);
    d.setBlock(0, 0, "Layouts:").setCell(0, 3, "Panels:");
    for (int i = 0; i < COMMANDS.length; i++) d.setCell(1, i, COMMANDS[i]);
    d.done(0).done(1);
}
Also used : ITextDisplay(de.mossgrabers.framework.controller.display.ITextDisplay)

Example 8 with ITextDisplay

use of de.mossgrabers.framework.controller.display.ITextDisplay in project DrivenByMoss by git-moss.

the class BrowseMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final ITextDisplay d = this.surface.getTextDisplay();
    final IBrowser browser = this.model.getBrowser();
    if (!browser.isActive())
        return;
    d.clear();
    String selectedResult;
    switch(this.selectionMode) {
        case BrowseMode.SELECTION_OFF:
            d.setCell(0, 0, "BROWSE").setCell(1, 0, browser.getSelectedContentType().toUpperCase(Locale.US));
            selectedResult = browser.getSelectedResult();
            d.setCell(0, 8, "SELECTED").setCell(1, 8, selectedResult == null ? "NONE" : selectedResult);
            for (int i = 0; i < 7; i++) {
                final IBrowserColumn column = browser.getFilterColumn(i);
                d.setCell(0, 1 + i, StringUtils.shortenAndFixASCII(column.getName() + ":", 8).toUpperCase(Locale.US)).setCell(1, 1 + i, column.doesCursorExist() ? column.getCursorName().toUpperCase(Locale.US) : "");
            }
            break;
        case BrowseMode.SELECTION_PRESET:
            d.setCell(0, 0, "SELECTED");
            final IBrowserColumnItem[] results = browser.getResultColumnItems();
            for (int i = 0; i < 16; i++) d.setCell(i % 2, 1 + i / 2, (results[i].isSelected() ? ">" : " ") + results[i].getName().toUpperCase(Locale.US));
            break;
        case BrowseMode.SELECTION_FILTER:
            final IBrowserColumn fc = browser.getFilterColumn(this.filterColumn);
            d.setCell(0, 0, fc.getName().toUpperCase(Locale.US));
            final IBrowserColumnItem[] items = fc.getItems();
            for (int i = 0; i < 16; i++) {
                final String name = items[i].getName().toUpperCase(Locale.US);
                final String text = (items[i].isSelected() ? ">" : " ") + name;
                d.setCell(i % 2, 1 + i / 2, text);
            }
            break;
        default:
            // No more modes
            break;
    }
    d.allDone();
}
Also used : IBrowser(de.mossgrabers.framework.daw.IBrowser) IBrowserColumnItem(de.mossgrabers.framework.daw.data.IBrowserColumnItem) IBrowserColumn(de.mossgrabers.framework.daw.data.IBrowserColumn) ITextDisplay(de.mossgrabers.framework.controller.display.ITextDisplay)

Example 9 with ITextDisplay

use of de.mossgrabers.framework.controller.display.ITextDisplay in project DrivenByMoss by git-moss.

the class UserMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    this.drawDisplay2();
    final ITextDisplay d = this.surface.getTextDisplay().clear();
    // Row 1 & 2
    final int extenderOffset = this.surface.getExtenderOffset();
    final IParameterBank parameterBank = this.model.getUserParameterBank();
    for (int i = 0; i < 8; i++) {
        final IParameter param = parameterBank.getItem(extenderOffset + i);
        d.setCell(0, i, param.doesExist() ? StringUtils.shortenAndFixASCII(param.getName(6), 6) : "").setCell(1, i, StringUtils.shortenAndFixASCII(param.getDisplayedValue(6), 6));
    }
    d.allDone();
}
Also used : IParameter(de.mossgrabers.framework.daw.data.IParameter) ITextDisplay(de.mossgrabers.framework.controller.display.ITextDisplay) IParameterBank(de.mossgrabers.framework.daw.data.bank.IParameterBank)

Example 10 with ITextDisplay

use of de.mossgrabers.framework.controller.display.ITextDisplay in project DrivenByMoss by git-moss.

the class MasterMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    if (!this.surface.getConfiguration().hasDisplay1())
        return;
    this.drawDisplay2();
    final ITextDisplay d = this.surface.getTextDisplay().clear();
    final String projectName = StringUtils.fixASCII(this.model.getProject().getName());
    final IMasterTrack master = this.model.getMasterTrack();
    final IApplication application = this.model.getApplication();
    d.setCell(0, 0, "Volume").setCell(0, 1, "Pan").setBlock(0, 1, "Audio Engine:").setCell(0, 4, application.isEngineActive() ? " On" : " Off");
    d.setCell(0, 5, "Prjct:").setBlock(0, 3, projectName);
    d.setCell(1, 0, master.getVolumeStr(6)).setCell(1, 1, master.getPanStr(6)).setBlock(1, 1, application.isEngineActive() ? "  Turn off" : "  Turn on");
    d.setCell(1, 6, " <<").setCell(1, 7, " >>").allDone();
}
Also used : IApplication(de.mossgrabers.framework.daw.IApplication) ITextDisplay(de.mossgrabers.framework.controller.display.ITextDisplay) IMasterTrack(de.mossgrabers.framework.daw.data.IMasterTrack)

Aggregations

ITextDisplay (de.mossgrabers.framework.controller.display.ITextDisplay)49 ITrack (de.mossgrabers.framework.daw.data.ITrack)16 ITrackBank (de.mossgrabers.framework.daw.data.bank.ITrackBank)16 ICursorDevice (de.mossgrabers.framework.daw.data.ICursorDevice)8 IParameter (de.mossgrabers.framework.daw.data.IParameter)6 IMasterTrack (de.mossgrabers.framework.daw.data.IMasterTrack)5 IParameterBank (de.mossgrabers.framework.daw.data.bank.IParameterBank)5 IBrowser (de.mossgrabers.framework.daw.IBrowser)4 ITransport (de.mossgrabers.framework.daw.ITransport)4 IBrowserColumn (de.mossgrabers.framework.daw.data.IBrowserColumn)4 ICursorTrack (de.mossgrabers.framework.daw.data.ICursorTrack)4 ISend (de.mossgrabers.framework.daw.data.ISend)4 ISendBank (de.mossgrabers.framework.daw.data.bank.ISendBank)4 IBrowserColumnItem (de.mossgrabers.framework.daw.data.IBrowserColumnItem)3 Scales (de.mossgrabers.framework.scale.Scales)2 IGraphicDisplay (de.mossgrabers.framework.controller.display.IGraphicDisplay)1 IApplication (de.mossgrabers.framework.daw.IApplication)1 IStepInfo (de.mossgrabers.framework.daw.IStepInfo)1 GridStep (de.mossgrabers.framework.daw.data.GridStep)1 IMarker (de.mossgrabers.framework.daw.data.IMarker)1