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


Java IconButton.setToolTip方法代碼示例

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


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

示例1: GuiVat

import com.enderio.core.client.gui.button.IconButton; //導入方法依賴的package包/類
public GuiVat(@Nonnull InventoryPlayer inventory, @Nonnull TileVat te) {
  super(te, new ContainerVat(inventory, te), GUI_TEXTURE);

  addToolTip(new GuiToolTip(RECTANGLE_INPUT_TANK, "") {

    @Override
    protected void updateText() {
      text.clear();
      text.add(Lang.GUI_VAT_ITANK.get());
      text.add(LangFluid.MB(getTileEntity().inputTank));
    }

  });

  addToolTip(new GuiToolTip(RECTANGLE_OUTPUT_TANK, "") {

    @Override
    protected void updateText() {
      text.clear();
      text.add(Lang.GUI_VAT_OTANK.get());
      text.add(LangFluid.MB(getTileEntity().outputTank));
    }

  });

  dump1 = new IconButton(this, 1, 29, 62, IconEIO.DUMP_LIQUID);
  dump1.setToolTip(Lang.GUI_VAT_DUMP.get());
  dump2 = new IconButton(this, 2, 131, 62, IconEIO.VOID_LIQUID);
  dump2.setToolTip(Lang.GUI_VAT_VOID.get());

  addProgressTooltip(81, 63, 14, 14);

  addDrawingElement(new PowerBar<>(te, this, 11, 11, 43));
}
 
開發者ID:SleepyTrousers,項目名稱:EnderIO,代碼行數:35,代碼來源:GuiVat.java

示例2: GuiSoulBinder

import com.enderio.core.client.gui.button.IconButton; //導入方法依賴的package包/類
public GuiSoulBinder(@Nonnull InventoryPlayer par1InventoryPlayer, @Nonnull TileSoulBinder te) {
  super(te, new ContainerSoulBinder(par1InventoryPlayer, te), "soul_fuser");
  usePlayerXP = new IconButton(this, PLAYER_XP_ID, 125, 57, IconEIO.XP);
  usePlayerXP.visible = false;
  usePlayerXP.setToolTip(Lang.GUI_SOUL_USEPLAYERXP.get());

  addProgressTooltip(80, 34, 24, 16);

  addDrawingElement(new PowerBar<>(te, this));
}
 
開發者ID:SleepyTrousers,項目名稱:EnderIO,代碼行數:11,代碼來源:GuiSoulBinder.java

示例3: ModItemFilterGui

import com.enderio.core.client.gui.button.IconButton; //導入方法依賴的package包/類
public ModItemFilterGui(@Nonnull GuiContainerBaseEIO gui, @Nonnull IItemFilterContainer filterContainer, boolean isInput) {
  this.gui = gui;
  this.isInput = isInput;
  this.filterContainer = filterContainer;

  if (isInput) {
    filter = (ModItemFilter) filterContainer.getItemFilter();
    inputOffsetX = 50;
    tfWidth = 96;
    tfTextureX = 120;
    tfTextureY = 214;
  } else {
    filter = (ModItemFilter) filterContainer.getItemFilter();
    inputOffsetX = 32;
    tfWidth = 114;
    tfTextureX = 120;
    tfTextureY = 238;
  }

  inputBounds = new Rectangle[] { new Rectangle(inputOffsetX, 47, 16, 16), new Rectangle(inputOffsetX, 68, 16, 16), new Rectangle(inputOffsetX, 89, 16, 16) };

  deleteButs = new IconButton[inputBounds.length];
  for (int i = 0; i < deleteButs.length; i++) {
    Rectangle r = inputBounds[i];
    IconButton but = new IconButton(gui, FilterGuiUtil.nextButtonId(), r.x + 19, r.y, IconEIO.MINUS);
    deleteButs[i] = but;
  }

  whiteListB = new IconButton(gui, -1, inputOffsetX - 19, 89, IconEIO.FILTER_WHITELIST);
  whiteListB.setToolTip(EnderIO.lang.localize("gui.conduit.item.whitelist"));
}
 
開發者ID:SleepyTrousers,項目名稱:EnderIO,代碼行數:32,代碼來源:ModItemFilterGui.java

示例4: SpeciesItemFilterGui

import com.enderio.core.client.gui.button.IconButton; //導入方法依賴的package包/類
public SpeciesItemFilterGui(@Nonnull GuiContainerBaseEIO gui, @Nonnull IItemFilterContainer filterContainer, boolean isStickyModeAvailable,
                            int xOffset, int yOffset,
                            int buttonIdOffset) {
  this.gui = gui;
  this.isStickyModeAvailable = isStickyModeAvailable;
  this.filterContainer = filterContainer;
  this.xOffset = xOffset;
  this.yOffset = yOffset;
  this.buttonIdOffset = buttonIdOffset;

  filter = (SpeciesItemFilter) filterContainer.getItemFilter();

  int butLeft = xOffset + 92;
  int x = butLeft;
  int y = yOffset + 1;
  whiteListB = new IconButton(gui, ID_WHITELIST + buttonIdOffset, x, y, IconEIO.FILTER_WHITELIST);
  whiteListB.setToolTip(EnderIO.lang.localize("gui.conduit.item.whitelist"));

  x += 20;
  stickyB = new ToggleButton(gui, ID_STICKY + buttonIdOffset, x, y, IconEIO.FILTER_STICKY_OFF, IconEIO.FILTER_STICKY);
  stickyB.setSelectedToolTip(EnderIO.lang.localizeList("gui.conduit.item.stickyEnabled"));
  stickyB.setUnselectedToolTip(EnderIO.lang.localize("gui.conduit.item.stickyDisbaled"));
  stickyB.setPaintSelectedBorder(false);

  y += 20;
  x = butLeft;

  speciesModeB = new CycleButton<SpeciesMode.IconHolder>(gui, ID_SPECIES_MODE + buttonIdOffset, x, y, SpeciesMode.IconHolder.class);
}
 
開發者ID:SleepyTrousers,項目名稱:EnderIO,代碼行數:30,代碼來源:SpeciesItemFilterGui.java

示例5: ExistingItemFilterGui

import com.enderio.core.client.gui.button.IconButton; //導入方法依賴的package包/類
public ExistingItemFilterGui(@Nonnull GuiContainerBaseEIO gui, @Nonnull IItemFilterContainer filterContainer, boolean isInput) {
  this.gui = gui;
  this.filterContainer = filterContainer;
  this.isInput = isInput;

  filter = (ExistingItemFilter) filterContainer.getItemFilter();

  int butLeft = 37;
  int x = butLeft;
  int y = 68;

  useMetaB = new ToggleButton(gui, ID_META, x, y, IconEIO.FILTER_META_OFF, IconEIO.FILTER_META);
  useMetaB.setSelectedToolTip(EnderIO.lang.localize("gui.conduit.item.matchMetaData"));
  useMetaB.setUnselectedToolTip(EnderIO.lang.localize("gui.conduit.item.ignoreMetaData"));
  useMetaB.setPaintSelectedBorder(false);

  x += 20;
  stickyB = new ToggleButton(gui, ID_STICKY, x, y, IconEIO.FILTER_STICKY_OFF, IconEIO.FILTER_STICKY);
  String[] lines = EnderIO.lang.localizeList("gui.conduit.item.stickyEnabled");
  stickyB.setSelectedToolTip(lines);
  stickyB.setUnselectedToolTip(EnderIO.lang.localize("gui.conduit.item.stickyDisbaled"));
  stickyB.setPaintSelectedBorder(false);

  y += 20;
  x = butLeft;

  x += 20;
  useNbtB = new ToggleButton(gui, ID_NBT, x, y, IconEIO.FILTER_NBT_OFF, IconEIO.FILTER_NBT);
  useNbtB.setSelectedToolTip(EnderIO.lang.localize("gui.conduit.item.matchNBT"));
  useNbtB.setUnselectedToolTip(EnderIO.lang.localize("gui.conduit.item.ignoreNBT"));
  useNbtB.setPaintSelectedBorder(false);

  x = butLeft;
  useOreDictB = new ToggleButton(gui, ID_ORE_DICT, x, y, IconEIO.FILTER_ORE_DICT_OFF, IconEIO.FILTER_ORE_DICT);
  useOreDictB.setSelectedToolTip(EnderIO.lang.localize("gui.conduit.item.oreDicEnabled"));
  useOreDictB.setUnselectedToolTip(EnderIO.lang.localize("gui.conduit.item.oreDicDisabled"));
  useOreDictB.setPaintSelectedBorder(false);

  snapshotB = new TooltipButton(gui, ID_SNAPSHOT, 80, 65, 60, 20, EnderIO.lang.localize("gui.conduit.button.snap"));
  mergeB = new GuiButton(ID_MERGE, 0, 0, 40, 20, EnderIO.lang.localize("gui.conduit.button.merge"));
  clearB = new GuiButton(ID_CLEAR, 0, 0, 60, 20, EnderIO.lang.localize("gui.conduit.button.clear"));
  showB = new GuiButton(ID_SHOW, 0, 0, 40, 20, EnderIO.lang.localize("gui.conduit.button.show"));

  snapshotB.setToolTip(EnderIO.lang.localizeList("gui.conduit.button.snap.tooltip"));

  x -= 20;
  whiteListB = new IconButton(gui, -1, x, y, IconEIO.FILTER_WHITELIST);
  whiteListB.setToolTip(EnderIO.lang.localize("gui.conduit.item.whitelist"));

  snapshotOverlay = new SnapshotOverlay();
  gui.addOverlay(snapshotOverlay);

}
 
開發者ID:SleepyTrousers,項目名稱:EnderIO,代碼行數:54,代碼來源:ExistingItemFilterGui.java

示例6: BasicItemFilterGui

import com.enderio.core.client.gui.button.IconButton; //導入方法依賴的package包/類
public BasicItemFilterGui(@Nonnull GuiContainerBaseEIO gui, @Nonnull IItemFilterContainer filterContainer, boolean isStickyModeAvailable,
    int xOffset, int yOffset,
    int buttonIdOffset) {
  this.gui = gui;
  this.isStickyModeAvailable = isStickyModeAvailable;
  this.filterContainer = filterContainer;
  this.xOffset = xOffset;
  this.yOffset = yOffset;
  this.buttonIdOffset = buttonIdOffset;

  filter = (ItemFilter) filterContainer.getItemFilter();
  
  isAdvanced = filter.isAdvanced();
  isLimited = filter.isLimited();
  
  int butLeft = xOffset + 92;
  int x = butLeft;
  int y = yOffset + 1;
  whiteListB = new IconButton(gui, ID_WHITELIST + buttonIdOffset, x, y, IconEIO.FILTER_WHITELIST);
  whiteListB.setToolTip(EnderIO.lang.localize("gui.conduit.item.whitelist"));

  x += 20;
  useMetaB = new ToggleButton(gui, ID_META + buttonIdOffset, x, y, IconEIO.FILTER_META_OFF, IconEIO.FILTER_META);
  useMetaB.setSelectedToolTip(EnderIO.lang.localize("gui.conduit.item.matchMetaData"));
  useMetaB.setUnselectedToolTip(EnderIO.lang.localize("gui.conduit.item.ignoreMetaData"));
  useMetaB.setPaintSelectedBorder(false);

  x += 20;
  stickyB = new ToggleButton(gui, ID_STICKY + buttonIdOffset, x, y, IconEIO.FILTER_STICKY_OFF, IconEIO.FILTER_STICKY);
  stickyB.setSelectedToolTip(EnderIO.lang.localizeList("gui.conduit.item.stickyEnabled"));
  stickyB.setUnselectedToolTip(EnderIO.lang.localize("gui.conduit.item.stickyDisbaled"));
  stickyB.setPaintSelectedBorder(false);

  y += 20;
  x = butLeft;

  useOreDictB = new ToggleButton(gui, ID_ORE_DICT + buttonIdOffset, x, y, IconEIO.FILTER_ORE_DICT_OFF, IconEIO.FILTER_ORE_DICT);
  useOreDictB.setSelectedToolTip(EnderIO.lang.localize("gui.conduit.item.oreDicEnabled"));
  useOreDictB.setUnselectedToolTip(EnderIO.lang.localize("gui.conduit.item.oreDicDisabled"));
  useOreDictB.setPaintSelectedBorder(false);

  x += 20;
  useNbtB = new ToggleButton(gui, ID_NBT + buttonIdOffset, x, y, IconEIO.FILTER_NBT_OFF, IconEIO.FILTER_NBT);
  useNbtB.setSelectedToolTip(EnderIO.lang.localize("gui.conduit.item.matchNBT"));
  useNbtB.setUnselectedToolTip(EnderIO.lang.localize("gui.conduit.item.ignoreNBT"));
  useNbtB.setPaintSelectedBorder(false);

  x += 20;
  damageB = new CycleButton<DamageModeIconHolder>(gui, ID_DAMAGE + buttonIdOffset, x, y, DamageModeIconHolder.class);
}
 
開發者ID:SleepyTrousers,項目名稱:EnderIO,代碼行數:51,代碼來源:BasicItemFilterGui.java


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