use of de.mossgrabers.framework.controller.display.Display in project DrivenByMoss by git-moss.
the class VolumeMode method drawTrackHeader.
/**
* {@inheritDoc}
*/
@Override
protected boolean drawTrackHeader() {
if (!super.drawTrackHeader())
return false;
if (this.surface.getConfiguration().isDisplayTrackNames())
return true;
final IChannelBank tb = this.model.getCurrentTrackBank();
final Display d = this.surface.getDisplay();
final int extenderOffset = this.surface.getExtenderOffset();
for (int i = 0; i < 8; i++) {
if (tb.getTrack(extenderOffset + i).doesExist())
d.setCell(0, i, "Volume");
else
d.clearCell(0, i);
}
d.done(0);
return true;
}
use of de.mossgrabers.framework.controller.display.Display in project DrivenByMoss by git-moss.
the class BaseMode method drawDisplay2.
protected void drawDisplay2() {
if (!this.surface.getConfiguration().hasDisplay2())
return;
final IChannelBank tb = this.model.getCurrentTrackBank();
// Format track names
final Display d2 = this.surface.getSecondDisplay();
final int extenderOffset = this.surface.getExtenderOffset();
final boolean isMainDevice = this.surface.isMainDevice();
for (int i = 0; i < 8; i++) {
final ITrack t = tb.getTrack(extenderOffset + i);
d2.setCell(0, i, StringUtils.shortenAndFixASCII(t.getName(), isMainDevice ? 6 : 7));
}
if (isMainDevice)
d2.setCell(0, 8, "Maste");
d2.done(0);
d2.clearRow(1);
if (isMainDevice) {
final IMasterTrack masterTrack = this.model.getMasterTrack();
final ICursorDevice cursorDevice = this.model.getCursorDevice();
final ITrack selectedTrack = masterTrack.isSelected() ? masterTrack : tb.getSelectedTrack();
d2.setBlock(1, 0, "Sel.track: ").setBlock(1, 1, selectedTrack == null ? "None" : StringUtils.fixASCII(selectedTrack.getName()));
d2.setBlock(1, 2, "Sel.devce: ").setBlock(1, 3, cursorDevice.hasSelectedDevice() ? cursorDevice.getName() : "None");
}
d2.done(1);
}
use of de.mossgrabers.framework.controller.display.Display in project DrivenByMoss by git-moss.
the class AbstractTrackMode method drawRow4.
protected void drawRow4() {
final IChannelBank tb = this.model.getCurrentTrackBank();
final ITrack selTrack = tb.getSelectedTrack();
// Format track names
final int selIndex = selTrack == null ? -1 : selTrack.getIndex();
final Display d = this.surface.getDisplay();
for (int i = 0; i < 8; i++) {
final boolean isSel = i == selIndex;
final ITrack t = tb.getTrack(i);
final String n = StringUtils.shortenAndFixASCII(t.getName(), isSel ? 7 : 8);
d.setCell(3, i, isSel ? PushDisplay.RIGHT_ARROW + n : n);
}
d.done(3);
}
use of de.mossgrabers.framework.controller.display.Display in project DrivenByMoss by git-moss.
the class ClipMode method updateDisplay1.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay1() {
final Display d = this.surface.getDisplay();
final ICursorClip clip = this.model.getCursorClip();
d.setCell(0, 0, "PlayStrt").setCell(1, 0, this.formatMeasures(clip.getPlayStart(), 1));
d.setCell(0, 1, "Play End").setCell(1, 1, this.formatMeasures(clip.getPlayEnd(), 1));
d.setCell(0, 2, "LoopStrt").setCell(1, 2, this.formatMeasures(clip.getLoopStart(), 1));
d.setCell(0, 3, "LopLngth").setCell(1, 3, this.formatMeasures(clip.getLoopLength(), 0));
d.setCell(0, 4, "Loop").setCell(1, 4, clip.isLoopEnabled() ? "On" : "Off").clearCell(0, 5).clearCell(1, 5);
d.setCell(0, 6, "Shuffle").setCell(1, 6, clip.isShuffleEnabled() ? "On" : "Off");
d.setCell(0, 7, "Accent").setCell(1, 7, clip.getFormattedAccent()).done(0).done(1).clearRow(2).done(2);
this.drawRow4();
}
use of de.mossgrabers.framework.controller.display.Display in project DrivenByMoss by git-moss.
the class LayerDetailsMode method updateDisplay1.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay1() {
final Display d = this.surface.getDisplay();
final IChannel deviceChain = this.model.getCursorDevice().getSelectedLayerOrDrumPad();
if (deviceChain == null)
d.setRow(1, " Please selecta layer... ").clearRow(0).clearRow(2).done(0).done(2);
else {
d.clearRow(0).clearRow(1).setBlock(0, 0, "Layer: " + deviceChain.getName());
d.setCell(2, 0, "Active").setCell(3, 0, deviceChain.isActivated() ? "On" : "Off");
d.setCell(2, 1, "");
d.setCell(3, 1, "");
d.setCell(2, 2, "Mute").setCell(3, 2, deviceChain.isMute() ? "On" : "Off");
d.setCell(2, 3, "Solo").setCell(3, 3, deviceChain.isSolo() ? "On" : "Off");
d.setCell(2, 4, "");
d.setCell(3, 4, "");
d.setCell(2, 5, "");
d.setCell(3, 5, "");
d.clearCell(2, 6).clearCell(3, 6);
d.setCell(2, 7, "Select").setCell(3, 7, "Color").done(0).done(1).done(2).done(3);
}
}
Aggregations