本文整理汇总了Java中org.jdesktop.application.Action类的典型用法代码示例。如果您正苦于以下问题:Java Action类的具体用法?Java Action怎么用?Java Action使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Action类属于org.jdesktop.application包,在下文中一共展示了Action类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getStartCustomer
import org.jdesktop.application.Action; //导入依赖的package包/类
/**
* Действие по нажатию кнопки "Начать прием"
*/
@Action
public void getStartCustomer(ActionEvent evt) {
QLog.l().logQUser().debug("getStartCustomer");
try {
final long start = go();
// Переводим кастомера в разряд обрабатываемых
NetCommander.getStartCustomer(netProperty, user.getId());
// Получаем новую обстановку
//Получаем состояние очередей для юзера
setSituation(NetCommander.getSelfServices(netProperty, user.getId()));
// поддержка расширяемости плагинами
extPluginIStartClientPressButton(user, netProperty, getUserPlan(), evt, 3);
end(start);
} catch (Throwable th) {
throw new ClientException(new Exception(th));
}
}
示例2: invitePostponed
import org.jdesktop.application.Action; //导入依赖的package包/类
@Action
public void invitePostponed() throws QException {
if (listPostponed.getSelectedIndex() != -1) {
if (customer == null
|| (user.getParallelAccess()
&& customer != null
&& (CustomerState.STATE_WORK.equals(customer.getState())
|| CustomerState.STATE_WORK_SECONDARY.equals(customer.getState())))) {
final long start = go();
final QCustomer cust = (QCustomer) listPostponed.getSelectedValue();
NetCommander.invitePostponeCustomer(netProperty, user.getId(), cust.getId());
// Показываем обстановку
setSituation(NetCommander.getSelfServices(netProperty, user.getId()));
// поддержка расширяемости плагинами
extPluginIStartClientPressButton(user, netProperty, getUserPlan(),
new ActionEvent(menuItemInvitePostponed, 1, KEYS_MAY_INVITE), 1);
end(start);
} else {
JOptionPane.showMessageDialog(null, getLocaleMessage("postponed.already_invited"),
getLocaleMessage("invite.posponed.title"), JOptionPane.INFORMATION_MESSAGE);
}
}
}
示例3: setPriority
import org.jdesktop.application.Action; //导入依赖的package包/类
@Action
public void setPriority() {
final QCustomer2 cus = (QCustomer2) listLine.getSelectedValue();
if (cus != null) {
final String name = (String) JOptionPane.showInputDialog(this,
getLocaleMessage("admin.action.change_priority.get.message"), //NOI18N
getLocaleMessage("admin.action.change_priority.get.title"), //NOI18N
JOptionPane.QUESTION_MESSAGE,
null,
Uses.get_PRIORITYS_WORD().values().toArray(),
Uses.get_PRIORITYS_WORD().values().toArray()[1]);
//Если не выбрали, то выходим
if (name != null) {
for (int i = 0; i < Uses.get_PRIORITYS_WORD().size(); i++) {
if (name.equals(Uses.get_PRIORITYS_WORD().get(i))) {
JOptionPane.showMessageDialog(this,
NetCommander
.setCustomerPriority(netProperty, i, cus.customer.getFullNumber()),
getLocaleMessage("admin.action.change_priority.title"),
JOptionPane.INFORMATION_MESSAGE);
refreshLines();
}
}
}
}
}
示例4: moveToPOstponed
import org.jdesktop.application.Action; //导入依赖的package包/类
@Action
public void moveToPOstponed() {
try {
final long start = go();
if (moveToPostponed == null) {
moveToPostponed = new FMoveToPostponed(fClient, true, getResults());
}
Uses.setLocation(moveToPostponed);
moveToPostponed.setVisible(true);
if (!moveToPostponed.isOK()) {
return;
}
NetCommander.customerToPostpone(netProperty, user.getId(), customer.getId(),
moveToPostponed.getResult(), moveToPostponed.getPeriod(), moveToPostponed.isMine());
// Показываем обстановку
setSituation(NetCommander.getSelfServices(netProperty, user.getId()));
// поддержка расширяемости плагинами
extPluginIStartClientPressButton(user, netProperty, getUserPlan(),
new ActionEvent(buttonMoveToPostponed, 13, buttonMoveToPostponed.getActionCommand(),
System.currentTimeMillis(), 1), 5);
end(start);
} catch (Throwable th) {
throw new ClientException(new Exception(th));
}
}
示例5: changeStatusForPostponed
import org.jdesktop.application.Action; //导入依赖的package包/类
@Action
public void changeStatusForPostponed() {
if (listPostponed.getSelectedIndex() != -1) {
final QCustomer cust = (QCustomer) listPostponed.getSelectedValue();
String status = (String) JOptionPane
.showInputDialog(this, getLocaleMessage("resultwork.dialog.caption"),
getLocaleMessage("resultwork.dialog.title"), JOptionPane.QUESTION_MESSAGE, null,
getResults(), null);
if (status == null) {
return;
}
NetCommander.postponeCustomerChangeStatus(netProperty, cust.getId(), status);
buttonRefreshPostponedActionPerformed(null);
}
}
示例6: deleteServiseFromUser
import org.jdesktop.application.Action; //导入依赖的package包/类
@Action
public void deleteServiseFromUser() {
if (listUserService.getSelectedIndex() != -1) {
if (JOptionPane.showConfirmDialog(this,
getLocaleMessage("admin.remove_service_from_user.title") + " \"" + listUserService
.getSelectedValue().toString() + "\" " + getLocaleMessage(
"admin.remove_service_from_user.title_1") + " \"" + listUsers.getSelectedValue()
.toString() + "\"?",
getLocaleMessage("admin.remove_service_from_user.caption"),
JOptionPane.YES_NO_OPTION) == 1) {
return;
}
final int ind = listUserService.getSelectedIndex();
((QUser) listUsers.getSelectedValue()).deletePlanService(
((QPlanService) listUserService.getSelectedValue()).getService().getId());
if (listUserService.getLastVisibleIndex() != -1) {
listUserService.setSelectedIndex(
listUserService.getLastVisibleIndex() < ind ? listUserService
.getLastVisibleIndex()
: ind);
}
}
}
示例7: editMainBoard
import org.jdesktop.application.Action; //导入依赖的package包/类
@Action
public void editMainBoard() throws IOException {
QLog.l().logger().info("Открыть редактор главного табло.");
final ServerNetProperty servProp = new ServerNetProperty();
try {
if (board == null) {
adr = servProp.getAddress().getHostAddress();
port = servProp.getPort();
board = MainBoard.getInstance().getRedactor();
board.setParams(servProp);
} else if (!servProp.getAddress().getHostAddress().equals(adr)
|| !servProp.getPort().equals(port)) {
board.setParams(servProp);
adr = servProp.getAddress().getHostAddress();
port = servProp.getPort();
}
} catch (Exception e) {
board = null;
ClientWarning.showWarning(getLocaleMessage("admin.open_editor.wern") + "\n" + e);
return;
}
// Отцентирируем
Uses.setLocation(board);
// Покажем
board.setVisible(true);
}
示例8: addBreak
import org.jdesktop.application.Action; //导入依赖的package包/类
@Action
public void addBreak() {
final GregorianCalendar gc = new GregorianCalendar(2015, 1, 1,
Integer.parseInt(cbSH.getSelectedItem().toString()),
Integer.parseInt(cbSM.getSelectedItem().toString()));
final Date d1 = gc.getTime();
gc.set(GregorianCalendar.HOUR_OF_DAY, Integer.parseInt(cbFH.getSelectedItem().toString()));
gc.set(GregorianCalendar.MINUTE, Integer.parseInt(cbFM.getSelectedItem().toString()));
if (d1.before(gc.getTime())) {
breaks = (QBreak[]) ArrayUtils.add(breaks, new QBreak(d1, gc.getTime(), breaksParent));
loadBreaks(breaks);
} else {
JOptionPane.showConfirmDialog(this, getLocaleMessage("add_break_dialog.err1.message"),
getLocaleMessage("add_break_dialog.err1.title"), JOptionPane.DEFAULT_OPTION,
JOptionPane.ERROR_MESSAGE);
}
}
示例9: inviteNextCustomer
import org.jdesktop.application.Action; //导入依赖的package包/类
/**
* Действие по нажатию кнопки "Вызов"
*/
@Action
public void inviteNextCustomer(ActionEvent evt) {
QLog.l().logQUser().debug("inviteNextCustomer");
try {
final long start = go();
// Вызываем кастомера
final QCustomer cust = NetCommander.inviteNextCustomer(netProperty, user.getId());
if (cust != null && cust.getPostponPeriod() > 0) {
JOptionPane.showMessageDialog(this,
getLocaleMessage("invite.posponed.mess.1") + " " + cust.getPostponPeriod() + " "
+ getLocaleMessage("invite.posponed.mess.2") + " \"" + cust
.getPostponedStatus()
+ "\".",
getLocaleMessage("invite.posponed.title"),
JOptionPane.INFORMATION_MESSAGE);
}
// Показываем обстановку
setSituation(NetCommander.getSelfServices(netProperty, user.getId()));
// поддержка расширяемости плагинами
extPluginIStartClientPressButton(user, netProperty, getUserPlan(), evt, 1);
end(start);
} catch (HeadlessException | QException th) {
throw new ClientException(new Exception(th));
}
}
示例10: showAboutBox
import org.jdesktop.application.Action; //导入依赖的package包/类
@Action
public void showAboutBox() {
if (aboutBox == null) {
JFrame mainFrame = SampleDesktopApplication.getApplication().getMainFrame();
aboutBox = new SampleDesktopAboutBox(mainFrame);
aboutBox.setLocationRelativeTo(mainFrame);
}
SampleDesktopApplication.getApplication().show(aboutBox);
}
示例11: importPlanning
import org.jdesktop.application.Action; //导入依赖的package包/类
@Action
public void importPlanning() {
JFileChooser fileChooser = new JFileChooser();
fileChooser.setFileFilter(new FileNameExtensionFilter("Planning File Filter", "xml"));
fileChooser.showDialog(this, "Import Planning File");
File imageplanningFile = fileChooser.getSelectedFile();
// check file format
try {
// create xml reader
SAXBuilder builder = new SAXBuilder();
Document doc;
doc = builder.build(imageplanningFile);
Element atts = doc.getRootElement();
if(atts.getName().equalsIgnoreCase("XMLExport"))
{
imageplanningFile = convertEOLISAImagePlanning(imageplanningFile);
}
H2Fetcher.addImagePlanning("SUMODB", imageplanningFile);
} catch (Exception ex) {
Utilities.errorWindow("Problem importing planner");
}
updateAcquisitionTree();
}
示例12: showAboutBox
import org.jdesktop.application.Action; //导入依赖的package包/类
@Action
public void showAboutBox() {
if (aboutBox == null) {
JFrame mainFrame = SumoPlatform.getApplication().getMainFrame();
aboutBox = new GeoImageViewerAboutBox(mainFrame);
aboutBox.setLocationRelativeTo(mainFrame);
}
SumoPlatform.getApplication().show(aboutBox);
}
示例13: showTimeSlider
import org.jdesktop.application.Action; //导入依赖的package包/类
@Action
public void showTimeSlider() {
if (timeSlider == null || !timeSlider.isVisible()) {
JFrame mainFrame = SumoPlatform.getApplication().getMainFrame();
timeSlider = new TimeBarDialog(mainFrame, false);
timeSlider.setLocationRelativeTo(mainFrame);
timeSlider.setVisible(true);
}
}
示例14: printInfo
import org.jdesktop.application.Action; //导入依赖的package包/类
@Action
public void printInfo() {
QLog.l().logger().info("Печать информации");
// Узнать, есть ли информация для печати
final String txt =
level.isRoot() && level.getChildCount() == 1 ? level.getChildAt(0).getTextPrint()
: level.getTextPrint();
if (txt != null && !txt.isEmpty()) {
FWelcome.printPreInfoText(txt);
}
}
示例15: setCurrentLang
import org.jdesktop.application.Action; //导入依赖的package包/类
@Action
public void setCurrentLang() {
for (int i = 0; i < menuLangs.getItemCount(); i++) {
if (((JRadioButtonMenuItem) menuLangs.getItem(i)).isSelected()) {
Locales.getInstance()
.setLangCurrent(((JRadioButtonMenuItem) menuLangs.getItem(i)).getText());
}
}
}