Adempiere 3.5.2a

org.compiere.apps
Class APanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.compiere.swing.CPanel
                      extended by org.compiere.apps.APanel
All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, ChangeListener, DataStatusListener, ASyncProcess

public final class APanel
extends CPanel
implements DataStatusListener, ChangeListener, ActionListener, ASyncProcess

Main Panel of application window.

  Structure:
      (MenuBar) -> to be added to owning window
                northPanel  (ToolBar)
                tabPanel
                southPanel  (StatusBar)
  

Version:
$Id: APanel.java,v 1.4 2006/07/30 00:51:27 jjanke Exp $ Colin Rooney 2007/03/20 RFE#1670185 & related BUG#1684142 - Extend Sec to Info Queries
Author:
Jorg Janke, Teo Sarca, SC ARHIPAC SERVICE SRL
  • BF [ 1824621 ] History button can't be canceled
  • BF [ 1941271 ] VTreePanel is modifying even if is save wasn't successfull
  • BF [ 1996056 ] Report error message is not displayed
  • BF [ 1998575 ] Document Print is discarding any error, victor.perez@e-evolution.com
  • See Also:
    [ 1966328 ] New Window Info to MRP and CRP into View http://sourceforge.net/tracker/index.php?func=detail&aid=1966328&group_id=176962&atid=879335, Serialized Form

    Nested Class Summary
     
    Nested classes/interfaces inherited from class javax.swing.JPanel
    JPanel.AccessibleJPanel
     
    Nested classes/interfaces inherited from class javax.swing.JComponent
    JComponent.AccessibleJComponent
     
    Nested classes/interfaces inherited from class java.awt.Container
    Container.AccessibleAWTContainer
     
    Nested classes/interfaces inherited from class java.awt.Component
    Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
     
    Field Summary
     AppsAction aIgnore
              Ignore Button
     AppsAction aLock
              Private Lock Button
     AppsAction aSave
              Save Button
     
    Fields inherited from class javax.swing.JComponent
    accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
     
    Fields inherited from class java.awt.Component
    BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
     
    Fields inherited from interface java.awt.image.ImageObserver
    ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
     
    Constructor Summary
    APanel(AWindow window)
               
    APanel(GridController gc, int windowNo)
              Constructs a new instance.
     
    Method Summary
     void actionPerformed(ActionEvent e)
              Action Listener
     boolean cmd_save(boolean manualCmd)
              If required ask if you want to save and save it
     void dataStatusChanged(DataStatusEvent e)
              Data Status Listener (row change) ^ | v
     void dispose()
              Dispose
     void executeASync(ProcessInfo pi)
              Method to be executed async.
     GridTab getCurrentTab()
              Get Current Tab
     Image getImage()
              Get Window Image
     JMenuBar getMenuBar()
              Return MenuBar
     int getSelectedTabIndex()
              Get the selected tab index of the panels JTabbedPane.
     String getSelectedTabName()
              Get the name of the selected tab in the panels JTabbedPane.
     String getTitle()
              Get Title of Window
     int getWindowNo()
              Get Current Window No
     boolean initPanel(int AD_Workbench_ID, int AD_Window_ID, MQuery query)
              Dynamic Panel Initialization - either single window or workbench.
     boolean isNested()
               
     boolean isUILocked()
              Is the UI locked (Internal method)
     void lockUI(ProcessInfo pi)
              Lock User Interface.
     int noOfTabs()
              Get the number of tabs in the panels JTabbedPane.
     void setSelectedTabIndex(int index)
              Set the tab index of the panels JTabbedPane.
     void setStatusLine(String text, boolean error)
              Set Status Line to text
     void stateChanged(ChangeEvent e)
              Change Listener - (tab change) <->
     String toString()
              String representation
     void unlockUI(ProcessInfo pi)
              Unlock User Interface.
     
    Methods inherited from class org.compiere.swing.CPanel
    getBackgroundColor, getTabLevel, setBackground, setBackgroundColor, setTabLevel
     
    Methods inherited from class javax.swing.JPanel
    getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
     
    Methods inherited from class javax.swing.JComponent
    addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
     
    Methods inherited from class java.awt.Container
    add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
     
    Methods inherited from class java.awt.Component
    action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
     

    Field Detail

    aIgnore

    public AppsAction aIgnore
    Ignore Button


    aSave

    public AppsAction aSave
    Save Button


    aLock

    public AppsAction aLock
    Private Lock Button

    Constructor Detail

    APanel

    public APanel(GridController gc,
                  int windowNo)
    Constructs a new instance. Need to call initPanel for dynamic initialization


    APanel

    public APanel(AWindow window)
    Method Detail

    dispose

    public void dispose()
    Dispose


    getMenuBar

    public JMenuBar getMenuBar()
    Return MenuBar

    Returns:
    JMenuBar

    getTitle

    public String getTitle()
    Get Title of Window

    Returns:
    String with Title

    initPanel

    public boolean initPanel(int AD_Workbench_ID,
                             int AD_Window_ID,
                             MQuery query)
    Dynamic Panel Initialization - either single window or workbench.
      either
      - Workbench tabPanel    (VTabbedPane)
          - Tab               (GridController)
      or
      - Workbench tabPanel    (VTabbedPane)
          - Window            (VTabbedPane)
              - Tab           (GridController)
      
    tabPanel

    Parameters:
    AD_Workbench_ID - if > 0 this is a workbench, AD_Window_ID ignored
    AD_Window_ID - if not a workbench, Window ID
    query - if not a Workbench, Zoom Query - additional SQL where clause
    Returns:
    true if Panel is initialized successfully

    getWindowNo

    public int getWindowNo()
    Get Current Window No

    Returns:
    win no

    getImage

    public Image getImage()
    Get Window Image

    Returns:
    image or null

    dataStatusChanged

    public void dataStatusChanged(DataStatusEvent e)
    Data Status Listener (row change) ^ | v

    Specified by:
    dataStatusChanged in interface DataStatusListener
    Parameters:
    e - event

    setStatusLine

    public void setStatusLine(String text,
                              boolean error)
    Set Status Line to text

    Parameters:
    text - clear text
    error - error flag

    stateChanged

    public void stateChanged(ChangeEvent e)
    Change Listener - (tab change) <->

    Specified by:
    stateChanged in interface ChangeListener
    Parameters:
    e - event

    actionPerformed

    public void actionPerformed(ActionEvent e)
    Action Listener

    Specified by:
    actionPerformed in interface ActionListener
    Parameters:
    e - event

    cmd_save

    public boolean cmd_save(boolean manualCmd)
    If required ask if you want to save and save it

    Parameters:
    manualCmd - true if invoked manually (i.e. force)
    Returns:
    true if saved

    lockUI

    public void lockUI(ProcessInfo pi)
    Lock User Interface. Called from the Worker before processing

    Specified by:
    lockUI in interface ASyncProcess
    Parameters:
    pi - process info

    unlockUI

    public void unlockUI(ProcessInfo pi)
    Unlock User Interface. Called from the Worker when processing is done

    Specified by:
    unlockUI in interface ASyncProcess
    Parameters:
    pi - of execute ASync call

    isUILocked

    public boolean isUILocked()
    Is the UI locked (Internal method)

    Specified by:
    isUILocked in interface ASyncProcess
    Returns:
    true, if UI is locked

    executeASync

    public void executeASync(ProcessInfo pi)
    Method to be executed async. Called from the ASyncProcess worker

    Specified by:
    executeASync in interface ASyncProcess
    Parameters:
    pi - process info

    getCurrentTab

    public GridTab getCurrentTab()
    Get Current Tab

    Returns:
    current tab

    noOfTabs

    public int noOfTabs()
    Get the number of tabs in the panels JTabbedPane.

    Returns:
    no of tabs in the JTabbedPane of the panel

    getSelectedTabIndex

    public int getSelectedTabIndex()
    Get the selected tab index of the panels JTabbedPane.

    Returns:
    selected index of JTabbedPane

    setSelectedTabIndex

    public void setSelectedTabIndex(int index)
    Set the tab index of the panels JTabbedPane.


    getSelectedTabName

    public String getSelectedTabName()
    Get the name of the selected tab in the panels JTabbedPane.

    Returns:
    name of selected tab

    toString

    public String toString()
    String representation

    Overrides:
    toString in class CPanel
    Returns:
    String representation

    isNested

    public boolean isNested()

    Adempiere 3.5.2a

    Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.