本文整理汇总了Java中com.github.naoghuman.lib.preferences.api.PreferencesFacade类的典型用法代码示例。如果您正苦于以下问题:Java PreferencesFacade类的具体用法?Java PreferencesFacade怎么用?Java PreferencesFacade使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PreferencesFacade类属于com.github.naoghuman.lib.preferences.api包,在下文中一共展示了PreferencesFacade类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import com.github.naoghuman.lib.preferences.api.PreferencesFacade; //导入依赖的package包/类
@Override
public void init() throws Exception {
super.init();
PropertiesFacade.getDefault().register(KEY__APPLICATION__RESOURCE_BUNDLE);
PropertiesFacade.getDefault().register(ITemplateConfiguration.KEY__TEMPLATE__RESOURCE_BUNDLE);
final char borderSign = this.getProperty(KEY__APPLICATION__BORDER_SIGN).charAt(0);
final String message = this.getProperty(KEY__APPLICATION__MESSAGE_START);
final String title = this.getProperty(KEY__APPLICATION__TITLE) + this.getProperty(KEY__APPLICATION__VERSION);
LoggerFacade.getDefault().message(borderSign, 80, String.format(message, title));
final Boolean dropPreferencesFileAtStart = Boolean.FALSE;
PreferencesFacade.getDefault().init(dropPreferencesFileAtStart);
TemplateLoader.loadResourcesInCache();
DatabaseFacade.getDefault().register(this.getProperty(KEY__APPLICATION__DATABASE));
}
示例2: init
import com.github.naoghuman.lib.preferences.api.PreferencesFacade; //导入依赖的package包/类
@Override
public void init() throws Exception {
super.init();
PropertiesFacade.INSTANCE.register(KEY__APPLICATION__RESOURCE_BUNDLE);
final char borderSign = this.getProperty(KEY__APPLICATION__BORDER_SIGN).charAt(0);
final String message = this.getProperty(KEY__APPLICATION__MESSAGE_START);
final String title = this.getProperty(KEY__APPLICATION__TITLE);
LoggerFacade.INSTANCE.message(borderSign, 80, String.format(message, title));
final Boolean dropPreferencesFileAtStart = Boolean.FALSE;
PreferencesFacade.INSTANCE.init(dropPreferencesFileAtStart);
DatabaseFacade.INSTANCE.register(this.getProperty(KEY__APPLICATION__DATABASE));
}
示例3: init
import com.github.naoghuman.lib.preferences.api.PreferencesFacade; //导入依赖的package包/类
@Override
public void init() throws Exception {
super.init();
PropertiesFacade.getDefault().register(KEY__APPLICATION__RESOURCE_BUNDLE);
final char borderSign = this.getProperty(KEY__APPLICATION__BORDER_SIGN).charAt(0);
final String message = this.getProperty(KEY__APPLICATION__MESSAGE_START);
final String title = this.getProperty(KEY__APPLICATION__TITLE) + this.getProperty(KEY__APPLICATION__VERSION);
LoggerFacade.getDefault().message(borderSign, 80, String.format(message, title));
final Boolean dropPreferencesFileAtStart = Boolean.FALSE;
PreferencesFacade.getDefault().init(dropPreferencesFileAtStart);
DatabaseFacade.getDefault().register(this.getProperty(KEY__APPLICATION__DATABASE));
}
示例4: init
import com.github.naoghuman.lib.preferences.api.PreferencesFacade; //导入依赖的package包/类
@Override
public void init() throws Exception {
super.init();
PropertiesFacade.INSTANCE.register(KEY__APPLICATION__RESOURCE_BUNDLE);
final char borderSign = this.getProperty(KEY__APPLICATION__BORDER_SIGN).charAt(0);
final String message = this.getProperty(KEY__APPLICATION__MESSAGE_START);
final String title = this.getProperty(KEY__APPLICATION__TITLE) + this.getProperty(KEY__APPLICATION__VERSION);
LoggerFacade.INSTANCE.message(borderSign, 80, String.format(message, title));
final Boolean dropPreferencesFileAtStart = Boolean.FALSE;
PreferencesFacade.INSTANCE.init(dropPreferencesFileAtStart);
DatabaseFacade.INSTANCE.register(this.getProperty(KEY__APPLICATION__DATABASE));
}
示例5: init
import com.github.naoghuman.lib.preferences.api.PreferencesFacade; //导入依赖的package包/类
@Override
public void init() throws Exception {
super.init();
PropertiesFacade.getDefault().register(KEY__APPLICATION__RESOURCE_BUNDLE);
PropertiesFacade.getDefault().register(IBackgroundConfiguration.KEY__BACKGROUND_IMAGE__RESOURCE_BUNDLE);
final char borderSign = this.getProperty(KEY__APPLICATION__BORDER_SIGN).charAt(0);
final String message = this.getProperty(KEY__APPLICATION__MESSAGE_START);
final String title = this.getProperty(KEY__APPLICATION__TITLE) + this.getProperty(KEY__APPLICATION__VERSION);
LoggerFacade.getDefault().message(borderSign, 80, String.format(message, title));
final Boolean dropPreferencesFileAtStart = Boolean.FALSE;
PreferencesFacade.getDefault().init(dropPreferencesFileAtStart);
DatabaseFacade.getDefault().register(this.getProperty(KEY__APPLICATION__DATABASE));
}
示例6: init
import com.github.naoghuman.lib.preferences.api.PreferencesFacade; //导入依赖的package包/类
@Override
public void init() throws Exception {
super.init();
PropertiesFacade.INSTANCE.register(KEY__APPLICATION__RESOURCE_BUNDLE);
PropertiesFacade.INSTANCE.register(IBackgroundConfiguration.KEY__BACKGROUND__RESOURCE_BUNDLE);
PropertiesFacade.INSTANCE.register(IOverlayConfiguration.KEY__OVERLAY__RESOURCE_BUNDLE);
final char borderSign = this.getProperty(KEY__APPLICATION__BORDER_SIGN).charAt(0);
final String message = this.getProperty(KEY__APPLICATION__MESSAGE_START);
final String title = this.getProperty(KEY__APPLICATION__TITLE) + this.getProperty(KEY__APPLICATION__VERSION);
LoggerFacade.INSTANCE.message(borderSign, 80, String.format(message, title));
final Boolean dropPreferencesFileAtStart = Boolean.FALSE;
PreferencesFacade.INSTANCE.init(dropPreferencesFileAtStart);
DatabaseFacade.INSTANCE.register(this.getProperty(KEY__APPLICATION__DATABASE));
}
示例7: init
import com.github.naoghuman.lib.preferences.api.PreferencesFacade; //导入依赖的package包/类
@Override
public void init() throws Exception {
super.init();
PropertiesFacade.INSTANCE.register(KEY__RESOURCE_BUNDLE__APPLICATION);
PropertiesFacade.INSTANCE.register(IImageConfiguration.KEY__RESOURCE_BUNDLE__IMAGE);
PropertiesFacade.INSTANCE.register(IVideoConfiguration.KEY__RESOURCE_BUNDLE__VIDEO);
final char borderSign = this.getProperty(KEY__APPLICATION__BORDER_SIGN).charAt(0);
final String message = this.getProperty(KEY__APPLICATION__MESSAGE_START);
final String title = this.getProperty(KEY__APPLICATION__TITLE) + this.getProperty(KEY__APPLICATION__VERSION);
LoggerFacade.INSTANCE.message(borderSign, 80, String.format(message, title));
final Boolean dropPreferencesFileAtStart = Boolean.FALSE;
PreferencesFacade.INSTANCE.init(dropPreferencesFileAtStart);
}
示例8: initializePreferences
import com.github.naoghuman.lib.preferences.api.PreferencesFacade; //导入依赖的package包/类
private void initializePreferences() {
LoggerFacade.INSTANCE.info(this.getClass(), "Initialize Preferences"); // NOI18N
// GameView is initialize
PreferencesFacade.INSTANCE.putBoolean(
IGameConfiguration.PROP__GAMEVIEW_IS_INITIALZE,
Boolean.TRUE);
// Listen in GameView on KeyEvents
PreferencesFacade.INSTANCE.putBoolean(
IGameConfiguration.PROP__KEY_RELEASED__FOR_GAMEVIEW,
Boolean.TRUE);
}
示例9: evaluateIsMapFinish
import com.github.naoghuman.lib.preferences.api.PreferencesFacade; //导入依赖的package包/类
private void evaluateIsMapFinish(boolean isMapFinish) {
LoggerFacade.INSTANCE.debug(this.getClass(), "Evaluate is Map finish"); // NOI18N
// Keep going :)
if (!isMapFinish) {
return;
}
// Map is finish !!
System.out.println("---------------------> map is finish :))");
// no movement
// keyevents=false
// map-level += 1
final int actualMap = PreferencesFacade.INSTANCE.getInt(
IMapConfiguration.PROP__ACTUAL_MAP,
IMapConfiguration.PROP__ACTUAL_MAP__DEFAULT_VALUE);
PreferencesFacade.INSTANCE.putInt(
IMapConfiguration.PROP__ACTUAL_MAP,
actualMap + 1);
// play animation
// load next map
this.loadActualMap();
this.displayMap();
// keyevents= true
}
示例10: loadActualMap
import com.github.naoghuman.lib.preferences.api.PreferencesFacade; //导入依赖的package包/类
private void loadActualMap() {
LoggerFacade.INSTANCE.debug(this.getClass(), "Load actual Map"); // NOI18N
final int actualMap = PreferencesFacade.INSTANCE.getInt(
IMapConfiguration.PROP__ACTUAL_MAP,
IMapConfiguration.PROP__ACTUAL_MAP__DEFAULT_VALUE);
actualMapModel = MapFacade.INSTANCE.loadMap(actualMap);
}
示例11: initializePreferences
import com.github.naoghuman.lib.preferences.api.PreferencesFacade; //导入依赖的package包/类
private void initializePreferences() {
LoggerFacade.INSTANCE.info(this.getClass(), "Initialize Preferences"); // NOI18N
// Listen in GameView on KeyEvents
PreferencesFacade.INSTANCE.putBoolean(
IPreviewConfiguration.PROP__KEY_RELEASED__FOR_PREVIEW,
Boolean.TRUE);
}
示例12: registerOnActionChangeToGameView
import com.github.naoghuman.lib.preferences.api.PreferencesFacade; //导入依赖的package包/类
private void registerOnActionChangeToGameView() {
LoggerFacade.INSTANCE.debug(this.getClass(), "Register on action change to GameView"); // NOI18N
ActionFacade.INSTANCE.register(
ON_ACTION__CHANGE_TO_GAMEVIEW,
(ActionEvent event) -> {
PreferencesFacade.INSTANCE.putBoolean(
IPreviewConfiguration.PROP__KEY_RELEASED__FOR_PREVIEW,
Boolean.FALSE);
this.onActionChangeToGameView();
}
);
}
示例13: showBackgroundVideo
import com.github.naoghuman.lib.preferences.api.PreferencesFacade; //导入依赖的package包/类
private void showBackgroundVideo() {
final int videoIndex = PreferencesFacade.INSTANCE.getInt(
IVideoConfiguration.PROP__CHOOSEN_VIDEO,
IVideoConfiguration.PROP__CHOOSEN_VIDEO__DEFAULT_VALUE);
mediaPlayer = ResourcesFacade.getDefault().getVideoLoader().loadVideo(videoIndex);
mediaPlayer.setOnReady(() -> {
mediaPlayer.play();
});
mediaView.setMediaPlayer(mediaPlayer);
mediaView.setFitWidth(1280.0d);
mediaView.setFitHeight(720.0d);
}
示例14: onCloseRequest
import com.github.naoghuman.lib.preferences.api.PreferencesFacade; //导入依赖的package包/类
private void onCloseRequest() {
// Cleanup for next start
PreferencesFacade.INSTANCE.putBoolean(
IGameConfiguration.PROP__GAMEVIEW_IS_INITIALZE,
Boolean.FALSE);
PreferencesFacade.INSTANCE.putBoolean(
IGameConfiguration.PROP__KEY_RELEASED__FOR_GAMEVIEW,
Boolean.FALSE);
PreferencesFacade.INSTANCE.putBoolean(
IMainMenuConfiguration.PROP__MAIN_MENU_IS_SHOWN,
Boolean.FALSE);
// afterburner.fx
Injector.forgetAll();
// Message
final char borderSign = this.getProperty(KEY__APPLICATION__BORDER_SIGN).charAt(0);
final String message = this.getProperty(KEY__APPLICATION__MESSAGE_STOP);
final String title = this.getProperty(KEY__APPLICATION__TITLE) + this.getProperty(KEY__APPLICATION__VERSION);
LoggerFacade.INSTANCE.message(borderSign, 80, String.format(message, title));
// Timer
final PauseTransition pt = new PauseTransition(DURATION__125);
pt.setOnFinished((ActionEvent event) -> {
Platform.exit();
});
pt.playFromStart();
}
示例15: onActionShowMainMenu
import com.github.naoghuman.lib.preferences.api.PreferencesFacade; //导入依赖的package包/类
public void onActionShowMainMenu() {
LoggerFacade.INSTANCE.debug(this.getClass(), "On action show MainMenu"); // NOI18N
// Dont listen in Preview and GameView on KeyEvents
PreferencesFacade.INSTANCE.putBoolean(
IGameConfiguration.PROP__KEY_RELEASED__FOR_GAMEVIEW,
IGameConfiguration.PROP__KEY_RELEASED__FOR_GAMEVIEW__DEFAULT_VALUE);
PreferencesFacade.INSTANCE.putBoolean(
IPreviewConfiguration.PROP__KEY_RELEASED__FOR_PREVIEW,
Boolean.FALSE);
// MainMenuView is shown
PreferencesFacade.INSTANCE.putBoolean(
IMainMenuConfiguration.PROP__MAIN_MENU_IS_SHOWN,
Boolean.TRUE);
// Button
lMenuButton.setDisable(Boolean.TRUE);
// HiddenLayer
apHiddenLayer.setOpacity(0.0d);
apHiddenLayer.setVisible(Boolean.TRUE);
apHiddenLayer.setManaged(Boolean.TRUE);
final FadeTransition ftShowHiddenLayer = new FadeTransition();
ftShowHiddenLayer.setDelay(Duration.millis(125.0d));
ftShowHiddenLayer.setDuration(Duration.millis(250.0d));
ftShowHiddenLayer.setFromValue(0.0d);
ftShowHiddenLayer.setToValue(1.0d);
ftShowHiddenLayer.setNode(apHiddenLayer);
// Init MainMenuView
final MainMenuView mainMenuView = new MainMenuView();
final Parent menu = mainMenuView.getView();
menu.setOpacity(0.0d);
bpMenuArea.setCenter(null);
bpMenuArea.setCenter(menu);
final FadeTransition ftShowMenuView = new FadeTransition();
ftShowMenuView.setDelay(Duration.millis(200.0d));
ftShowMenuView.setDuration(Duration.millis(375.0d));
ftShowMenuView.setFromValue(0.0d);
ftShowMenuView.setToValue(1.0d);
ftShowMenuView.setNode(menu);
ftShowMenuView.setOnFinished((ActionEvent event) -> {
bpMenuArea.setMouseTransparent(Boolean.FALSE);
if (this.hasMediaPlayerFollowing(MediaPlayer.Status.PLAYING)) {
mediaPlayer.pause();
}
ActionFacade.INSTANCE.handle(ON_ACTION__MANAGED_MAP_PLAYER);
});
// Move menu
final TranslateTransition translateTransition = new TranslateTransition();
translateTransition.setDelay(Duration.millis(200.0d));
translateTransition.setDuration(Duration.millis(375.0d));
translateTransition.setFromX(300.0d);
translateTransition.setToX(0.0d);
translateTransition.setNode(menu);
// Animate
final ParallelTransition pt = new ParallelTransition();
pt.getChildren().addAll(ftShowHiddenLayer, ftShowMenuView, translateTransition);
pt.playFromStart();
}