use of org.apache.openmeetings.web.room.OmRedirectTimerBehavior in project openmeetings by apache.
the class RoomMenuPanel method onInitialize.
@Override
protected void onInitialize() {
exitMenuItem = new RoomMenuItem(getString("308"), getString("309"), "room menu exit") {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
exit(target);
}
};
filesMenu = new RoomMenuItem(getString("245"), null, false);
actionsSubMenu.init();
pollsSubMenu.init();
add((menuPanel = new MenuPanel("menu", getMenu())).setVisible(isVisible()));
add(askBtn.add(AttributeModifier.replace(ATTR_TITLE, getString("84"))));
Label demo = new Label("demo", Model.of(""));
Room r = room.getRoom();
add(demo.setVisible(r.isDemoRoom() && r.getDemoTime() != null && room.getRoom().getDemoTime().intValue() > 0));
if (demo.isVisible()) {
demo.add(new OmRedirectTimerBehavior(room.getRoom().getDemoTime().intValue(), "637") {
private static final long serialVersionUID = 1L;
@Override
protected void onTimer(int remain) {
getComponent().add(AttributeModifier.replace(ATTR_TITLE, getText("639", remain)));
}
@Override
protected void onFinish(AjaxRequestTarget target) {
exit(target);
}
});
}
super.onInitialize();
}
Aggregations