use of de.mossgrabers.framework.view.ViewManager in project DrivenByMoss by git-moss.
the class NoteViewSelectMode method updateFirstRow.
/**
* {@inheritDoc}
*/
@Override
public void updateFirstRow() {
final ColorManager colorManager = this.model.getColorManager();
final ViewManager viewManager = this.surface.getViewManager();
for (int i = 0; i < 8; i++) this.surface.updateButton(20 + i, colorManager.getColor(VIEWS[i] == null ? AbstractMode.BUTTON_COLOR_OFF : viewManager.isActiveView(VIEWS[i]) ? AbstractMode.BUTTON_COLOR_HI : AbstractMode.BUTTON_COLOR_ON));
}
use of de.mossgrabers.framework.view.ViewManager in project DrivenByMoss by git-moss.
the class NoteViewSelectMode method updateSecondRow.
/**
* {@inheritDoc}
*/
@Override
public void updateSecondRow() {
final ColorManager colorManager = this.model.getColorManager();
final ViewManager viewManager = this.surface.getViewManager();
for (int i = 0; i < 8; i++) this.surface.updateButton(102 + i, colorManager.getColor(VIEWS_TOP[i] == null ? AbstractMode.BUTTON_COLOR_OFF : viewManager.isActiveView(VIEWS_TOP[i]) ? AbstractMode.BUTTON_COLOR_HI : AbstractMode.BUTTON_COLOR_ON));
}
use of de.mossgrabers.framework.view.ViewManager in project DrivenByMoss by git-moss.
the class NoteViewSelectMode method updateDisplay1.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay1() {
final Display d = this.surface.getDisplay();
final ViewManager viewManager = this.surface.getViewManager();
d.clear().setBlock(1, 0, "Note view:");
for (int i = 0; i < VIEWS.length; i++) {
if (VIEWS[i] != null) {
final View view = viewManager.getView(VIEWS[i]);
d.setCell(3, i, view == null ? "" : (viewManager.isActiveView(VIEWS[i]) ? PushDisplay.RIGHT_ARROW : "") + view.getName());
}
if (VIEWS_TOP[i] != null)
d.setCell(0, i, (viewManager.isActiveView(VIEWS_TOP[i]) ? PushDisplay.RIGHT_ARROW : "") + viewManager.getView(VIEWS_TOP[i]).getName());
}
d.allDone();
}
use of de.mossgrabers.framework.view.ViewManager in project DrivenByMoss by git-moss.
the class SessionViewSelectMode method updateDisplay2.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay2() {
final ViewManager viewManager = this.surface.getViewManager();
final PushDisplay display = (PushDisplay) this.surface.getDisplay();
final DisplayMessage message = display.createMessage();
for (int i = 0; i < VIEWS.length; i++) {
final boolean isMenuBottomSelected = VIEWS[i] != null && this.isSelected(viewManager, i);
message.addOptionElement("", "", false, i == 0 ? "Session view" : "", VIEW_NAMES[i], isMenuBottomSelected, false);
}
display.send(message);
}
use of de.mossgrabers.framework.view.ViewManager in project DrivenByMoss by git-moss.
the class SessionViewSelectMode method activateView.
private void activateView(final Integer viewID) {
if (viewID == null)
return;
final ViewManager viewManager = this.surface.getViewManager();
viewManager.setActiveView(viewID);
this.surface.getModeManager().restoreMode();
}
Aggregations