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 StringA_CANCELAction String Cancelstatic StringA_CUSTOMIZEAction String Customizestatic StringA_DELETEAction String Deletestatic StringA_EXPORTAction String Exportstatic StringA_HELPAction String Helpstatic StringA_HISTORYAction String Historystatic StringA_NEWAction String Newstatic StringA_OKAction String OKstatic StringA_PATTRIBUTEAction String PAttributestatic StringA_PRINTAction String Printstatic StringA_PROCESSAction String Processstatic StringA_REFRESHAction String Refreshstatic StringA_RESETAction String Resetstatic StringA_ZOOMAction String Zoomstatic Insetss_insetsStandard 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 voidaddActionListener(ActionListener al)Add Action Listenerif (e.getActionCommand().equals(ConfirmPanel.A_OK))CButtonaddButton(String action, String toolTipText, Icon icon)Add Button to left side of confirmPanelJButtonaddButton(JButton button)Add Button to left side of confirmPanelvoidaddComponent(Component button)Add Button to left side of confirmPanelstatic CButtoncreateCancelButton(boolean withText)Create Cancel Button wlth Standard textstatic CButtoncreateCancelButton(String text)Create Cancel Button wlth label text and register ESC as KeyStrokestatic CButtoncreateCustomizeButton(boolean withText)Create Customize Button wlth Standard textstatic CButtoncreateCustomizeButton(String text)Create Customize Button wlth label textstatic CButtoncreateDeleteButton(boolean withText)Create Delete Button with Standard textstatic CButtoncreateDeleteButton(String text)Create Delete Button with label text - F3static CButtoncreateExportButton(boolean withText)Create Export Button wlth Standard textstatic CButtoncreateExportButton(String text)Create Export Button wlth label textstatic CButtoncreateHelpButton(boolean withText)Create Help Button wlth Standard textstatic CButtoncreateHelpButton(String text)Create Help Button wlth label textstatic CButtoncreateHistoryButton(boolean withText)Create History Button wlth Standard textstatic CButtoncreateHistoryButton(String text)Create History Button wlth label textstatic CButtoncreateNewButton(boolean withText)Create New Button with Standard textstatic CButtoncreateNewButton(String text)Create New Button with label text - F2static CButtoncreateOKButton(boolean withText)Create OK Button with Standard textstatic CButtoncreateOKButton(String text)Create OK Button with label text and F4 Shortcutstatic CButtoncreatePAttributeButton(boolean withText)Create Product Attribute Button with Standard textstatic CButtoncreatePAttributeButton(String text)Create Product Attribute Button with label textstatic CButtoncreatePrintButton(boolean withText)Create Print Button wlth Standard textstatic CButtoncreatePrintButton(String text)Create Print Button wlth label textstatic CButtoncreateProcessButton(boolean withText)Create Process Button wlth Standard textstatic CButtoncreateProcessButton(String text)Create Process Button wlth label text Shift-F4static CButtoncreateRefreshButton(boolean withText)Create Refresh Button wlth Standard textstatic CButtoncreateRefreshButton(String text)Create Refresh Button wlth label text and F5static CButtoncreateResetButton(boolean withText)Create Reset Button wlth Standard textstatic CButtoncreateResetButton(String text)Create Reset Button wlth label textstatic CButtoncreateZoomButton(boolean withText)Create Zoom Button wlth Standard textstatic CButtoncreateZoomButton(String text)Create Zoom Button wlth label textCButtongetCancelButton()Get Cancel ButtonCButtongetCustomizeButton()Get Customize ButtonCButtongetHistoryButton()Get History ButtonCButtongetOKButton()Get OK ButtonCButtongetRefreshButton()Get Refresh ButtonCButtongetResetButton()Get Reset ButtonCButtongetZoomButton()Get Zoom ButtonbooleanisCancelVisible()Is Cancel VisiblebooleanisOKVisible()Is OK VisiblevoidsetCancelVisible(boolean value)Show Cancel buttonvoidsetEnabled(boolean enabled)Enable all componentsvoidsetOKVisible(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:
setEnabledin classJComponent- Parameters:
enabled- trie if enabled
-
-