本文整理匯總了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);
}