Package org.compiere.apps
Class ConfirmPanel
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- org.compiere.swing.CPanel
-
- 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
Fields Modifier and Type Field Description static String
A_CANCEL
Action String Cancelstatic String
A_CUSTOMIZE
Action String Customizestatic String
A_DELETE
Action String Deletestatic String
A_EXPORT
Action String Exportstatic String
A_HELP
Action String Helpstatic String
A_HISTORY
Action String Historystatic String
A_NEW
Action String Newstatic String
A_OK
Action String OKstatic String
A_PATTRIBUTE
Action String PAttributestatic String
A_PRINT
Action String Printstatic String
A_PROCESS
Action String Processstatic String
A_REFRESH
Action String Refreshstatic String
A_RESET
Action String Resetstatic String
A_ZOOM
Action String Zoomstatic Insets
s_insets
Standard Insets used-
Fields inherited from class javax.swing.JComponent
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
accessibleContext, 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
Constructors Constructor Description ConfirmPanel()
Create Confirmation Panel with OK ButtonConfirmPanel(boolean withCancelButton)
Create Confirmation Panel with OK and Cancel ButtonConfirmPanel(boolean withCancelButton, boolean withRefreshButton, boolean withResetButton, boolean withCustomizeButton, boolean withHistoryButton, boolean withZoomButton, boolean withText)
Create Confirmation Panel with different buttons
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addActionListener(ActionListener al)
Add Action Listenerif (e.getActionCommand().equals(ConfirmPanel.A_OK))
CButton
addButton(String action, String toolTipText, Icon icon)
Add Button to left side of confirmPanelJButton
addButton(JButton button)
Add Button to left side of confirmPanelvoid
addComponent(Component button)
Add Button to left side of confirmPanelstatic CButton
createCancelButton(boolean withText)
Create Cancel Button wlth Standard textstatic CButton
createCancelButton(String text)
Create Cancel Button wlth label text and register ESC as KeyStrokestatic CButton
createCustomizeButton(boolean withText)
Create Customize Button wlth Standard textstatic CButton
createCustomizeButton(String text)
Create Customize Button wlth label textstatic CButton
createDeleteButton(boolean withText)
Create Delete Button with Standard textstatic CButton
createDeleteButton(String text)
Create Delete Button with label text - F3static CButton
createExportButton(boolean withText)
Create Export Button wlth Standard textstatic CButton
createExportButton(String text)
Create Export Button wlth label textstatic CButton
createHelpButton(boolean withText)
Create Help Button wlth Standard textstatic CButton
createHelpButton(String text)
Create Help Button wlth label textstatic CButton
createHistoryButton(boolean withText)
Create History Button wlth Standard textstatic CButton
createHistoryButton(String text)
Create History Button wlth label textstatic CButton
createNewButton(boolean withText)
Create New Button with Standard textstatic CButton
createNewButton(String text)
Create New Button with label text - F2static CButton
createOKButton(boolean withText)
Create OK Button with Standard textstatic CButton
createOKButton(String text)
Create OK Button with label text and F4 Shortcutstatic CButton
createPAttributeButton(boolean withText)
Create Product Attribute Button with Standard textstatic CButton
createPAttributeButton(String text)
Create Product Attribute Button with label textstatic CButton
createPrintButton(boolean withText)
Create Print Button wlth Standard textstatic CButton
createPrintButton(String text)
Create Print Button wlth label textstatic CButton
createProcessButton(boolean withText)
Create Process Button wlth Standard textstatic CButton
createProcessButton(String text)
Create Process Button wlth label text Shift-F4static CButton
createRefreshButton(boolean withText)
Create Refresh Button wlth Standard textstatic CButton
createRefreshButton(String text)
Create Refresh Button wlth label text and F5static CButton
createResetButton(boolean withText)
Create Reset Button wlth Standard textstatic CButton
createResetButton(String text)
Create Reset Button wlth label textstatic CButton
createZoomButton(boolean withText)
Create Zoom Button wlth Standard textstatic CButton
createZoomButton(String text)
Create Zoom Button wlth label textCButton
getCancelButton()
Get Cancel ButtonCButton
getCustomizeButton()
Get Customize ButtonCButton
getHistoryButton()
Get History ButtonCButton
getOKButton()
Get OK ButtonCButton
getRefreshButton()
Get Refresh ButtonCButton
getResetButton()
Get Reset ButtonCButton
getZoomButton()
Get Zoom Buttonboolean
isCancelVisible()
Is Cancel Visibleboolean
isOKVisible()
Is OK Visiblevoid
setCancelVisible(boolean value)
Show Cancel buttonvoid
setEnabled(boolean enabled)
Enable all componentsvoid
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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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, 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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
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 cancelwithRefreshButton
- with refreshwithResetButton
- with resetwithCustomizeButton
- with customizewithHistoryButton
- with historywithZoomButton
- with zoomwithText
- 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 commandtoolTipText
- tool tip texticon
- 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 Listenerif (e.getActionCommand().equals(ConfirmPanel.A_OK))
- Parameters:
al
- listener
-
setEnabled
public void setEnabled(boolean enabled)
Enable all components- Overrides:
setEnabled
in classJComponent
- Parameters:
enabled
- trie if enabled
-
-