use of de.mossgrabers.framework.controller.display.Display in project DrivenByMoss by git-moss.
the class PanMode method updateDisplay1.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay1() {
final Display d = this.surface.getDisplay();
final IChannelBank tb = this.model.getCurrentTrackBank();
for (int i = 0; i < 8; i++) {
final ITrack t = tb.getTrack(i);
d.setCell(0, i, t.doesExist() ? "Pan" : "").setCell(1, i, t.getPanStr(8));
if (t.doesExist())
d.setCell(2, i, t.getPan(), Format.FORMAT_PAN);
else
d.clearCell(2, i);
}
d.done(0).done(1).done(2);
this.drawRow4();
}
use of de.mossgrabers.framework.controller.display.Display in project DrivenByMoss by git-moss.
the class TrackDetailsMode method updateDisplay1.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay1() {
final Display d = this.surface.getDisplay();
final ITrack deviceChain = this.getSelectedTrack();
if (deviceChain == null)
d.setRow(1, " Please selecta track... ").clearRow(0).clearRow(2).done(0).done(2);
else {
d.clearRow(0).clearRow(1).setBlock(0, 0, "Track: " + deviceChain.getName());
d.setCell(2, 0, "Active").setCell(3, 0, deviceChain.isActivated() ? "On" : "Off");
d.setCell(2, 1, "Rec Arm");
d.setCell(3, 1, deviceChain.isRecArm() ? "On" : "Off");
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, "Monitor");
d.setCell(3, 4, deviceChain.isMonitor() ? "On" : "Off");
d.setCell(2, 5, "Auto Monitor");
d.setCell(3, 5, deviceChain.isAutoMonitor() ? "On" : "Off");
final boolean hasPinning = this.model.getHost().hasPinning();
d.setCell(2, 6, hasPinning ? "Pin Trck" : "");
d.setCell(3, 6, hasPinning ? this.model.isCursorTrackPinned() ? "On" : "Off" : "");
d.setCell(2, 7, "Select").setCell(3, 7, "Color").done(0).done(1).done(2).done(3);
}
}
use of de.mossgrabers.framework.controller.display.Display in project DrivenByMoss by git-moss.
the class TrackTogglesMode method updateDisplay.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay() {
final ITrack t = this.model.getCurrentTrackBank().getSelectedTrack();
final Display d = this.surface.getDisplay();
if (t == null) {
d.setRow(0, " Please select a track... ").clearRow(2).done(2);
} else {
final ICursorDevice device = this.model.getCursorDevice();
d.setCell(0, 0, " Mute");
d.setCell(2, 0, t.isMute() ? " On" : " Off");
d.setCell(0, 1, " Solo");
d.setCell(2, 1, t.isSolo() ? " On" : " Off");
d.setCell(0, 2, "Rec Arm");
d.setCell(2, 2, t.isRecArm() ? " On" : " Off");
d.setCell(0, 3, " Write");
d.setCell(2, 3, this.model.getTransport().isWritingArrangerAutomation() ? " On" : " Off");
d.setCell(0, 4, " Browse");
d.setCell(2, 4, "");
d.setCell(0, 5, device.getName().length() > 0 ? device.getName().length() > 8 ? device.getName().substring(0, 8) : device.getName() : "None");
d.setCell(2, 5, device.isEnabled() ? "Enabled" : "Disabled");
d.setCell(0, 6, "<<Device").setCell(2, 6, "");
d.setCell(0, 7, "Device>>").setCell(2, 7, "").done(0).done(2);
}
}
use of de.mossgrabers.framework.controller.display.Display in project DrivenByMoss by git-moss.
the class ViewSelectMode method updateDisplay.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay() {
final Display d = this.surface.getDisplay();
final ViewManager viewManager = this.surface.getViewManager();
for (int i = 0; i < 2; i++) {
d.clearRow(0 + i).setBlock(0 + i, 0, "Select mode:").done(0 + i);
d.clearRow(2 + i);
d.setCell(2 + i, 0, (viewManager.isActiveView(Views.VIEW_CONTROL) ? SLDisplay.RIGHT_ARROW : " ") + "Control");
d.setCell(2 + i, 1, " " + (viewManager.isActiveView(Views.VIEW_PLAY) ? SLDisplay.RIGHT_ARROW : " ") + "Play");
d.done(2 + i);
}
}
use of de.mossgrabers.framework.controller.display.Display in project DrivenByMoss by git-moss.
the class VolumeMode method updateDisplay.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay() {
final Display d = this.surface.getDisplay();
final IMasterTrack masterTrack = this.model.getMasterTrack();
if (masterTrack.isSelected()) {
d.clear();
final String n = StringUtils.shortenAndFixASCII(masterTrack.getName(), 7);
d.setCell(1, 0, SLDisplay.RIGHT_ARROW + n).setCell(3, 0, masterTrack.getVolumeStr(8)).done(1).done(3);
return;
}
final IChannelBank tb = this.model.getCurrentTrackBank();
final ITrack selTrack = tb.getSelectedTrack();
final int selIndex = selTrack == null ? -1 : selTrack.getIndex();
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(1, i, isSel ? SLDisplay.RIGHT_ARROW + n : n).setCell(3, i, t.getVolumeStr(8));
}
d.done(1).done(3);
}
Aggregations