本文整理汇总了Java中javax.security.auth.callback.ConfirmationCallback类的典型用法代码示例。如果您正苦于以下问题:Java ConfirmationCallback类的具体用法?Java ConfirmationCallback怎么用?Java ConfirmationCallback使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ConfirmationCallback类属于javax.security.auth.callback包,在下文中一共展示了ConfirmationCallback类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: jButton2ActionPerformed
import javax.security.auth.callback.ConfirmationCallback; //导入依赖的package包/类
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
if (new Func.Message()
.showConfirmDialog("设置宠物壳子所有物品的价格为2铜之内自动买进。<br/>注意:设置后原本配置的数据会都变成2铜<br/>确定要进行快速设置?") == ConfirmationCallback.YES) {
int money = 2;
SaoHuoFunc saoHuoFunc = new SaoHuoFunc();
TableModel model = (TableModel) Command.JframeSaoHuo.stonejTable
.getModel();
for (int row = model.getRowCount() - 1; row >= 0; row--) {
model.setValueAt(money, row, 2);
model.setValueAt(saoHuoFunc.moneyToString(money), row, 1);
}
saoHuoFunc = null;
model = null;
}
}
示例2: jButton3ActionPerformed
import javax.security.auth.callback.ConfirmationCallback; //导入依赖的package包/类
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
if (new Func.Message()
.showConfirmDialog("设置宠物壳子所有物品的价格为2铜之内自动买进。<br/>注意:设置后原本配置的数据会都变成2铜<br/>确定要进行快速设置?") == ConfirmationCallback.YES) {
int money = 2;
SaoHuoFunc saoHuoFunc = new SaoHuoFunc();
TableModel model = (TableModel) Command.JframeSaoHuo.petjTable
.getModel();
for (int row = model.getRowCount() - 1; row >= 0; row--) {
model.setValueAt(money, row, 2);
model.setValueAt(saoHuoFunc.moneyToString(money), row, 1);
}
saoHuoFunc = null;
model = null;
}
}
示例3: jButton8ActionPerformed
import javax.security.auth.callback.ConfirmationCallback; //导入依赖的package包/类
private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {
if (new Func.Message()
.showConfirmDialog("设置其他分类里面所有物品的价格为2铜之内自动买进。<br/>注意:设置后原本配置的数据会都变成2铜<br/>确定要进行快速设置?") == ConfirmationCallback.YES) {
int money = 2;
SaoHuoFunc saoHuoFunc = new SaoHuoFunc();
TableModel model = (TableModel) Command.JframeSaoHuo.elseClassjTable
.getModel();
for (int row = model.getRowCount() - 1; row >= 0; row--) {
model.setValueAt(money, row, 2);
model.setValueAt(saoHuoFunc.moneyToString(money), row, 1);
}
saoHuoFunc = null;
model = null;
}
}
示例4: jButton7ActionPerformed
import javax.security.auth.callback.ConfirmationCallback; //导入依赖的package包/类
private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {
if (new Func.Message()
.showConfirmDialog("设置传奇图纸所有物品的价格为2铜之内自动买进。<br/>注意:设置后原本配置的数据会都变成2铜<br/>确定要进行快速设置?") == ConfirmationCallback.YES) {
int money = 2;
SaoHuoFunc saoHuoFunc = new SaoHuoFunc();
TableModel model = (TableModel) Command.JframeSaoHuo.legendjTable
.getModel();
for (int row = model.getRowCount() - 1; row >= 0; row--) {
model.setValueAt(money, row, 2);
model.setValueAt(saoHuoFunc.moneyToString(money), row, 1);
}
saoHuoFunc = null;
model = null;
}
}
示例5: jButton4ActionPerformed
import javax.security.auth.callback.ConfirmationCallback; //导入依赖的package包/类
private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {
if (new Func.Message()
.showConfirmDialog("设置风物志类所有物品的价格为2铜之内自动买进。<br/>注意:设置后原本配置的数据会都变成2铜<br/>确定要进行快速设置?") == ConfirmationCallback.YES) {
int money = 2;
SaoHuoFunc saoHuoFunc = new SaoHuoFunc();
TableModel model = (TableModel) Command.JframeSaoHuo.fengWuZhijTable
.getModel();
for (int row = model.getRowCount() - 1; row >= 0; row--) {
model.setValueAt(money, row, 2);
model.setValueAt(saoHuoFunc.moneyToString(money), row, 1);
}
saoHuoFunc = null;
model = null;
}
}
示例6: jButton1ActionPerformed
import javax.security.auth.callback.ConfirmationCallback; //导入依赖的package包/类
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
if (new Func.Message()
.showConfirmDialog("设置杂货类所有物品的价格为2铜之内自动买进。<br/>注意:设置后原本配置的数据会都变成2铜<br/>确定要进行快速设置?") == ConfirmationCallback.YES) {
int money = 2;
SaoHuoFunc saoHuoFunc = new SaoHuoFunc();
TableModel model = (TableModel) Command.JframeSaoHuo.groceriesjTable
.getModel();
for (int row = model.getRowCount() - 1; row >= 0; row--) {
model.setValueAt(money, row, 2);
model.setValueAt(saoHuoFunc.moneyToString(money), row, 1);
}
saoHuoFunc = null;
model = null;
}
}
示例7: jMenuItem15ActionPerformed
import javax.security.auth.callback.ConfirmationCallback; //导入依赖的package包/类
private void jMenuItem15ActionPerformed(java.awt.event.ActionEvent evt) {
if (new Func.Message()
.showConfirmDialog("软件使用Java编写,使用了大漠、大兵、信诺模块,与游戏的交互、图、色、文字点阵等辨别都已写Java接口,<br/>可以完全使用Java来进行开发!软件源代码会象征性收费1000元<br/>随着时间价格会逐渐降低,甚至,会免费放出!敬请期待!喜欢辅助软件开发的小朋友,可以联系,<br/>当然,喜欢不劳而获的那种人,请勿打扰!<br/><br/>"
+ "功能简介:<br/>"
+ "1.打怪挂机点增加So Easy,录入点坐标,一行代码就可增加一个挂机点!<br/>"
+ "2.多线程监控,打怪线程、辅助线程、日志线程、系统线程、定时监控软件正常运行<br/>"
+ "3.底层接口丰富,大漠、信诺...等模块操作系统的接口全部用写好,可直接调用!不想做寻仙做其他的游戏也完全可以<br/>"
+ "4.基本功能模块皆有,JAVA的松耦合完美诠释。每个模块都可单独拿出做其他游戏的辅助,就如,按键精灵!<br/>"
+ "5.扫货的数据维护,八卦灵石、宠物壳子、可直接一行代码录入数据!这都不是事<br/>"
+ "6.界面使用MyEclipse8.5设计,可拖拽如VB、易语言的界面设计<br/>"
+ "7.整套自己的系统,有自己的腾讯云服务器,php软件注册系统!注册码开号实时控制<br/>"
+ "8.内置代理接口,代理可自行开注册码<br/>"
+ "<br/>"
+ "废话不多说,本人QQ921153866,拒加喜欢不劳而获者,贪小便宜者,思想愚笨者<br/>"
+ "<br/>是否查看源码文件?") == ConfirmationCallback.YES) {
System.out.println("aaa");
}
}
示例8: SaveDatajButtonActionPerformed
import javax.security.auth.callback.ConfirmationCallback; //导入依赖的package包/类
private void SaveDatajButtonActionPerformed(java.awt.event.ActionEvent evt) {
if (new Func.Message().showConfirmDialog("确定要保存数据?") == ConfirmationCallback.YES) {
try {
File file = new action.File();
file.saoHuoGroceriesSave();
file.saoHuoStoneSave();
file.saoHuoPetSave();
file.saoHuoFengWuZhiSave();
file.saoHuoLegendSave();
file.saoHuoElseClassSave();
file.UISave();
new Func.Message().showMessageDialog("保存成功");
file = null;
} catch (Exception e) {
new Func.Message().showMessageDialog("执行失败");
}
}
}
示例9: testConfirmationCallback_09
import javax.security.auth.callback.ConfirmationCallback; //导入依赖的package包/类
/**
* test of methods getOptionType(), getDefaultOption(), getMessageType()
* getOptions(), set/getSelectedIndex
*/
public final void testConfirmationCallback_09() throws IllegalArgumentException {
String[] opt = {"CONTINUE", "ABORT"};
String[] s;
cc = new ConfirmationCallback("prompt", mt[0], opt, 1);
assertEquals(1, cc.getDefaultOption());
assertEquals(ConfirmationCallback.INFORMATION, cc.getMessageType());
assertEquals(opt,cc.getOptions());
s = cc.getOptions();
for (int i = 0; i < opt.length; i++){
assertEquals(opt[i], s[i]);
}
assertEquals("prompt", cc.getPrompt());
assertEquals(-1, cc.getOptionType());
assertEquals(ConfirmationCallback.UNSPECIFIED_OPTION, cc.getOptionType());
assertNotNull(cc.getOptions());
cc.setSelectedIndex(1);
assertEquals(1, cc.getSelectedIndex());
}
示例10: main
import javax.security.auth.callback.ConfirmationCallback; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
// Provide answer in an individual stream so that the program
// does not block.
System.setIn(new ByteArrayInputStream("1\n".getBytes()));
new TextCallbackHandler().handle(new Callback[]{
new ConfirmationCallback("Prince", ConfirmationCallback.INFORMATION,
new String[]{"To be", "Not to be"}, 0)});
}
示例11: handle
import javax.security.auth.callback.ConfirmationCallback; //导入依赖的package包/类
public void handle(Callback[] callbacks)
throws IOException, UnsupportedCallbackException
{
if (callbacks == null)
throw new NullPointerException();
for (int i = 0; i < callbacks.length; i++)
{
if (callbacks[i] == null)
continue;
if (callbacks[i] instanceof ChoiceCallback)
handleChoice((ChoiceCallback) callbacks[i]);
else if (callbacks[i] instanceof ConfirmationCallback)
handleConfirmation((ConfirmationCallback) callbacks[i]);
else if (callbacks[i] instanceof LanguageCallback)
handleLanguage((LanguageCallback) callbacks[i]);
else if (callbacks[i] instanceof NameCallback)
handleName((NameCallback) callbacks[i]);
else if (callbacks[i] instanceof PasswordCallback)
handlePassword((PasswordCallback) callbacks[i]);
else if (callbacks[i] instanceof TextInputCallback)
handleTextInput((TextInputCallback) callbacks[i]);
else if (callbacks[i] instanceof TextOutputCallback)
handleTextOutput((TextOutputCallback) callbacks[i]);
else
handleOther(callbacks[i]);
}
}
示例12: handleTextOutput
import javax.security.auth.callback.ConfirmationCallback; //导入依赖的package包/类
protected synchronized void handleTextOutput(TextOutputCallback c)
{
Frame ownerFrame = new Frame();
Dialog dialog = new Dialog(ownerFrame);
dialog.setLayout(new GridLayout(2, 1));
switch (c.getMessageType() /*c.getStyle()*/)
{
case ConfirmationCallback.ERROR:
dialog.setTitle(messages.getString("callback.error"));
break;
case ConfirmationCallback.INFORMATION:
dialog.setTitle(messages.getString("callback.information"));
break;
case ConfirmationCallback.WARNING:
dialog.setTitle(messages.getString("callback.warning"));
break;
default:
dialog.setTitle("");
}
Label label = new Label(c.getMessage());
Panel buttons = new Panel();
Button ok = new Button(messages.getString("callback.ok"));
buttons.setLayout(new FlowLayout(FlowLayout.RIGHT));
buttons.add(ok);
ok.addActionListener(this);
dialog.add(label);
dialog.add(buttons);
dialog.pack();
dialog.show();
try { wait(); }
catch (InterruptedException ie) { }
dialog.dispose();
ownerFrame.dispose();
}
示例13: handleConfirmation
import javax.security.auth.callback.ConfirmationCallback; //导入依赖的package包/类
protected void handleConfirmation(ConfirmationCallback c)
{
if (c.getOptionType() == ConfirmationCallback.YES_NO_OPTION)
c.setSelectedIndex(ConfirmationCallback.NO);
else if (c.getOptionType() == ConfirmationCallback.YES_NO_CANCEL_OPTION)
c.setSelectedIndex(ConfirmationCallback.NO);
else if (c.getOptionType() == ConfirmationCallback.OK_CANCEL_OPTION)
c.setSelectedIndex(ConfirmationCallback.OK);
else
c.setSelectedIndex(c.getDefaultOption());
}
示例14: jButton1ActionPerformed
import javax.security.auth.callback.ConfirmationCallback; //导入依赖的package包/类
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
if (new Func.Message()
.showConfirmDialog("游戏已不再留恋!软件全部免费!<br/>原本只能购买才能用的自动扫货跟工作室用的高级打怪模式全自动卦机打怪,现免费发布,免费使用!<br/>免费注册码为www.xnx3.com注册便可以用!<br/>本软件使用Java编写!精通Java,对辅助有兴趣的,可联系我QQ921153866购买源码,继续开发下去!<br/><br/>【注】软件已全免费,但答题是用的第三方的答题平台,喜欢软件的仙友仍可以自行购买自动答题服务") == ConfirmationCallback.YES) {
Command.browser.loadUrl(
"http://www.xnx3.com/xunxian/fuzhu/shenshan_kefu.html",
200, 200, 800, 600);
}
// switch (Command.agent) {
// case 1: //1是自己的
// Object[] options = { "自动扫货购买", "打怪自动过验证码服务" };
// int response = JOptionPane
// .showOptionDialog(
// null,
// "自动打怪功能、后台键盘鼠标模拟、捉宝宝打符、免费使用!\n免费注册码:www.xnx3.com\n\n自动扫货续费都是5元一个月超低价!\n自动打怪可以购买自动过验证码服务,无需人工值守",
// "软件购买", JOptionPane.YES_OPTION,
// JOptionPane.QUESTION_MESSAGE, null, options,
// options[0]);
// if (response == 0) { //客服购买
// Command.browser
// .loadUrl(
// "http://www.xnx3.com/xunxian/xxautofight/20140308/82.html",
// 200, 200, 1024, 900);
// } else if (response == 1) {
// Command.browser
// .loadUrl(
// "http://www.xnx3.com/xunxian/xxautofight/20140308/83.html",
// 200, 200, 1024, 900);
// }
// case 2:
// Command.browser.loadUrl(
// "http://www.xnx3.com/xunxian/fuzhu/shenshan_kefu.html",
// 200, 200, 420, 700);
// }
}
示例15: setHwnd
import javax.security.auth.callback.ConfirmationCallback; //导入依赖的package包/类
public static void setHwnd(){
new Func.Message().showMessageDialog("点击确定后有1秒时间将鼠标<br/>指向要进行后台卦级的游戏窗口");
try {
new Func.Sleep().sleep(1000);
Command.hwnd= Command.activeDm.invoke("GetMousePointWindow").getInt();
String title=Command.activeDm.invoke("GetWindowTitle",Command.hwnd)+"";
if(title.indexOf("寻仙")>-1){
if(title.indexOf(Command.title)>-1){ //再次判断获取的不能为当前辅助软件窗口
Command.hwnd=0; //不是寻仙窗口,还原句柄
if(new Func.Message().showConfirmDialog("失败!本次获取的为当前软件的窗口!<br/>请点击[获取目标窗口]按钮然后点了[确定]后<br/>将鼠标放到要挂机的寻仙游戏的窗口上。<br/><br/>是否要查看此操作详细说明?")==ConfirmationCallback.YES){
Command.browser.loadUrl("http://www.xnx3.com/xunxian/xxautofight/20130626/41.html",200,200,800,600);
}
}else{ //获取正确
Command.JForm.setHwndjLabel.setText("窗口句柄:"+Command.hwnd+",窗口名:"+title);
}
}else{
if(new Func.Message().showConfirmDialog("获取窗口错误,不是寻仙窗口!<br/>点击获取目标窗口后将鼠标指向寻仙游戏<br/><br/>是否要查看此操作详细说明?")==ConfirmationCallback.YES){
System.out.println("--");
Command.browser.loadUrl("http://www.xnx3.com/xunxian/xxautofight/20130626/41.html",200,200,800,600);
}
Command.hwnd=0; //不是寻仙窗口,还原句柄
Command.JForm.setHwndjLabel.setText("请点击前面按钮获取目标窗口");
}
} catch (Exception e) {
e.printStackTrace();
}
}