本文整理汇总了Java中net.minecraft.client.gui.GuiScreen.setClipboardString方法的典型用法代码示例。如果您正苦于以下问题:Java GuiScreen.setClipboardString方法的具体用法?Java GuiScreen.setClipboardString怎么用?Java GuiScreen.setClipboardString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.gui.GuiScreen
的用法示例。
在下文中一共展示了GuiScreen.setClipboardString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: actionPerformed
import net.minecraft.client.gui.GuiScreen; //导入方法依赖的package包/类
@Override
public void actionPerformed(IGuiWidget widget) {
super.actionPerformed(widget);
errorMessage = "";
if (widget.getID() == 0) {
PastebinHandler.login(usernameBox.getText(), passwordBox.getText());
state = EnumState.LOGIN;
errorMessage = I18n.format("gui.pastebin.loggingIn");
} else if (widget.getID() == 1) {
PastebinHandler.put(pastingString);
state = EnumState.PUTTING;
errorMessage = I18n.format("gui.pastebin.uploadingToPastebin");
} else if (widget.getID() == 2) {
PastebinHandler.get(pastebinBox.getText());
state = EnumState.GETTING;
errorMessage = I18n.format("gui.pastebin.retrievingFromPastebin");
} else if (widget.getID() == 3) {
PastebinHandler.logout();
state = EnumState.LOGOUT;
} else if (widget.getID() == 4) {
GuiScreen.setClipboardString(pastingString);
errorMessage = I18n.format("gui.pastebin.clipboardSetToContents");
} else if (widget.getID() == 5) {
errorMessage = I18n.format("gui.pastebin.retrievedFromClipboard");
readFromString(GuiScreen.getClipboardString());
}
}
示例2: setClipboard
import net.minecraft.client.gui.GuiScreen; //导入方法依赖的package包/类
protected void setClipboard(String clipboard) {
GuiScreen.setClipboardString(clipboard);
}