Search in sources :

Example 26 with Display

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

the class DeviceBrowserMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final IBrowser browser = this.model.getBrowser();
    final Display d = this.surface.getDisplay();
    final boolean isPresetSession = browser.isPresetContentType();
    final ICursorDevice cd = this.model.getCursorDevice();
    if (isPresetSession && !(browser.isActive() && cd.hasSelectedDevice())) {
        d.notify("No active Browsing Session. Select device and press Browser...");
        return;
    }
    d.clear();
    switch(this.selectionMode) {
        case SELECTION_OFF:
            for (int i = 0; i < 7; i++) {
                final IBrowserColumn column = this.getFilterColumn(i);
                final String value = column != null && column.doesCursorExist() ? column.getCursorName().equals(column.getWildcard()) ? "-" : column.getCursorName() : "";
                final String name = column == null ? "" : StringUtils.shortenAndFixASCII(column.getName(), 6);
                d.setCell(0, i, name).setCell(1, i, value);
            }
            final String selectedResult = browser.getSelectedResult();
            d.setCell(0, 7, browser.getSelectedContentType()).setCell(1, 7, selectedResult == null || selectedResult.length() == 0 ? "-" : selectedResult);
            break;
        case SELECTION_PRESET:
            final IBrowserColumnItem[] results = browser.getResultColumnItems();
            for (int i = 0; i < browser.getNumFilterColumnEntries(); i++) {
                if (i < results.length)
                    d.setBlock(i / 4, i % 4, (results[i].isSelected() ? ">" : " ") + StringUtils.fixASCII(results[i].getName()));
                else
                    break;
            }
            break;
        case SELECTION_FILTER:
            final IBrowserColumnItem[] items = browser.getFilterColumn(this.filterColumn).getItems();
            for (int i = 0; i < browser.getNumResults(); i++) d.setBlock(i / 4, i % 4, (items[i].isSelected() ? ">" : " ") + StringUtils.fixASCII(items[i].getName()));
            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) ICursorDevice(de.mossgrabers.framework.daw.ICursorDevice) Display(de.mossgrabers.framework.controller.display.Display)

Example 27 with Display

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

the class DeviceParamsMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    this.drawDisplay2();
    final Display d = this.surface.getDisplay().clear();
    final ICursorDevice cd = this.model.getCursorDevice();
    if (!cd.hasSelectedDevice()) {
        d.notify("Please select a Device...", true, false);
        return;
    }
    // Row 1 & 2
    final int extenderOffset = this.surface.getExtenderOffset();
    for (int i = 0; i < 8; i++) {
        final IParameter param = cd.getFXParam(extenderOffset + i);
        d.setCell(0, i, param.doesExist() ? StringUtils.fixASCII(param.getName()) : "").setCell(1, i, param.getDisplayedValue(8));
    }
    d.allDone();
}
Also used : IParameter(de.mossgrabers.framework.daw.data.IParameter) ICursorDevice(de.mossgrabers.framework.daw.ICursorDevice) Display(de.mossgrabers.framework.controller.display.Display)

Example 28 with Display

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

the class AbstractTrackMode method drawTrackHeader.

protected boolean drawTrackHeader() {
    final IChannelBank tb = this.model.getCurrentTrackBank();
    final Display d = this.surface.getDisplay().clear();
    // Format track names
    final int extenderOffset = this.surface.getExtenderOffset();
    for (int i = 0; i < 8; i++) {
        final ITrack t = tb.getTrack(extenderOffset + i);
        final String name = t.getName();
        d.setCell(0, i, StringUtils.shortenAndFixASCII(name, 6));
    }
    d.done(0);
    return true;
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) IChannelBank(de.mossgrabers.framework.daw.IChannelBank) Display(de.mossgrabers.framework.controller.display.Display)

Example 29 with Display

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

the class PanMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    if (!this.surface.getConfiguration().hasDisplay1())
        return;
    this.drawDisplay2();
    if (!this.drawTrackHeader())
        return;
    final Display d = this.surface.getDisplay();
    final IChannelBank tb = this.model.getCurrentTrackBank();
    final int extenderOffset = this.surface.getExtenderOffset();
    for (int i = 0; i < 8; i++) {
        final ITrack t = tb.getTrack(extenderOffset + i);
        d.setCell(1, i, t.getPanStr(6));
    }
    d.done(1);
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) IChannelBank(de.mossgrabers.framework.daw.IChannelBank) Display(de.mossgrabers.framework.controller.display.Display)

Example 30 with Display

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

the class VolumeMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    if (!this.surface.getConfiguration().hasDisplay1())
        return;
    this.drawDisplay2();
    if (!this.drawTrackHeader())
        return;
    final Display d = this.surface.getDisplay();
    final IChannelBank tb = this.model.getCurrentTrackBank();
    final int extenderOffset = this.surface.getExtenderOffset();
    for (int i = 0; i < 8; i++) {
        final ITrack t = tb.getTrack(extenderOffset + i);
        d.setCell(1, i, t.getVolumeStr(6));
    }
    d.done(1);
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) IChannelBank(de.mossgrabers.framework.daw.IChannelBank) Display(de.mossgrabers.framework.controller.display.Display)

Aggregations

Display (de.mossgrabers.framework.controller.display.Display)53 PushDisplay (de.mossgrabers.push.controller.PushDisplay)22 IChannelBank (de.mossgrabers.framework.daw.IChannelBank)18 ITrack (de.mossgrabers.framework.daw.data.ITrack)18 ICursorDevice (de.mossgrabers.framework.daw.ICursorDevice)10 ISend (de.mossgrabers.framework.daw.data.ISend)6 IChannel (de.mossgrabers.framework.daw.data.IChannel)5 IMasterTrack (de.mossgrabers.framework.daw.data.IMasterTrack)4 IParameter (de.mossgrabers.framework.daw.data.IParameter)4 PushConfiguration (de.mossgrabers.push.PushConfiguration)4 SLDisplay (de.mossgrabers.sl.controller.SLDisplay)4 IBrowser (de.mossgrabers.framework.daw.IBrowser)3 IBrowserColumn (de.mossgrabers.framework.daw.data.IBrowserColumn)3 IBrowserColumnItem (de.mossgrabers.framework.daw.data.IBrowserColumnItem)3 ViewManager (de.mossgrabers.framework.view.ViewManager)3 IApplication (de.mossgrabers.framework.daw.IApplication)2 MCUConfiguration (de.mossgrabers.mcu.MCUConfiguration)2 IValueChanger (de.mossgrabers.framework.controller.IValueChanger)1 ICursorClip (de.mossgrabers.framework.daw.ICursorClip)1 ISceneBank (de.mossgrabers.framework.daw.ISceneBank)1