Search in sources :

Example 1 with ITextDisplay

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

the class BaseMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    if (this.surface.getConfiguration().isPush2()) {
        final IGraphicDisplay display = this.surface.getGraphicsDisplay();
        this.updateDisplay2(display);
        display.send();
        return;
    }
    final ITextDisplay display = this.surface.getTextDisplay().clear();
    this.updateDisplay1(display);
    display.allDone();
}
Also used : IGraphicDisplay(de.mossgrabers.framework.controller.display.IGraphicDisplay) ITextDisplay(de.mossgrabers.framework.controller.display.ITextDisplay)

Example 2 with ITextDisplay

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

the class DevicePresetsMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final ITextDisplay d = this.surface.getTextDisplay().clear();
    if (!this.model.hasSelectedDevice()) {
        d.setRow(0, "                       Please select a device...                       ");
        d.done(0).done(1);
        return;
    }
    final IBrowser browser = this.model.getBrowser();
    if (!browser.isActive()) {
        d.setRow(0, "                     No active Browsing Session.                       ");
        d.setRow(1, "                        Press Browse again...                          ");
        d.done(0).done(1);
        return;
    }
    String selectedResult;
    switch(this.selectionMode) {
        case DevicePresetsMode.SELECTION_OFF:
            selectedResult = browser.getSelectedResult();
            d.setBlock(0, 0, "Preset:").setBlock(1, 0, selectedResult == null ? "None" : selectedResult);
            for (int i = 0; i < 6; i++) {
                final IBrowserColumn column = browser.getFilterColumn(i);
                final String columnName = column.doesExist() ? StringUtils.shortenAndFixASCII(column.getName() + ":", 8) : "";
                d.setCell(0, 2 + i, columnName).setCell(1, 2 + i, column.doesCursorExist() ? column.getCursorName() : "");
            }
            break;
        case DevicePresetsMode.SELECTION_PRESET:
            final IBrowserColumnItem[] results = browser.getResultColumnItems();
            for (int i = 0; i < 16; i++) d.setCell(i % 2, i / 2, (results[i].isSelected() ? SLDisplay.RIGHT_ARROW : " ") + results[i].getName());
            break;
        case DevicePresetsMode.SELECTION_FILTER:
            final IBrowserColumnItem[] items = browser.getFilterColumn(this.filterColumn).getItems();
            for (int i = 0; i < 16; i++) {
                final String name = StringUtils.fixASCII(items[i].getName());
                String text = (items[i].isSelected() ? SLDisplay.RIGHT_ARROW : " ") + name + "                ";
                if (!name.isEmpty()) {
                    final String hitStr = "(" + items[i].getHitCount() + ")";
                    text = text.substring(0, 17 - hitStr.length()) + hitStr;
                }
                d.setCell(i % 2, i / 2, text);
            }
            break;
        default:
            // Not used
            break;
    }
    d.done(0).done(1);
}
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 3 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 4 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 5 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)

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