use of de.mossgrabers.framework.controller.display.ITextDisplay in project DrivenByMoss by git-moss.
the class SendMode method updateDisplay.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay() {
if (!this.surface.getConfiguration().hasDisplay1())
return;
if (this.model.isEffectTrackBankActive()) {
this.surface.getModeManager().setActive(Modes.TRACK);
return;
}
this.drawDisplay2();
if (!this.drawTrackHeader())
return;
final ITextDisplay d = this.surface.getTextDisplay();
final ITrackBank tb = this.getTrackBank();
if (!tb.canEditSend(this.sendIndex)) {
d.notify("Send channel " + (this.sendIndex + 1) + " does not exist.");
return;
}
final int extenderOffset = this.getExtenderOffset();
for (int i = 0; i < 8; i++) {
final ITrack t = tb.getItem(extenderOffset + i);
final ISendBank sendBank = t.getSendBank();
d.setCell(1, i, this.sendIndex < sendBank.getPageSize() ? sendBank.getItem(this.sendIndex).getDisplayedValue(6) : "");
}
d.done(1);
}
use of de.mossgrabers.framework.controller.display.ITextDisplay in project DrivenByMoss by git-moss.
the class SendMode method drawTrackHeader.
/**
* {@inheritDoc}
*/
@Override
protected boolean drawTrackHeader() {
if (this.model.isEffectTrackBankActive()) {
this.surface.getModeManager().setActive(Modes.TRACK);
return true;
}
if (!super.drawTrackHeader())
return false;
if (this.surface.getConfiguration().isDisplayTrackNames())
return true;
final ITextDisplay d = this.surface.getTextDisplay();
final ITrackBank tb = this.getTrackBank();
final int extenderOffset = this.getExtenderOffset();
for (int i = 0; i < 8; i++) {
final ITrack t = tb.getItem(extenderOffset + i);
if (t.doesExist()) {
final ISendBank sendBank = t.getSendBank();
d.setCell(0, i, StringUtils.shortenAndFixASCII(this.sendIndex < sendBank.getPageSize() ? sendBank.getItem(this.sendIndex).getName(6) : "", 6));
} else
d.clearCell(0, i);
}
d.done(0);
return true;
}
use of de.mossgrabers.framework.controller.display.ITextDisplay in project DrivenByMoss by git-moss.
the class AbstractTrackMode method drawTrackHeader.
protected boolean drawTrackHeader() {
final ITrackBank tb = this.getTrackBank();
final int extenderOffset = this.getExtenderOffset();
final ITextDisplay d = this.surface.getTextDisplay().clear();
// Format track names
for (int i = 0; i < 8; i++) {
final ITrack t = tb.getItem(extenderOffset + i);
d.setCell(0, i, StringUtils.shortenAndFixASCII(t.getName(), 6));
}
d.done(0);
return true;
}
use of de.mossgrabers.framework.controller.display.ITextDisplay in project DrivenByMoss by git-moss.
the class PanMode method drawTrackHeader.
/**
* {@inheritDoc}
*/
@Override
protected boolean drawTrackHeader() {
if (!super.drawTrackHeader())
return false;
if (this.surface.getConfiguration().isDisplayTrackNames())
return true;
final ITrackBank tb = this.getTrackBank();
final ITextDisplay d = this.surface.getTextDisplay();
final int extenderOffset = this.getExtenderOffset();
for (int i = 0; i < 8; i++) {
if (tb.getItem(extenderOffset + i).doesExist())
d.setCell(0, i, "Pan");
else
d.clearCell(0, i);
}
d.done(0);
return true;
}
use of de.mossgrabers.framework.controller.display.ITextDisplay 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 ITextDisplay d = this.surface.getTextDisplay();
final ITrackBank tb = this.getTrackBank();
final int extenderOffset = this.getExtenderOffset();
for (int i = 0; i < 8; i++) {
final ITrack t = tb.getItem(extenderOffset + i);
d.setCell(1, i, t.getPanStr(6));
}
d.done(1);
}
Aggregations