Adempiere 3.5.2a

org.compiere.apps
Class ConfirmPanel

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.ConfirmPanel
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public final class ConfirmPanel
extends CPanel

Application Confirm Panel. if (e.getActionCommand().equals(ConfirmPanel.A_OK))

Version:
$Id: ConfirmPanel.java,v 1.2 2006/07/30 00:51:27 jjanke Exp $
Author:
Jorg Janke
See Also:
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
static String A_CANCEL
          Action String Cancel
static String A_CUSTOMIZE
          Action String Customize
static String A_DELETE
          Action String Delete
static String A_EXPORT
          Action String Export
static String A_HELP
          Action String Help
static String A_HISTORY
          Action String History
static String A_NEW
          Action String New
static String A_OK
          Action String OK
static String A_PATTRIBUTE
          Action String PAttribute
static String A_PRINT
          Action String Print
static String A_PROCESS
          Action String Process
static String A_REFRESH
          Action String Refresh
static String A_RESET
          Action String Reset
static String A_ZOOM
          Action String Zoom
static Insets s_insets
          Standard Insets used
 
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
ConfirmPanel()
          Create Confirmation Panel with OK Button
ConfirmPanel(boolean withCancelButton)
          Create Confirmation Panel with OK and Cancel Button
ConfirmPanel(boolean withCancelButton, boolean withRefreshButton, boolean withResetButton, boolean withCustomizeButton, boolean withHistoryButton, boolean withZoomButton, boolean withText)
          Create Confirmation Panel with different buttons
 
Method Summary
 void addActionListener(ActionListener al)
          Add Action Listener if (e.getActionCommand().equals(ConfirmPanel.A_OK))
 JButton addButton(JButton button)
          Add Button to left side of confirmPanel
 CButton addButton(String action, String toolTipText, Icon icon)
          Add Button to left side of confirmPanel
 void addComponent(Component button)
          Add Button to left side of confirmPanel
static CButton createCancelButton(boolean withText)
          Create Cancel Button wlth Standard text
static CButton createCancelButton(String text)
          Create Cancel Button wlth label text and register ESC as KeyStroke
static CButton createCustomizeButton(boolean withText)
          Create Customize Button wlth Standard text
static CButton createCustomizeButton(String text)
          Create Customize Button wlth label text
static CButton createDeleteButton(boolean withText)
          Create Delete Button with Standard text
static CButton createDeleteButton(String text)
          Create Delete Button with label text - F3
static CButton createExportButton(boolean withText)
          Create Export Button wlth Standard text
static CButton createExportButton(String text)
          Create Export Button wlth label text
static CButton createHelpButton(boolean withText)
          Create Help Button wlth Standard text
static CButton createHelpButton(String text)
          Create Help Button wlth label text
static CButton createHistoryButton(boolean withText)
          Create History Button wlth Standard text
static CButton createHistoryButton(String text)
          Create History Button wlth label text
static CButton createNewButton(boolean withText)
          Create New Button with Standard text
static CButton createNewButton(String text)
          Create New Button with label text - F2
static CButton createOKButton(boolean withText)
          Create OK Button with Standard text
static CButton createOKButton(String text)
          Create OK Button with label text and F4 Shortcut
static CButton createPAttributeButton(boolean withText)
          Create Product Attribute Button with Standard text
static CButton createPAttributeButton(String text)
          Create Product Attribute Button with label text
static CButton createPrintButton(boolean withText)
          Create Print Button wlth Standard text
static CButton createPrintButton(String text)
          Create Print Button wlth label text
static CButton createProcessButton(boolean withText)
          Create Process Button wlth Standard text
static CButton createProcessButton(String text)
          Create Process Button wlth label text Shift-F4
static CButton createRefreshButton(boolean withText)
          Create Refresh Button wlth Standard text
static CButton createRefreshButton(String text)
          Create Refresh Button wlth label text and F5
static CButton createResetButton(boolean withText)
          Create Reset Button wlth Standard text
static CButton createResetButton(String text)
          Create Reset Button wlth label text
static CButton createZoomButton(boolean withText)
          Create Zoom Button wlth Standard text
static CButton createZoomButton(String text)
          Create Zoom Button wlth label text
 CButton getCancelButton()
          Get Cancel Button
 CButton getCustomizeButton()
          Get Customize Button
 CButton getHistoryButton()
          Get History Button
 CButton getOKButton()
          Get OK Button
 CButton getRefreshButton()
          Get Refresh Button
 CButton getResetButton()
          Get Reset Button
 CButton getZoomButton()
          Get Zoom Button
 boolean isCancelVisible()
          Is Cancel Visible
 boolean isOKVisible()
          Is OK Visible
 void setCancelVisible(boolean value)
          Show Cancel button
 void setEnabled(boolean enabled)
          Enable all components
 void setOKVisible(boolean value)
          Show OK button
 
Methods inherited from class org.compiere.swing.CPanel
getBackgroundColor, getTabLevel, setBackground, setBackgroundColor, setTabLevel, toString
 
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, 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

A_OK

public static final String A_OK
Action String OK

See Also:
Constant Field Values

A_CANCEL

public static final String A_CANCEL
Action String Cancel

See Also:
Constant Field Values

A_REFRESH

public static final String A_REFRESH
Action String Refresh

See Also:
Constant Field Values

A_RESET

public static final String A_RESET
Action String Reset

See Also:
Constant Field Values

A_CUSTOMIZE

public static final String A_CUSTOMIZE
Action String Customize

See Also:
Constant Field Values

A_HISTORY

public static final String A_HISTORY
Action String History

See Also:
Constant Field Values

A_ZOOM

public static final String A_ZOOM
Action String Zoom

See Also:
Constant Field Values

A_PROCESS

public static final String A_PROCESS
Action String Process

See Also:
Constant Field Values

A_PRINT

public static final String A_PRINT
Action String Print

See Also:
Constant Field Values

A_EXPORT

public static final String A_EXPORT
Action String Export

See Also:
Constant Field Values

A_HELP

public static final String A_HELP
Action String Help

See Also:
Constant Field Values

A_DELETE

public static final String A_DELETE
Action String Delete

See Also:
Constant Field Values

A_PATTRIBUTE

public static final String A_PATTRIBUTE
Action String PAttribute

See Also:
Constant Field Values

A_NEW

public static final String A_NEW
Action String New

See Also:
Constant Field Values

s_insets

public static Insets s_insets
Standard Insets used

Constructor Detail

ConfirmPanel

public ConfirmPanel()
Create Confirmation Panel with OK Button


ConfirmPanel

public ConfirmPanel(boolean withCancelButton)
Create Confirmation Panel with OK and Cancel Button

Parameters:
withCancelButton - with cancel

ConfirmPanel

public ConfirmPanel(boolean withCancelButton,
                    boolean withRefreshButton,
                    boolean withResetButton,
                    boolean withCustomizeButton,
                    boolean withHistoryButton,
                    boolean withZoomButton,
                    boolean withText)
Create Confirmation Panel with different buttons

Parameters:
withCancelButton - with cancel
withRefreshButton - with refresh
withResetButton - with reset
withCustomizeButton - with customize
withHistoryButton - with history
withZoomButton - with zoom
withText - with text
Method Detail

createOKButton

public static final CButton createOKButton(String text)
Create OK Button with label text and F4 Shortcut

Parameters:
text - text
Returns:
OK Button

createOKButton

public static final CButton createOKButton(boolean withText)
Create OK Button with Standard text

Parameters:
withText - with text
Returns:
OK Button

createCancelButton

public static final CButton createCancelButton(String text)
Create Cancel Button wlth label text and register ESC as KeyStroke

Parameters:
text - text
Returns:
Cancel Button

createCancelButton

public static final CButton createCancelButton(boolean withText)
Create Cancel Button wlth Standard text

Parameters:
withText - with text
Returns:
Button

createRefreshButton

public static final CButton createRefreshButton(String text)
Create Refresh Button wlth label text and F5

Parameters:
text - text
Returns:
button

createRefreshButton

public static final CButton createRefreshButton(boolean withText)
Create Refresh Button wlth Standard text

Parameters:
withText - with text
Returns:
Button

createResetButton

public static final CButton createResetButton(String text)
Create Reset Button wlth label text

Parameters:
text - text
Returns:
button

createResetButton

public static final CButton createResetButton(boolean withText)
Create Reset Button wlth Standard text

Parameters:
withText - with text
Returns:
Button

createCustomizeButton

public static final CButton createCustomizeButton(String text)
Create Customize Button wlth label text

Parameters:
text - text
Returns:
button

createCustomizeButton

public static final CButton createCustomizeButton(boolean withText)
Create Customize Button wlth Standard text

Parameters:
withText - with text
Returns:
Button

createHistoryButton

public static final CButton createHistoryButton(String text)
Create History Button wlth label text

Parameters:
text - text
Returns:
button

createHistoryButton

public static final CButton createHistoryButton(boolean withText)
Create History Button wlth Standard text

Parameters:
withText - with text
Returns:
Button

createZoomButton

public static final CButton createZoomButton(String text)
Create Zoom Button wlth label text

Parameters:
text - text
Returns:
button

createZoomButton

public static final CButton createZoomButton(boolean withText)
Create Zoom Button wlth Standard text

Parameters:
withText - with text
Returns:
Button

createProcessButton

public static final CButton createProcessButton(String text)
Create Process Button wlth label text Shift-F4

Parameters:
text - text
Returns:
button

createProcessButton

public static final CButton createProcessButton(boolean withText)
Create Process Button wlth Standard text

Parameters:
withText - with text
Returns:
Button

createPrintButton

public static final CButton createPrintButton(String text)
Create Print Button wlth label text

Parameters:
text - text
Returns:
button

createPrintButton

public static final CButton createPrintButton(boolean withText)
Create Print Button wlth Standard text

Parameters:
withText - with text
Returns:
Button

createHelpButton

public static final CButton createHelpButton(String text)
Create Help Button wlth label text

Parameters:
text - text
Returns:
Button

createHelpButton

public static final CButton createHelpButton(boolean withText)
Create Help Button wlth Standard text

Parameters:
withText - with text
Returns:
Button

createExportButton

public static final CButton createExportButton(String text)
Create Export Button wlth label text

Parameters:
text - text
Returns:
Button

createExportButton

public static final CButton createExportButton(boolean withText)
Create Export Button wlth Standard text

Parameters:
withText - with text
Returns:
Button

createDeleteButton

public static final CButton createDeleteButton(String text)
Create Delete Button with label text - F3

Parameters:
text - text
Returns:
Delete Button

createDeleteButton

public static final CButton createDeleteButton(boolean withText)
Create Delete Button with Standard text

Parameters:
withText - with text
Returns:
Delete Button

createPAttributeButton

public static final CButton createPAttributeButton(boolean withText)
Create Product Attribute Button with Standard text

Parameters:
withText - with text
Returns:
Product Attribute Button

createPAttributeButton

public static final CButton createPAttributeButton(String text)
Create Product Attribute Button with label text

Parameters:
text - text
Returns:
Product Attribute Button

createNewButton

public static final CButton createNewButton(boolean withText)
Create New Button with Standard text

Parameters:
withText - with text
Returns:
New Button

createNewButton

public static final CButton createNewButton(String text)
Create New Button with label text - F2

Parameters:
text - text
Returns:
Product Attribute Button

addComponent

public void addComponent(Component button)
Add Button to left side of confirmPanel

Parameters:
button - button

addButton

public CButton addButton(String action,
                         String toolTipText,
                         Icon icon)
Add Button to left side of confirmPanel

Parameters:
action - action command
toolTipText - tool tip text
icon - icon
Returns:
JButton

addButton

public JButton addButton(JButton button)
Add Button to left side of confirmPanel

Parameters:
button - button
Returns:
JButton

getOKButton

public CButton getOKButton()
Get OK Button

Returns:
OK Button

getCancelButton

public CButton getCancelButton()
Get Cancel Button

Returns:
Cancel Button

setOKVisible

public void setOKVisible(boolean value)
Show OK button

Parameters:
value - true for visible

isOKVisible

public boolean isOKVisible()
Is OK Visible

Returns:
true of OK visisble

setCancelVisible

public void setCancelVisible(boolean value)
Show Cancel button

Parameters:
value - trie for visible

isCancelVisible

public boolean isCancelVisible()
Is Cancel Visible

Returns:
true if Canvel is visible

getResetButton

public CButton getResetButton()
Get Reset Button

Returns:
Button

getCustomizeButton

public CButton getCustomizeButton()
Get Customize Button

Returns:
Button

getHistoryButton

public CButton getHistoryButton()
Get History Button

Returns:
Button

getZoomButton

public CButton getZoomButton()
Get Zoom Button

Returns:
Button

getRefreshButton

public CButton getRefreshButton()
Get Refresh Button

Returns:
Button

addActionListener

public void addActionListener(ActionListener al)
Add Action Listener if (e.getActionCommand().equals(ConfirmPanel.A_OK))

Parameters:
al - listener

setEnabled

public void setEnabled(boolean enabled)
Enable all components

Overrides:
setEnabled in class JComponent
Parameters:
enabled - trie if enabled

Adempiere 3.5.2a

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