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();
}
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);
}
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);
}
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);
}
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();
}
Aggregations