當前位置: 首頁>>代碼示例>>Java>>正文


Java Localization.get方法代碼示例

本文整理匯總了Java中ethanjones.cubes.core.localization.Localization.get方法的典型用法代碼示例。如果您正苦於以下問題:Java Localization.get方法的具體用法?Java Localization.get怎麽用?Java Localization.get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ethanjones.cubes.core.localization.Localization的用法示例。


在下文中一共展示了Localization.get方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: ServerSetupMenu

import ethanjones.cubes.core.localization.Localization; //導入方法依賴的package包/類
public ServerSetupMenu(final Save save) {
  super();
  title = new Label(Localization.get("menu.server.title"), skin.get("title", Label.LabelStyle.class));
  saveLabel = new Label(Localization.get("menu.server.save", save.name), skin);
  saveLabel.setAlignment(Align.center);
  port = new TextField("", skin);
  port.setMessageText(Localization.get("menu.server.port", Settings.getIntegerSettingValue(Settings.NETWORKING_PORT)));
  port.setTextFieldFilter(new TextField.TextFieldFilter.DigitsOnlyFilter());
  start = new TextButton(Localization.get("menu.server.start"), skin);
  back = MenuTools.getBackButton(this);

  start.addListener(new ChangeListener() {
    @Override
    public void changed(ChangeEvent event, Actor actor) {
      int p = port.getText().isEmpty() ? Settings.getIntegerSettingValue(Settings.NETWORKING_PORT) : Integer.parseInt(port.getText());
      Adapter.setMenu(new ServerRunningMenu(save, p));
    }
  });

  stage.addActor(title);
  stage.addActor(saveLabel);
  stage.addActor(port);
  stage.addActor(start);
  stage.addActor(back);
}
 
開發者ID:RedTroop,項目名稱:Cubes,代碼行數:26,代碼來源:ServerSetupMenu.java

示例2: SingleplayerSaveDeleteMenu

import ethanjones.cubes.core.localization.Localization; //導入方法依賴的package包/類
public SingleplayerSaveDeleteMenu(final Save save) {
	title = new Label(Localization.get("menu.singleplayer.delete.title"),
			skin.get("title", Label.LabelStyle.class));
	text = new Label(Localization.get("menu.singleplayer.delete.text", save.name), skin);
	delete = new TextButton(Localization.get("menu.singleplayer.delete.delete", save.name), skin);
	back = MenuTools.getBackButton(this);

	text.setAlignment(Align.center);

	delete.addListener(new ChangeListener() {
		@Override
		public void changed(ChangeEvent event, Actor actor) {
			ClientSaveManager.deleteSave(save);
			Menu prev = MenuManager.getPrevious(SingleplayerSaveDeleteMenu.this);
			if (!(prev instanceof SingleplayerSavesMenu))
				return;
			((SingleplayerSavesMenu) prev).updateSavesList();
			Adapter.setMenu(prev);
		}
	});

	stage.addActor(title);
	stage.addActor(text);
	stage.addActor(delete);
	stage.addActor(back);
}
 
開發者ID:RedTroop,項目名稱:Cubes_2,代碼行數:27,代碼來源:SingleplayerSaveDeleteMenu.java

示例3: SingleplayerSaveDeleteMenu

import ethanjones.cubes.core.localization.Localization; //導入方法依賴的package包/類
public SingleplayerSaveDeleteMenu(final Save save) {
  title = new Label(Localization.get("menu.singleplayer.delete.title"), skin.get("title", Label.LabelStyle.class));
  text = new Label(Localization.get("menu.singleplayer.delete.text", save.name), skin);
  delete = new TextButton(Localization.get("menu.singleplayer.delete.delete", save.name), skin);
  back = MenuTools.getBackButton(this);

  text.setAlignment(Align.center);

  delete.addListener(new ChangeListener() {
    @Override
    public void changed(ChangeEvent event, Actor actor) {
      ClientSaveManager.deleteSave(save);
      Menu prev = MenuManager.getPrevious(SingleplayerSaveDeleteMenu.this);
      if (!(prev instanceof SingleplayerSavesMenu)) return;
      ((SingleplayerSavesMenu) prev).updateSavesList();
      Adapter.setMenu(prev);
    }
  });

  stage.addActor(title);
  stage.addActor(text);
  stage.addActor(delete);
  stage.addActor(back);
}
 
開發者ID:RedTroop,項目名稱:Cubes,代碼行數:25,代碼來源:SingleplayerSaveDeleteMenu.java

示例4: getName

import ethanjones.cubes.core.localization.Localization; //導入方法依賴的package包/類
public static String getName(String id) {
	return Localization.get("terrain." + id.replaceFirst(":", "."));
}
 
開發者ID:RedTroop,項目名稱:Cubes_2,代碼行數:4,代碼來源:GeneratorManager.java

示例5: toString

import ethanjones.cubes.core.localization.Localization; //導入方法依賴的package包/類
@Override
public String toString() {
  return Localization.get("command.common.value.coordinate.string");
}
 
開發者ID:RedTroop,項目名稱:Cubes,代碼行數:5,代碼來源:CommandValue.java

示例6: ClientErrorMenu

import ethanjones.cubes.core.localization.Localization; //導入方法依賴的package包/類
public ClientErrorMenu(String message) {
  super(Localization.get(message), Localization.get("menu.general.return_main_menu"));
}
 
開發者ID:RedTroop,項目名稱:Cubes,代碼行數:4,代碼來源:ClientErrorMenu.java

示例7: SingleplayerLoadingMenu

import ethanjones.cubes.core.localization.Localization; //導入方法依賴的package包/類
public SingleplayerLoadingMenu(Save save) {
	super(Localization.get("menu.general.loading"), false);
	this.save = save;
}
 
開發者ID:RedTroop,項目名稱:Cubes_2,代碼行數:5,代碼來源:SingleplayerLoadingMenu.java

示例8: getDisplayName

import ethanjones.cubes.core.localization.Localization; //導入方法依賴的package包/類
public String getDisplayName() {
  return Localization.get("inventory." + name.replaceFirst(":", "."));
}
 
開發者ID:RedTroop,項目名稱:Cubes,代碼行數:4,代碼來源:Inventory.java

示例9: ClientErrorMenu

import ethanjones.cubes.core.localization.Localization; //導入方法依賴的package包/類
public ClientErrorMenu(String message, Exception e) {
  super(Localization.get(message) + getString(e), Localization.get("menu.general.return_main_menu"));
}
 
開發者ID:RedTroop,項目名稱:Cubes_2,代碼行數:4,代碼來源:ClientErrorMenu.java

示例10: SingleplayerLoadingMenu

import ethanjones.cubes.core.localization.Localization; //導入方法依賴的package包/類
public SingleplayerLoadingMenu(Save save) {
  super(Localization.get("menu.general.loading"), false);
  this.save = save;
}
 
開發者ID:RedTroop,項目名稱:Cubes,代碼行數:5,代碼來源:SingleplayerLoadingMenu.java

示例11: getDisplayName

import ethanjones.cubes.core.localization.Localization; //導入方法依賴的package包/類
public String getDisplayName() {
	return Localization.get("inventory." + name.replaceFirst(":", "."));
}
 
開發者ID:RedTroop,項目名稱:Cubes_2,代碼行數:4,代碼來源:Inventory.java

示例12: MultiplayerLoadingMenu

import ethanjones.cubes.core.localization.Localization; //導入方法依賴的package包/類
public MultiplayerLoadingMenu(String address, int port) {
  super(Localization.get("menu.multiplayer.connecting"), false);
  this.address = address;
  this.port = port;
}
 
開發者ID:RedTroop,項目名稱:Cubes,代碼行數:6,代碼來源:MultiplayerLoadingMenu.java

示例13: WorldLoadingMenu

import ethanjones.cubes.core.localization.Localization; //導入方法依賴的package包/類
public WorldLoadingMenu() {
  super(Localization.get("menu.general.loading"), false);

  progressBar = new ProgressBar(0f, 1f, 0.001f, false, PROGRESS_BAR_STYLE);
  stage.addActor(progressBar);
}
 
開發者ID:RedTroop,項目名稱:Cubes,代碼行數:7,代碼來源:WorldLoadingMenu.java

示例14: toString

import ethanjones.cubes.core.localization.Localization; //導入方法依賴的package包/類
@Override
public String toString() {
	return Localization.get("command.common.value.command.string");
}
 
開發者ID:RedTroop,項目名稱:Cubes_2,代碼行數:5,代碼來源:CommandValue.java

示例15: RunnableMenu

import ethanjones.cubes.core.localization.Localization; //導入方法依賴的package包/類
public RunnableMenu(Runnable runnable) {
  super(Localization.get("menu.general.waiting"), false);
  this.runnable = runnable;
}
 
開發者ID:RedTroop,項目名稱:Cubes,代碼行數:5,代碼來源:RunnableMenu.java


注:本文中的ethanjones.cubes.core.localization.Localization.get方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。