final BeanPathAdapter<RemoteNode> remoteNodePA) {
validationFactory = Validation.buildDefaultValidatorFactory();
setId("control-bar");
this.actorPA = actorPA;
this.remoteNodePA = remoteNodePA;
final DropShadow settingsDS = new DropShadow();
this.settingsSetTimeline = GuiUtil.createShadowColorIndicatorTimeline(
settingsDS, ATTENTION_COLOR, Color.BLACK, Timeline.INDEFINITE);
// help view
final InnerShadow helpTextEffect = new InnerShadow();
helpTextEffect.setRadius(10d);
final Timeline helpTextTimeline = GuiUtil.createShadowColorIndicatorTimeline(
helpTextEffect, ATTENTION_COLOR, Color.BLACK.brighter(),
HELP_TEXT_COLOR_CHANGE_CYCLE_COUNT);
helpTextPane = new ScrollPane();
helpTextPane.getStyleClass().add("text-area-help");
//helpTextPane.setPrefHeight(40d);
helpTextPane.setPrefWidth(300d);
helpTextPane.setEffect(helpTextEffect);
helpText = new Label(RS.rbLabel(UGateUtil.HELP_TEXT_DEFAULT_KEY));
helpText.setWrapText(true);
helpText.setPrefWidth(helpTextPane.getPrefWidth() - 35d);
helpText.textProperty().addListener(new ChangeListener<String>() {
@Override
public void changed(ObservableValue<? extends String> observable, String oldValue,
String newValue) {
helpTextTimeline.stop();
if (newValue != null && newValue.length() > 0 &&
!newValue.equals(RS.rbLabel(UGateUtil.HELP_TEXT_DEFAULT_KEY))) {
helpTextTimeline.play();
}
}
});
helpTextPane.setContent(helpText);
defaultUserImg = RS.imgView(RS.IMG_LOCK);
defaultUserImg.setCursor(Cursor.HAND);
defaultUserImg.addEventHandler(MouseEvent.MOUSE_PRESSED, new EventHandler<MouseEvent>() {
@Override
public void handle(final MouseEvent event) {
if (GuiUtil.isPrimaryPress(event)) {
setDefaultActor(defaultUserImg.getImage() == RS
.img(RS.IMG_LOCK) ? true : false, true);
}
}
});
addHelpTextTrigger(defaultUserImg, RS.rbLabel(KEY.APP_DIALOG_DEFAULT_USER));
cnctStatusWireless = new StatusIcon(RS.imgView(RS.IMG_WIRELESS_ICON,
CONNECTION_STATUS_SIZE, CONNECTION_STATUS_SIZE, true, true), GuiUtil.COLOR_OFF);
addServiceBehavior(cnctStatusWireless, null, ServiceProvider.Type.WIRELESS, KEY.WIRELESS_CONNECT_DESC);
cnctStatusWeb = new StatusIcon(RS.imgView(RS.IMG_WEB_ICON,
CONNECTION_STATUS_SIZE, CONNECTION_STATUS_SIZE, true, true), GuiUtil.COLOR_OFF);
addServiceBehavior(cnctStatusWeb, null, ServiceProvider.Type.WEB, KEY.WIRELESS_WEB_START_STOP_DESC);
cnctStatusEmail = new StatusIcon(RS.imgView(RS.IMG_EMAIL_ICON, CONNECTION_STATUS_SIZE,
CONNECTION_STATUS_SIZE, true, true), GuiUtil.COLOR_OFF);
addServiceBehavior(cnctStatusEmail, null, ServiceProvider.Type.EMAIL, KEY.MAIL_CONNECT_DESC);
// TODO : need to set camera resolution before calling Command.CAM_TAKE_PIC?
final DropShadow ds = new DropShadow();
final ImageView camTakeQvga = RS.imgView(RS.IMG_CAM_QVGA);
addServiceBehavior(camTakeQvga, Command.CAM_TAKE_PIC, null, KEY.CAM_ACTION_QVGA);
camTakeQvga.setEffect(ds);
final ImageView camTakeVga = RS.imgView(RS.IMG_CAM_VGA);
addServiceBehavior(camTakeVga, Command.CAM_TAKE_PIC, null, KEY.CAM_ACTION_VGA);