1 14 package org.compiere.apps; 15 16 import javax.swing.*; 17 import javax.swing.event.*; 18 import java.awt.*; 19 import java.awt.event.*; 20 import java.awt.print.*; 21 import java.io.*; 22 import java.util.*; 23 import java.sql.*; 24 25 import org.compiere.model.*; 26 import org.compiere.process.*; 27 import org.compiere.util.*; 28 import org.compiere.grid.*; 29 import org.compiere.grid.ed.*; 30 import org.compiere.images.ImageFactory; 31 import org.compiere.apps.search.*; 32 import org.compiere.print.*; 33 import org.compiere.plaf.*; 34 import org.compiere.swing.*; 35 36 49 public final class APanel extends CPanel 50 implements DataStatusListener, ChangeListener, ActionListener, ASyncProcess 51 { 52 56 public APanel() 57 { 58 super(); 59 m_ctx = Env.getCtx(); 60 try 62 { 63 jbInit(); 64 } 65 catch (Exception e) 66 { 67 Log.error("APanel", e); 68 } 69 createMenu(); 70 } 72 75 public void dispose() 76 { 77 Log.trace(Log.l1_User, "APanel.dispose"); 78 m_disposing = true; 80 tabPanel.dispose(this); 82 tabPanel = null; 83 for (int i = 0; i < m_mWorkbench.getWindowCount(); i++) 85 { 86 m_curWindowNo = m_mWorkbench.getWindowNo(i); 87 Log.trace(Log.l1_User, "APanel.dispose #" + m_curWindowNo); 88 Env.setAutoCommit(m_ctx, m_curWindowNo, false); 89 m_mWorkbench.dispose(i); 90 Env.clearWinContext(m_ctx, m_curWindowNo); 91 } 93 if (m_mWorkbench != null) 95 m_mWorkbench.dispose(); 96 m_mWorkbench = null; 97 if (menuBar != null) 99 menuBar.removeAll(); 100 menuBar = null; 101 if (toolBar != null) 103 toolBar.removeAll(); 104 toolBar = null; 105 this.removeAll(); 107 } 109 112 private BorderLayout mainLayout = new BorderLayout(); 113 private VTabbedPane tabPanel = new VTabbedPane(true); 114 private StatusBar statusBar = new StatusBar(); 115 private CPanel northPanel = new CPanel(); 116 private JToolBar toolBar = new JToolBar(); 117 private JMenuBar menuBar = new JMenuBar(); 118 private FlowLayout northLayout = new FlowLayout(); 119 120 124 private void jbInit() throws Exception 125 { 126 this.setLocale(Language.getLanguage().getLocale()); 127 this.setLayout(mainLayout); 128 129 mainLayout.setHgap(2); 131 mainLayout.setVgap(2); 132 this.add(tabPanel, BorderLayout.CENTER); 133 this.add(statusBar, BorderLayout.SOUTH); 135 this.add(northPanel, BorderLayout.NORTH); 137 northPanel.setLayout(northLayout); 138 northLayout.setAlignment(FlowLayout.LEFT); 139 northPanel.add(toolBar, null); 140 } 142 private AppsAction aPrevious, aNext, aParent, aDetail, aFirst, aLast, 143 aNew, aCopy, aDelete, aIgnore, aPrint, 144 aRefresh, aHistory, aAttachment, aMulti, aFind; 145 public AppsAction aSave, aLock; 146 private AppsAction aReport, aEnd, aHome, aHelp, aProduct, 148 aAccount, aCalculator, aCalendar, aEditor, aPreference, aScript, 149 aOnline, aSendMail, aAbout, aPrintScr, aScrShot, aExit, aBPartner; 150 151 152 153 157 private void createMenu() 158 { 159 162 JMenu mFile = AEnv.getMenu("File"); 165 menuBar.add(mFile); 166 aPrintScr = addAction("PrintScreen", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, 0), false); 167 aScrShot = addAction("ScreenShot", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, Event.SHIFT_MASK), false); 168 aReport = addAction("Report", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_P, Event.ALT_MASK), false); 169 aPrint = addAction("Print", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_P, Event.CTRL_MASK), false); 170 mFile.addSeparator(); 171 aEnd = addAction("End", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.ALT_MASK), false); 172 aExit = addAction("Exit", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.SHIFT_MASK+Event.ALT_MASK), false); 173 JMenu mEdit = AEnv.getMenu("Edit"); 175 menuBar.add(mEdit); 176 aNew = addAction("New", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_N, Event.CTRL_MASK), false); 177 aSave = addAction("Save", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_S, Event.CTRL_MASK), false); 178 mEdit.addSeparator(); 179 aCopy = addAction("Copy", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_V, Event.CTRL_MASK), false); 180 aDelete = addAction("Delete", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.CTRL_MASK), false); 181 aIgnore = addAction("Ignore", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), false); 182 aRefresh = addAction("Refresh", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_F5, 0), false); 183 mEdit.addSeparator(); 184 aFind = addAction("Find", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_F, Event.CTRL_MASK), true); if (m_isPersonalLock) 186 aLock = addAction("Lock", mEdit, null, true); JMenu mView = AEnv.getMenu("View"); 189 menuBar.add(mView); 190 aProduct = addAction("InfoProduct", mView, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.CTRL_MASK), false); 191 aBPartner = addAction("InfoBPartner", mView, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.SHIFT_MASK+Event.CTRL_MASK), false); 192 if (MRole.getDefault().isShowAcct()) 193 aAccount = addAction("InfoAccount", mView, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK+Event.CTRL_MASK), false); 194 AEnv.addMenuItem("InfoSchedule", null, null, mView, this); 195 mView.addSeparator(); 196 AEnv.addMenuItem("InfoOrder", "Info", null, mView, this); 197 AEnv.addMenuItem("InfoInvoice", "Info", null, mView, this); 198 AEnv.addMenuItem("InfoInOut", "Info", null, mView, this); 199 AEnv.addMenuItem("InfoPayment", "Info", null, mView, this); 200 AEnv.addMenuItem("InfoCashLine", "Info", null, mView, this); 201 AEnv.addMenuItem("InfoAssignment", "Info", null, mView, this); 202 AEnv.addMenuItem("InfoAsset", "Info", null, mView, this); 203 mView.addSeparator(); 204 aAttachment = addAction("Attachment", mView, KeyStroke.getKeyStroke(KeyEvent.VK_F7, 0), true); aHistory = addAction("History", mView, KeyStroke.getKeyStroke(KeyEvent.VK_F9, 0), true); mView.addSeparator(); 207 aMulti = addAction("Multi", mView, KeyStroke.getKeyStroke(KeyEvent.VK_F8, 0), true); JMenu mGo = AEnv.getMenu("Go"); 210 menuBar.add(mGo); 211 aFirst = addAction("First", mGo, KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, Event.ALT_MASK), false); 212 aPrevious = addAction("Previous", mGo, KeyStroke.getKeyStroke(KeyEvent.VK_UP, Event.ALT_MASK), false); 213 aNext = addAction("Next", mGo, KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, Event.ALT_MASK), false); 214 aLast = addAction("Last", mGo, KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, Event.ALT_MASK), false); 215 mGo.addSeparator(); 216 aParent = addAction("Parent", mGo, KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, Event.ALT_MASK), false); 217 aDetail = addAction("Detail", mGo, KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, Event.ALT_MASK), false); 218 mGo.addSeparator(); 219 aHome = addAction("Home", mGo, null, false); 220 JMenu mTools = AEnv.getMenu("Tools"); 222 menuBar.add(mTools); 223 aCalculator = addAction("Calculator", mTools, null, false); 224 aCalendar = addAction("Calendar", mTools, null, false); 225 aEditor = addAction("Editor", mTools, null, false); 226 aScript = addAction("Script", mTools, null, false); 227 mTools.addSeparator(); 228 aPreference = addAction("Preference", mTools, null, false); 229 JMenu mHelp = AEnv.getMenu("Help"); 231 menuBar.add(mHelp); 232 aHelp = addAction("Help", mHelp, KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0), false); 233 aOnline = addAction("Online", mHelp, null, false); 234 aSendMail = addAction("SendMail", mHelp, null, false); 235 aAbout = addAction("About", mHelp, null, false); 236 237 242 int c = CPanel.WHEN_IN_FOCUSED_WINDOW; getInputMap(c).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), aIgnore.getName()); 245 getActionMap().put(aIgnore.getName(), aIgnore); 246 getInputMap(c).put(KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0), aHelp.getName()); 248 getActionMap().put(aHelp.getName(), aHelp); 249 getInputMap(c).put(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0), aNew.getName()); 251 getActionMap().put(aNew.getName(), aNew); 252 getInputMap(c).put(KeyStroke.getKeyStroke(KeyEvent.VK_F3, 0), aDelete.getName()); 254 getActionMap().put(aDelete.getName(), aDelete); 255 getInputMap(c).put(KeyStroke.getKeyStroke(KeyEvent.VK_F4, 0), aSave.getName()); 257 getActionMap().put(aSave.getName(), aSave); 258 getInputMap(c).put(KeyStroke.getKeyStroke(KeyEvent.VK_F5, 0), aRefresh.getName()); 260 getActionMap().put(aRefresh.getName(), aRefresh); 261 getInputMap(c).put(KeyStroke.getKeyStroke(KeyEvent.VK_F6, 0), aFind.getName()); 263 getActionMap().put(aFind.getName(), aFind); 264 getInputMap(c).put(KeyStroke.getKeyStroke(KeyEvent.VK_F7, 0), aAttachment.getName()); 266 getActionMap().put(aAttachment.getName(), aAttachment); 267 getInputMap(c).put(KeyStroke.getKeyStroke(KeyEvent.VK_F8, 0), aMulti.getName()); 269 getActionMap().put(aMulti.getName(), aMulti); 270 getInputMap(c).put(KeyStroke.getKeyStroke(KeyEvent.VK_F9, 0), aHistory.getName()); 272 getActionMap().put(aHistory.getName(), aHistory); 273 274 277 toolBar.add(aIgnore.getButton()); toolBar.addSeparator(); 279 toolBar.add(aHelp.getButton()); toolBar.add(aNew.getButton()); 281 toolBar.add(aDelete.getButton()); 282 toolBar.add(aSave.getButton()); 283 toolBar.addSeparator(); 284 toolBar.add(aRefresh.getButton()); toolBar.add(aFind.getButton()); 286 toolBar.add(aAttachment.getButton()); 287 toolBar.add(aMulti.getButton()); 288 toolBar.addSeparator(); 289 toolBar.add(aHistory.getButton()); toolBar.add(aHome.getButton()); toolBar.add(aParent.getButton()); 292 toolBar.add(aDetail.getButton()); 293 toolBar.addSeparator(); 294 toolBar.add(aFirst.getButton()); 295 toolBar.add(aPrevious.getButton()); 296 toolBar.add(aNext.getButton()); 297 toolBar.add(aLast.getButton()); 298 toolBar.addSeparator(); 299 toolBar.add(aReport.getButton()); 300 toolBar.add(aPrint.getButton()); 301 toolBar.addSeparator(); 302 if (m_isPersonalLock) 303 toolBar.add(aLock.getButton()); 304 toolBar.add(aProduct.getButton()); 305 toolBar.addSeparator(); 306 toolBar.add(aEnd.getButton()); 307 if (Log.getTraceLevel() > Log.l6_Database) 309 AEnv.printActionInputMap(this); 310 } 312 313 321 private AppsAction addAction (String action, JMenu menu, KeyStroke accelerator, boolean toggle) 322 { 323 AppsAction act = new AppsAction(action, accelerator, toggle); 324 if (menu != null) 325 menu.add(act.getMenuItem()); 326 act.setDelegate(this); 327 return act; 328 } 330 334 public JMenuBar getMenuBar() 335 { 336 return menuBar; 337 } 339 343 public String getTitle() 344 { 345 if (m_mWorkbench.getWindowCount() > 1) 346 { 347 StringBuffer sb = new StringBuffer (); 348 sb.append(m_mWorkbench.getName()).append(" ") 349 .append(Env.getContext(m_ctx, "#AD_User_Name")).append("@") 350 .append(Env.getContext(m_ctx, "#AD_Client_Name")).append(".") 351 .append(Env.getContext(m_ctx, "#AD_Org_Name")).append(" [") 352 .append(Env.getContext(m_ctx, "#DB_UID")).append("]"); 353 return sb.toString(); 354 } 355 return Env.getHeader(m_ctx, m_curWindowNo); 356 } 358 359 private Properties m_ctx; 360 private boolean m_isSOTrx; 361 362 363 private MWorkbench m_mWorkbench; 364 365 private MTab m_curTab; 366 367 private GridController m_curGC; 368 369 private JTabbedPane m_curWinTab = null; 370 371 private int m_curWindowNo; 372 373 private int m_curTabIndex = -1; 374 375 private APanelTab m_curAPanelTab = null; 376 377 378 private boolean m_disposing = false; 379 380 private boolean m_errorDisplayed = false; 381 382 private boolean m_onlyCurrentRows = true; 383 384 private int m_onlyCurrentDays = 1; 385 386 private boolean m_isLocked = false; 387 388 private boolean m_isPersonalLock = MRole.getDefault().isPersonalLock(); 389 390 private int m_lastModifiers; 391 392 393 394 412 public boolean initPanel (int AD_Workbench_ID, int AD_Window_ID, MQuery query, boolean isSOTrx) 413 { 414 Log.trace(Log.l1_User, "APanel.initPanel", 415 "WB=" + AD_Workbench_ID + ", Win=" + AD_Window_ID + ", Query=" + query + ", SO=" + isSOTrx); 416 this.setName("APanel" + AD_Window_ID); 417 m_isSOTrx = isSOTrx; 418 419 420 if (AD_Workbench_ID == 0) 422 m_mWorkbench = new MWorkbench(m_ctx, AD_Window_ID); 423 else 424 { 426 ADialog.warn(0, this, "","Not implemented yet"); 435 return false; 436 } 437 438 441 for (int wb = 0; wb < m_mWorkbench.getWindowCount(); wb++) 442 { 443 m_curWindowNo = Env.createWindowNo (this); m_mWorkbench.setWindowNo(wb, m_curWindowNo); 446 Env.setAutoCommit(m_ctx, m_curWindowNo, Env.isAutoCommit(m_ctx)); 448 Env.setContext(m_ctx, m_curWindowNo, "IsSOTrx", isSOTrx ? "Y" : "N"); 449 450 VTabbedPane window = null; 452 if (m_mWorkbench.getWindowCount() == 1) 454 { 455 window = tabPanel; 456 window.setWorkbench(false); 457 } 458 else 459 { 460 VTabbedPane tp = new VTabbedPane(false); 461 window = tp; 462 } 463 window.addChangeListener(this); 465 466 469 int wbType = m_mWorkbench.getWindowType(wb); 470 471 474 if (wbType == MWorkbench.TYPE_WINDOW) 475 { 476 HashMap includedMap = new HashMap(2); 477 MWindowVO wVO = AEnv.getMWindowVO(m_curWindowNo, m_mWorkbench.getWindowID(wb), 0); 479 if (wVO == null) 480 { 481 ADialog.error(0, null, "AccessTableNoView", "(No Window Model Info)"); 482 return false; 483 } 484 MWindow mWindow = new MWindow (wVO); m_mWorkbench.setMWindow(wb, mWindow); 486 if (wb == 0) 487 m_onlyCurrentRows = mWindow.isTransaction(); 489 492 int tabSize = mWindow.getTabCount(); 493 for (int tab = 0; tab < tabSize; tab++) 494 { 495 boolean included = false; 496 MTab mTab = m_mWorkbench.getMWindow(wb).getTab(tab); 498 if (tab == 0) 500 { 501 if (m_mWorkbench.getWindowCount() == 1) 503 { 504 if (mTab.isHighVolume() && (query == null || !query.isActive())) 506 { 507 Find find = new Find(Env.getFrame(this), m_curWindowNo, mTab); 508 query = find.getQuery(); 509 find = null; 510 } 511 } 512 else if (wb != 0) 513 { 515 query = m_mWorkbench.getQuery(); 516 } 517 if (query != null) 519 { 520 m_onlyCurrentRows = false; mTab.setQuery(query); 522 } 523 if (wb == 0) 524 m_curTab = mTab; 525 } 527 Component tabElement = null; 528 if (mTab.isSortTab()) 530 { 531 VSortTab st = new VSortTab(m_curWindowNo, mTab.getAD_Table_ID(), 532 mTab.getAD_ColumnSortOrder_ID(), mTab.getAD_ColumnSortYesNo_ID()); 533 st.setTabLevel(mTab.getTabLevel()); 534 tabElement = st; 535 } 536 else { 538 GridController gc = new GridController(); CompiereColor cc = mWindow.getColor(); 540 if (cc != null) 541 gc.setBackgroundColor(cc); gc.initGrid(mTab, false, m_curWindowNo, this, mWindow); gc.addDataStatusListener(this); 545 gc.registerESCAction(aIgnore); if (wb == 0 && tab == 0) 548 { 549 m_curGC = gc; 550 Dimension size = gc.getPreferredSize(); size.width += 4; 552 size.height += 4; 553 gc.setPreferredSize(size); 554 } 555 tabElement = gc; 556 if (tab == 0 && query != null) 558 gc.switchSingleRow(); 559 560 if (mTab.getIncluded_Tab_ID() != 0) 562 includedMap.put(new Integer (mTab.getIncluded_Tab_ID()), gc); 563 564 if (includedMap.size() > 0) 566 { 567 GridController parent = (GridController)includedMap.get(new Integer (mTab.getAD_Tab_ID())); 568 if (parent != null) 569 { 570 included = parent.includeTab(gc); 571 if (!included) 572 Log.error("APanel.initPanel - Not Included = " + gc); 573 } 574 } 575 } 577 if (!included) { 579 StringBuffer tabName = new StringBuffer (); 580 if (CompierePLAF.isActive ()) 581 tabName.append (mTab.getName ()).append (" "); 582 else 583 { 584 tabName.append ("<html>"); 585 int pos = mTab.getName ().indexOf (" "); 586 if (pos == -1) 587 tabName.append (mTab.getName ()).append ("<br>"); 588 else 589 { 590 tabName.append (mTab.getName ().substring (0, 591 pos)) 592 .append ("<br>").append (mTab.getName (). 593 substring (pos + 1)); 594 tabName.append ("</html>"); 595 } 596 } 597 window.addTab (tabName.toString(), mTab.getIcon(), tabElement, mTab.getDescription()); 598 window.setMnemonicAt (tab, KeyEvent.VK_1 + tab); } 601 } } 606 if (m_mWorkbench.getWindowCount() == 1) 608 { 609 window.setToolTipText(m_mWorkbench.getDescription(wb)); 610 } 611 else 612 { 614 tabPanel.addTab(m_mWorkbench.getName(wb), m_mWorkbench.getIcon(wb), window, m_mWorkbench.getDescription(wb)); 615 } 616 Env.setContext(m_ctx, m_curWindowNo, "WindowName", m_mWorkbench.getName(wb)); 618 619 } 621 toolBar.setName(getTitle()); 623 m_curTab.getTableModel().setChanged(false); 624 aDetail.setEnabled(0 != m_curWinTab.getTabCount()-1); 626 627 Log.trace(Log.l1_User, "APanel.initPanel - fini"); 629 m_curWinTab.requestFocusInWindow(); 630 return true; 631 } 633 637 private int getWindowIndex() 638 { 639 if (m_mWorkbench.getWindowCount() == 1) 641 return 0; 642 return tabPanel.getSelectedIndex(); 644 } 646 650 private boolean isFirstTab() 651 { 652 return m_curWinTab.getSelectedIndex() == 0; 653 } 655 656 657 661 public void dataStatusChanged (DataStatusEvent e) 662 { 663 if (m_disposing) 664 return; 665 Log.trace(Log.l1_User, "APanel.dataStatusChanged", e.getMessage()); 666 String dbInfo = e.getMessage(); 667 if (m_curTab != null && m_curTab.isQueryActive()) 668 dbInfo = "[ " + dbInfo + " ]"; 669 statusBar.setStatusDB(dbInfo, e.Created, e.CreatedBy, e.Updated, e.UpdatedBy, e.Info); 670 671 if (e.getAD_Message() != null || e.getInfo() != null) 673 { 674 StringBuffer sb = new StringBuffer (); 675 String msg = e.getMessage(); 676 if (msg != null && msg.length() > 0) 677 sb.append(Msg.getMsg(m_ctx, e.getAD_Message())); 678 String info = e.getInfo(); 679 if (info != null && info.length() > 0) 680 { 681 if (sb.length() > 0 && !sb.toString().trim().endsWith(":")) 682 sb.append(": "); 683 sb.append(info); 684 } 685 if (sb.length() > 0) 686 { 687 int pos = sb.indexOf("\n"); 688 if (pos != -1) sb.replace(pos, pos+1, " - "); 690 setStatusLine (sb.toString (), e.isError ()); 691 } 692 } 693 694 if (e.isError() && !e.isConfirmed()) 696 { 697 ADialog.error(m_curWindowNo, this, e.getAD_Message(), e.getInfo()); 698 e.setConfirmed(true); m_errorDisplayed = true; 700 } 701 702 boolean firstRow = e.isFirstRow(); 704 aFirst.setEnabled(!firstRow); 705 aPrevious.setEnabled(!firstRow); 706 boolean lastRow = e.isLastRow(); 707 aNext.setEnabled(!lastRow); 708 aLast.setEnabled(!lastRow); 709 710 boolean changed = e.isChanged() || e.isInserting(); 712 boolean readOnly = m_curTab.isReadOnly(); 713 aIgnore.setEnabled(changed & !readOnly); 715 aSave.setEnabled(changed & !readOnly); 716 aNew.setEnabled(!changed & !readOnly); 718 aCopy.setEnabled(!changed & !readOnly); 719 aDelete.setEnabled(!changed & !readOnly); 720 aRefresh.setEnabled(!changed); 721 if (e.getTotalRows() == 0) 723 aNew.setEnabled(true); 724 725 aMulti.setPressed(!m_curGC.isSingleRow()); 727 728 if (isFirstTab()) 730 aHistory.setPressed(!m_curTab.isOnlyCurrentRows()); 731 732 String trxInfo = m_curTab.getTrxInfo(); 734 if (trxInfo != null) 735 statusBar.setInfo(trxInfo); 736 737 boolean canHaveAttachment = m_curTab.canHaveAttachment(); if (canHaveAttachment && e.isLoading() && m_curTab.getCurrentRow() > e.getLoadedRows()) 741 canHaveAttachment = false; 742 if (canHaveAttachment && m_curTab.getCurrentKeyID() == -1) canHaveAttachment = false; 744 if (canHaveAttachment) 745 { 746 aAttachment.setEnabled(true); 747 aAttachment.setPressed(m_curTab.hasAttachment()); 748 } 749 else 750 aAttachment.setEnabled(false); 751 if (m_isPersonalLock) 753 aLock.setPressed(m_curTab.isLocked()); 754 755 } 758 763 public void setStatusLine (String text, boolean error) 764 { 765 Log.trace(Log.l5_DData, "APanel.setStatusLine = " + text); 766 statusBar.setStatusLine(text, error); 767 } 769 773 private void setBusy (boolean busy) 774 { 775 m_isLocked = busy; 776 JFrame frame = Env.getFrame(this); 778 if (frame == null) return; 780 if (frame instanceof AWindow) 781 ((AWindow)frame).setBusy(busy); 782 if (busy) 784 { 785 this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); 787 frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); 788 } 789 else 790 { 791 this.setCursor(Cursor.getDefaultCursor()); 792 frame.setCursor(Cursor.getDefaultCursor()); 793 } 796 } 798 799 800 804 public void stateChanged (ChangeEvent e) 805 { 806 if (m_disposing) 807 return; 808 Log.trace(Log.l1_User, "APanel.stateChanged"); 809 setBusy(true); 810 811 VTabbedPane tp = (VTabbedPane)e.getSource(); 812 boolean back = false; 813 boolean isAPanelTab = false; 814 815 if (tp.isWorkbench()) 817 { 818 int WBIndex = tabPanel.getSelectedIndex(); 819 m_curWindowNo = m_mWorkbench.getWindowNo(WBIndex); 820 Log.trace(Log.l1_User, "APanel.stateChanged curWin=" + m_curWindowNo, "Win=" + tp); 822 if (tp.getSelectedComponent() instanceof JTabbedPane) 823 m_curWinTab = (JTabbedPane)tp.getSelectedComponent(); 824 else 825 throw new java.lang.IllegalArgumentException ("APanel.stateChanged - Window does not contain Tabs"); 826 if (m_curWinTab.getSelectedComponent() instanceof GridController) 827 m_curGC = (GridController)m_curWinTab.getSelectedComponent(); 828 else 831 throw new java.lang.IllegalArgumentException ("APanel.stateChanged - Window-Tab does not contain GridControler"); 832 m_curTabIndex = m_curWinTab.getSelectedIndex(); 834 } 835 else 836 { 837 Log.trace(Log.l1_User, "APanel.stateChanged", "Tab=" + tp); 839 m_curWinTab = tp; 840 int tpIndex = m_curWinTab.getSelectedIndex(); 841 back = tpIndex < m_curTabIndex; 842 GridController gc = null; 843 if (m_curWinTab.getSelectedComponent() instanceof GridController) 844 gc = (GridController)m_curWinTab.getSelectedComponent(); 845 else if (m_curWinTab.getSelectedComponent() instanceof APanelTab) 846 isAPanelTab = true; 847 else 848 throw new java.lang.IllegalArgumentException ("APanel.stateChanged - Tab does not contain GridControler"); 849 if (m_curGC != null) 851 { 852 m_curGC.stopEditor(true); 853 if (m_curTab.needSave(true, false)) 855 { if (m_curTab.needSave(true, true)) 857 { if (ADialog.ask(m_curWindowNo, this, "SaveChanges?", m_curTab.getCommitWarning())) 859 { if (!m_curTab.dataSave(true)) 861 { m_curWinTab.setSelectedIndex(m_curTabIndex); 863 setBusy(false); 864 return; 865 } 866 } 867 else m_curTab.dataIgnore(); 869 } 870 else m_curTab.dataIgnore(); 872 } } 874 if (m_curAPanelTab != null) 875 { 876 m_curAPanelTab.saveData(); 877 m_curAPanelTab.unregisterPanel(); 878 m_curAPanelTab = null; 879 } 880 881 m_curTabIndex = tpIndex; 886 if (!isAPanelTab) 887 m_curGC = gc; 888 } 889 890 if (isAPanelTab) 892 { 893 m_curAPanelTab = (APanelTab)m_curWinTab.getSelectedComponent(); 894 m_curAPanelTab.registerAPanel(this); 895 m_curAPanelTab.loadData(); 896 } 897 else { 899 m_curGC.activate(); 900 m_curTab = m_curGC.getMTab(); 901 902 if (back && m_curTab.isCurrent()) 904 m_curTab.dataRefresh(); 905 else m_curGC.query (m_onlyCurrentRows, m_onlyCurrentDays); 907 908 if (m_curTab.getRowCount() == 0) 910 { 911 if (!m_curTab.isReadOnly()) 913 { 914 Log.trace(Log.l3_Util, "APanel.stateChanged - no record - creating new"); 915 m_curTab.dataNew(false); 916 } 917 m_curTab.navigateCurrent(); m_curGC.dynamicDisplay(0); 919 } 920 else 921 m_curTab.navigateCurrent(); 922 } 923 924 aDetail.setEnabled(m_curTabIndex != m_curWinTab.getTabCount()-1); 926 aParent.setEnabled(m_curTabIndex != 0 && m_curWinTab.getTabCount() > 1); 927 928 if (m_mWorkbench.getMWindow(getWindowIndex()).isTransaction()) 930 aHistory.setEnabled(isFirstTab()); 931 else 932 { 933 aHistory.setPressed(false); 934 aHistory.setEnabled(false); 935 } 936 aPrint.setEnabled(m_curTab.isPrinted()); 938 aFind.setPressed(m_curTab.isQueryActive()); 940 941 if (isAPanelTab) 943 { 944 aMulti.setPressed(false); 945 aMulti.setEnabled(false); 946 } 947 else 948 { 949 aMulti.setEnabled(true); 950 aMulti.setPressed(!m_curGC.isSingleRow()); 951 } 952 aNew.setEnabled(!isAPanelTab); 954 aDelete.setEnabled(!isAPanelTab); 955 aFind.setEnabled(!isAPanelTab); 956 aRefresh.setEnabled(!isAPanelTab); 957 aAttachment.setEnabled(!isAPanelTab); 958 m_curWinTab.requestFocusInWindow(); 960 setBusy(false); 961 Log.trace(Log.l1_User, "APanel.stateChanged - fini"); 962 } 964 967 private void cmd_detail() 968 { 969 int index = m_curWinTab.getSelectedIndex(); 970 if (index == m_curWinTab.getTabCount()-1) 971 return; 972 m_curWinTab.setSelectedIndex(index+1); 973 } 975 978 private void cmd_parent() 979 { 980 int index = m_curWinTab.getSelectedIndex(); 981 if (index == 0) 982 return; 983 m_curWinTab.setSelectedIndex(index-1); 984 } 986 987 988 992 public void actionPerformed (ActionEvent e) 993 { 994 Log.trace(Log.l1_User, "APanel.actionPerformed", 995 e.getActionCommand() + " - " + e.getModifiers()); 996 if (m_disposing || isUILocked()) 998 return; 999 1000 m_lastModifiers = e.getModifiers(); 1001 String cmd = e.getActionCommand(); 1002 if (cmd.equals("ScreenShot")) 1004 { 1005 AEnv.actionPerformed (e.getActionCommand(), m_curWindowNo, this); 1006 return; 1007 } 1008 1009 setBusy (true); 1011 if (e.getSource() instanceof VButton) 1013 { 1014 actionButton((VButton)e.getSource()); 1015 setBusy(false); 1016 return; 1017 } 1018 1019 try 1020 { 1021 if (cmd.equals(aReport.getName())) 1023 cmd_report(e.getSource()); 1024 else if (cmd.equals(aPrint.getName())) 1025 cmd_print(e.getSource()); 1026 else if (cmd.equals(aEnd.getName())) 1027 cmd_end(false); 1028 else if (cmd.equals(aExit.getName())) 1029 cmd_end(true); 1030 else if (cmd.equals(aNew.getName())) 1032 cmd_new(false); 1033 else if (cmd.equals(aSave.getName())) 1034 cmd_save(true); 1035 else if (cmd.equals(aCopy.getName())) 1036 cmd_new(true); 1037 else if (cmd.equals(aDelete.getName())) 1038 cmd_delete(); 1039 else if (cmd.equals(aIgnore.getName())) 1040 cmd_ignore(); 1041 else if (cmd.equals(aRefresh.getName())) 1042 cmd_refresh(); 1043 else if (cmd.equals(aFind.getName())) 1044 cmd_find(); 1045 else if (m_isPersonalLock && cmd.equals(aLock.getName())) 1046 cmd_lock(); 1047 else if (cmd.equals(aAttachment.getName())) 1049 cmd_attachment(); 1050 else if (cmd.equals(aHistory.getName())) 1051 cmd_history(); 1052 else if (cmd.equals(aMulti.getName())) 1053 m_curGC.switchRowPresentation(); 1054 else if (cmd.equals(aFirst.getName())) 1056 { m_curTab.navigate(0);} 1057 else if (cmd.equals(aPrevious.getName())) 1058 { m_curTab.navigateRelative(-1);} 1059 else if (cmd.equals(aNext.getName())) 1060 { m_curTab.navigateRelative(+1);} 1061 else if (cmd.equals(aLast.getName())) 1062 { m_curTab.navigate(m_curTab.getRowCount()-1);} 1063 else if (cmd.equals(aParent.getName())) 1064 cmd_parent(); 1065 else if (cmd.equals(aDetail.getName())) 1066 cmd_detail(); 1067 else if (cmd.equals(aHelp.getName())) 1069 cmd_help(); 1070 else if (!AEnv.actionPerformed (e.getActionCommand(), m_curWindowNo, this)) 1072 Log.error("APanel.actionPerformed - No action for: " + cmd); 1073 } 1074 catch (Exception ex) 1075 { 1076 Log.error("APanel.actionPerformed", ex); 1077 String msg = ex.getMessage(); 1078 if (msg == null || msg.length() == 0) 1079 msg = ex.toString(); 1080 msg = Msg.parseTranslation(m_ctx, msg); 1081 ADialog.error(m_curWindowNo, this, "Error", msg); 1082 } 1083 m_curWinTab.requestFocusInWindow(); 1085 setBusy(false); 1086 } 1088 1092 private void cmd_new (boolean copy) 1093 { 1094 Log.trace(Log.l3_Util, "APanel.cmd_new - copy=" + copy); 1095 cmd_save(false); 1096 m_curTab.dataNew (copy); 1097 m_curGC.dynamicDisplay(0); 1098 } 1101 1104 private void cmd_delete() 1105 { 1106 if (m_curTab.isReadOnly()) 1107 return; 1108 int keyID = m_curTab.getCurrentKeyID(); 1109 if (ADialog.ask(m_curWindowNo, this, "DeleteRecord?")) 1110 if (m_curTab.dataDelete()) 1111 m_curGC.rowChanged(false, keyID); 1112 m_curGC.dynamicDisplay(0); 1113 } 1115 1120 private boolean cmd_save (boolean manualCmd) 1121 { 1122 if (m_curAPanelTab != null) 1123 manualCmd = false; 1124 Log.trace(Log.l3_Util, "APanel.cmd_save - Manual=" + manualCmd); 1125 m_errorDisplayed = false; 1126 m_curGC.stopEditor(true); 1127 boolean saveOK = true; 1128 1129 if (m_curAPanelTab != null) 1130 { 1131 m_curAPanelTab.saveData(); 1132 aSave.setEnabled(false); } 1134 1135 if (m_curTab.getCommitWarning().length() > 0 && m_curTab.needSave(true, false)) 1136 if (!ADialog.ask(m_curWindowNo, this, "SaveChanges?", m_curTab.getCommitWarning())) 1137 return false; 1138 1139 boolean retValue = m_curTab.dataSave(manualCmd); 1141 if (manualCmd && !retValue && !m_errorDisplayed) 1143 { 1144 ADialog.error(m_curWindowNo, this, "SaveIgnored"); 1145 setStatusLine(Msg.getMsg(m_ctx, "SaveIgnored"), true); 1146 } 1147 m_curGC.rowChanged(true, m_curTab.getCurrentKeyID()); 1148 if (manualCmd) 1149 m_curGC.dynamicDisplay(0); 1150 return retValue; 1151 } 1153 1156 private void cmd_ignore() 1157 { 1158 m_curGC.stopEditor(false); 1159 m_curTab.dataIgnore(); 1160 m_curGC.dynamicDisplay(0); 1161 } 1163 1166 private void cmd_refresh() 1167 { 1168 cmd_save(false); 1169 m_curTab.dataRefreshAll(); 1170 m_curGC.dynamicDisplay(0); 1171 } 1173 1177 private void cmd_report (Object source) 1178 { 1179 Log.trace(Log.l1_User, "APanel.cmd_report"); 1180 if (!MRole.getDefault().isCanReport(m_curTab.getAD_Table_ID())) 1181 { 1182 ADialog.error(m_curWindowNo, this, "AccessCannotReport"); 1183 return; 1184 } 1185 1186 cmd_save(false); 1187 1188 MQuery query = new MQuery(m_curTab.getTableName()); 1190 String link = m_curTab.getLinkColumnName(); 1192 if (link.length() == 0) 1194 link = m_curTab.getKeyColumnName(); 1195 String infoName = null; 1197 String infoDisplay = null; 1198 for (int i = 0; i < m_curTab.getFieldCount(); i++) 1199 { 1200 MField field = m_curTab.getField(i); 1201 if (field.isKey()) 1202 infoName = field.getHeader(); 1203 if ((field.getColumnName().equals("Name") || field.getColumnName().equals("DocumentNo") ) 1204 && field.getValue() != null) 1205 infoDisplay = field.getValue().toString(); 1206 if (infoName != null && infoDisplay != null) 1207 break; 1208 } 1209 if (link.length() != 0) 1210 { 1211 if (link.endsWith("_ID")) 1212 query.addRestriction(link, MQuery.EQUAL, 1213 new Integer (Env.getContextAsInt(m_ctx, m_curWindowNo, link)), 1214 infoName, infoDisplay); 1215 else 1216 query.addRestriction(link, MQuery.EQUAL, 1217 Env.getContext(m_ctx, m_curWindowNo, link), 1218 infoName, infoDisplay); 1219 } 1220 1221 { 1223 new AReport (m_curTab.getAD_Table_ID(), (JComponent)source, query); 1224 } 1225 { 1227 } 1229 } 1231 1235 private void cmd_print(Object source) 1236 { 1237 int AD_Process_ID = m_curTab.getAD_Process_ID(); 1239 Log.trace(Log.l1_User, "APanel.cmd_print - " + AD_Process_ID); 1240 1241 if (AD_Process_ID == 0) 1243 { 1244 cmd_report(source); 1245 return; 1246 } 1247 1248 cmd_save(false); 1249 int recordID = m_curTab.getCurrentKeyID(); 1251 ProcessInfo pi = new ProcessInfo (getTitle(), AD_Process_ID, recordID); 1252 1253 ProcessCtl.process(this, m_curWindowNo, pi); } 1256 1259 private void cmd_find() 1260 { 1261 if (m_curTab == null) 1262 return; 1263 cmd_save(false); 1264 Find find = new Find(Env.getFrame(this), m_curWindowNo, m_curTab); 1266 MQuery query = find.getQuery(); 1267 find = null; 1268 if (query != null) 1270 { 1271 m_onlyCurrentRows = false; m_curTab.setQuery(query); 1273 m_curGC.query(m_onlyCurrentRows, m_onlyCurrentDays); } 1275 aFind.setPressed(m_curTab.isQueryActive()); 1276 } 1278 1281 private void cmd_attachment() 1282 { 1283 Log.trace(Log.l1_User, "APanel.cmd_attachment"); 1284 int record_ID = m_curTab.getCurrentKeyID(); 1285 if (record_ID == -1) { 1287 aAttachment.setEnabled(false); 1288 return; 1289 } 1290 1291 Attachment va = new Attachment (Env.getFrame(this), m_curWindowNo, 1292 m_curTab.getAD_AttachmentID(), m_curTab.getAD_Table_ID(), record_ID); 1293 va.setVisible(true); 1294 m_curTab.loadAttachments(); aAttachment.setPressed(m_curTab.hasAttachment()); 1297 } 1299 1302 private void cmd_lock() 1303 { 1304 Log.trace(Log.l1_User, "APanel.cmd_lock - " + m_lastModifiers); 1305 if (!m_isPersonalLock) 1306 return; 1307 int record_ID = m_curTab.getCurrentKeyID(); 1308 if (record_ID == -1) return; 1310 if ((m_lastModifiers & InputEvent.CTRL_MASK) != 0) 1312 { 1313 new RecordAccessDialog(Env.getFrame(this), m_curTab.getAD_Table_ID(), record_ID); 1314 } 1315 else 1316 { 1317 m_curTab.lock (Env.getCtx(), record_ID, aLock.getButton().isSelected()); 1318 m_curTab.loadAttachments(); } 1320 aLock.setPressed(m_curTab.isLocked()); 1321 } 1323 1326 private void cmd_history() 1327 { 1328 Log.trace(Log.l1_User, "APanel.cmd_history"); 1329 if (m_mWorkbench.getMWindow(getWindowIndex()).isTransaction()) 1330 { 1331 if (m_curTab.needSave(true, true) && !cmd_save(false)) 1332 return; 1333 1334 Point pt = new Point (0, aHistory.getButton().getBounds().height); 1335 SwingUtilities.convertPointToScreen(pt, aHistory.getButton()); 1336 VOnlyCurrentDays ocd = new VOnlyCurrentDays(Env.getFrame(this), pt); 1337 m_onlyCurrentDays = ocd.getCurrentDays(); 1338 if (m_onlyCurrentDays == -1) { 1340 m_onlyCurrentRows = false; 1341 m_onlyCurrentDays = 1; 1342 } 1343 else 1344 m_onlyCurrentRows = true; 1345 Log.trace(Log.l4_Data, "APanel.cmd_history OnlyCurrent=" + m_onlyCurrentRows + ", Days=" + m_onlyCurrentDays); 1346 m_curGC.query(m_onlyCurrentRows, m_onlyCurrentDays); } 1348 } 1350 1353 private void cmd_help() 1354 { 1355 Log.trace(Log.l1_User, "CWindow.cmd_help"); 1356 Help hlp = new Help (Env.getFrame(this), this.getTitle(), m_mWorkbench.getMWindow(getWindowIndex())); 1357 hlp.show(); 1358 } 1360 1364 private void cmd_end (boolean exit) 1365 { 1366 boolean exitSystem = false; 1367 cmd_save(false); 1368 if (m_curAPanelTab != null) 1369 { 1370 m_curAPanelTab.unregisterPanel(); 1371 m_curAPanelTab = null; 1372 } 1373 1374 if (exit && ADialog.ask(m_curWindowNo, this, "ExitApplication?")) 1375 exitSystem = true; 1376 1377 Env.getFrame(this).dispose(); 1379 if (exitSystem) 1380 AEnv.exit(0); 1381 } 1383 1384 1385 1389 private void actionButton (VButton vButton) 1390 { 1391 Log.trace(Log.l1_User, "APanel.actionButton", vButton.toString()); 1392 1393 boolean startWOasking = false; 1394 String col = vButton.getColumnName(); 1395 1396 if (col.equals("Record_ID")) 1398 { 1399 int AD_Table_ID = Env.getContextAsInt (m_ctx, m_curWindowNo, "AD_Table_ID"); 1400 int Record_ID = Env.getContextAsInt (m_ctx, m_curWindowNo, "Record_ID"); 1401 boolean IsSOTrx = !"N".equals(Env.getContext(m_ctx, m_curWindowNo, "IsSOTrx")); 1402 String TableName = null; 1404 int AD_Window_ID = 0; 1405 String sql = "SELECT TableName, AD_Window_ID, PO_Window_ID FROM AD_Table WHERE AD_Table_ID=?"; 1406 try 1407 { 1408 PreparedStatement pstmt = DB.prepareStatement(sql); 1409 pstmt.setInt(1, AD_Table_ID); 1410 ResultSet rs = pstmt.executeQuery(); 1411 if (rs.next()) 1412 { 1413 TableName = rs.getString(1); 1414 AD_Window_ID = rs.getInt(2); 1415 if (!IsSOTrx && rs.getInt(3) != 0) AD_Window_ID = rs.getInt(3); 1417 } 1418 rs.close(); 1419 pstmt.close(); 1420 } 1421 catch (SQLException e) 1422 { 1423 Log.error ("GridController.startProcess-Zoom", e); 1424 } 1425 if (TableName == null || AD_Window_ID == 0) 1427 return; 1428 1429 Log.trace(Log.l1_User, "Zoom to - " + TableName 1430 + " - Record_ID=" + Record_ID + " (IsSOTrx=" + IsSOTrx + ")"); 1431 AWindow frame = new AWindow(); 1432 if (!frame.initWindow(AD_Window_ID, MQuery.getEqualQuery(TableName + "_ID", Record_ID), IsSOTrx)) 1433 return; 1434 AEnv.showCenterScreen(frame); 1435 frame = null; 1436 return; 1437 } 1439 if (m_curTab.needSave(true, false)) 1441 if (!cmd_save(true)) 1442 return; 1443 int record_ID = m_curTab.getCurrentKeyID(); 1445 if (record_ID == -1 && m_curTab.getKeyColumnName().endsWith("_ID")) 1446 { 1447 ADialog.error(m_curWindowNo, this, "SaveErrorRowNotFound"); 1448 return; 1449 } 1450 1451 if (col.equals("PaymentRule")) 1453 { 1454 VPayment vp = new VPayment(m_curWindowNo, m_curTab, vButton); 1455 if (vp.isInitOK()) vp.show(); 1457 vp.dispose(); 1458 } 1460 else if (col.equals("DocAction")) 1462 { 1463 VDocAction vda = new VDocAction(m_curWindowNo, m_curTab, vButton); 1464 if (vda.getNumberOfOptions() == 0) 1466 { 1467 vda.dispose (); 1468 return; 1469 } 1470 else 1471 { 1472 vda.show(); 1473 if (!vda.getStartProcess()) 1474 return; 1475 startWOasking = true; 1476 vda.dispose(); 1477 } 1478 } 1480 else if (col.equals("CreateFrom")) 1482 { 1483 VCreateFrom vcf = VCreateFrom.create (m_curTab); 1485 if (vcf != null) 1486 { 1487 if (vcf.isInitOK()) 1488 { 1489 vcf.show(); 1490 vcf.dispose(); 1491 m_curTab.dataRefresh(); 1492 } 1493 else 1494 vcf.dispose(); 1495 return; 1496 } 1497 } 1500 else if (col.equals("Posted") && MRole.getDefault().isShowAcct()) 1502 { 1503 String processed = Env.getContext(m_ctx, m_curWindowNo, "Processed"); 1505 if (!processed.equals("Y")) 1506 { 1507 ADialog.error(m_curWindowNo, this, "PostDocNotComplete"); 1508 return; 1509 } 1510 1511 Object ps = m_curTab.getValue("Posted"); 1513 if (ps != null && ps.equals("Y")) 1514 { 1515 new org.compiere.acct.AcctViewer (Env.getContextAsInt (m_ctx, m_curWindowNo, "AD_Client_ID"), 1516 m_curTab.getAD_Table_ID(), m_curTab.getCurrentKeyID()); 1517 } 1518 else 1519 { 1520 if (ADialog.ask(m_curWindowNo, this, "PostImmediate?")) 1521 { 1522 AEnv.postImmediate (m_curWindowNo, Env.getContextAsInt (m_ctx, m_curWindowNo, "AD_Client_ID"), 1523 m_curTab.getAD_Table_ID(), m_curTab.getCurrentKeyID(), true); 1524 m_curTab.dataRefresh(); 1525 } 1526 } 1527 return; 1528 } 1530 1533 1534 Log.trace(Log.l3_Util, "APanel.actionButton", "Process_ID=" + vButton.getProcess_ID()); 1535 if (vButton.getProcess_ID() == 0) 1536 return; 1537 if (m_curTab.needSave(true, false)) 1539 if (!cmd_save(true)) 1540 return; 1541 1542 if (!startWOasking && !(vButton.getDescription().equals("") && vButton.getHelp().equals(""))) 1544 if (!ADialog.ask(m_curWindowNo, this, "StartProcess?", vButton.getDescription() 1545 + "\n" + vButton.getHelp())) 1546 return; 1547 String title = vButton.getDescription(); 1549 if (title == null || title.length() == 0) 1550 title = vButton.getName(); 1551 ProcessInfo pi = new ProcessInfo (title, vButton.getProcess_ID(), record_ID); 1552 1553 ProcessCtl.process(this, m_curWindowNo, pi); } 1556 1557 1558 1563 public void lockUI (ProcessInfo pi) 1564 { 1565 setBusy(true); 1567 } 1569 1574 public void unlockUI (ProcessInfo pi) 1575 { 1576 Log.trace(Log.l5_DData, "APanel.unlockUI"); 1577 setBusy(false); 1578 if (pi != null) 1580 { 1581 m_curTab.dataRefresh(); 1583 m_curGC.dynamicDisplay(0); 1584 setStatusLine(pi.getSummary(), pi.isError()); 1586 ProcessInfoUtil.setLogFromDB(pi); 1588 String log = pi.getLogInfo(); 1589 if (log.length() > 0) 1590 ADialog.info(m_curWindowNo, this, Env.getHeader(m_ctx, m_curWindowNo), 1591 pi.getTitle(), log); } 1593 } 1595 1599 public boolean isUILocked() 1600 { 1601 return m_isLocked; 1602 } 1604 1609 public void executeASync (ProcessInfo pi) 1610 { 1611 Log.trace(Log.l3_Util, "APanel.executeASync"); 1612 } 1614 1618 public String toString() 1619 { 1620 String s = "APanel[curWindowNo=" + m_curWindowNo; 1621 if (m_mWorkbench != null) 1622 s += ",WB=" + m_mWorkbench.toString(); 1623 s += "]"; 1624 return s; 1625 } 1627} | Popular Tags |