public abstract class JPanelTicket extends JPanel implements JPanelView, TicketsEditor
- modifier implementation
- layout redesign
- flag separatePanelsOn to create separate panels for categories and products
- added option to show visor in TicketPane after close transaction
- added prinLastTicket button
- added Pay Note button (sacrificed up and down). Pay note requires to enter a receipt number. If this ticket is not fully paid the PaymentSelect panel will open.
- no customer display output for order tickets
- introduced method invokePaymentSelect
- parameter customer added to print script
- parent for ticketline must be explicitely set to avoid null pointer exceptions
- added customer discount
- set user before calling payment
- added receipt split
- added return to login option
Modifier and Type | Class and Description |
---|---|
class |
JPanelTicket.ScriptObject |
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
JPanelView.OperationMode
Modifier and Type | Field and Description |
---|---|
protected AppView |
m_App |
protected JPanelButtons |
m_jbtnconfig |
protected JButton |
m_jButtonSplit |
protected JNumberKeys |
m_jNumberKeys |
protected JLabel |
m_lblCustomer |
protected JLabel |
m_lblTicketId |
protected static Modifiers |
m_modifiers |
protected Ticket |
m_oTicket |
protected Object |
m_oTicketExt |
protected JTicketLines |
m_ticketlines |
protected JTicketsBag |
m_ticketsbag |
protected InactivityTimer |
m_timer |
protected User |
m_User |
protected UserView |
m_UserView |
protected boolean |
separatePanelsOn |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
JPanelTicket(AppView oApp,
UserView oUser)
Creates new form JTicketView
|
Modifier and Type | Method and Description |
---|---|
void |
activate() |
protected void |
addTicketLine(TicketLine oLine) |
protected void |
buttonTransition(Product prod) |
protected void |
catTransition(Category cat) |
void |
changeModifierAllLines(int oMask,
ModifierAction action) |
boolean |
deactivate() |
Ticket |
getActiveTicket() |
protected abstract JComponent |
getCatComponent(boolean regenerate) |
JComponent |
getComponent() |
Double |
getInputValue() |
protected abstract JTicketsBag |
getJTicketsBag() |
protected abstract Component |
getProdComponent() |
protected abstract Component |
getSouthComponent() |
protected void |
hideDisplay() |
protected boolean |
invokePaymentSelect() |
void |
printAuditTicket(TicketLine oLine,
Ticket oTicket,
String sAction,
String sresourcename)
If the 'Print Audit Receipt' option is set a receipt is printed whenever
an entry is written to the audit log (exception: com lines).
|
void |
printTicket(Ticket oTicket,
String sresourcename) |
void |
printTicket(Ticket oTicket,
String sresourcename,
Object params) |
void |
refreshView() |
void |
setActiveTicket(Ticket oTicket,
Object oTicketExt)
Makes a ticket and the associated ticketlines available for editing.
|
void |
setDirty(boolean dirty) |
void |
setFocus() |
void |
setModifiers(TicketLine oLine) |
void |
triggerAutoprint() |
boolean |
userChanged(String newuser) |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
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, setBackground, 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
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
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, 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, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getTitle
unhideTicketlines
protected JTicketLines m_ticketlines
protected static Modifiers m_modifiers
protected Ticket m_oTicket
protected Object m_oTicketExt
protected JTicketsBag m_ticketsbag
protected UserView m_UserView
protected User m_User
protected JPanelButtons m_jbtnconfig
protected AppView m_App
protected boolean separatePanelsOn
protected InactivityTimer m_timer
protected JButton m_jButtonSplit
protected JNumberKeys m_jNumberKeys
protected JLabel m_lblCustomer
protected JLabel m_lblTicketId
public void triggerAutoprint()
triggerAutoprint
in interface TicketsEditor
public void setDirty(boolean dirty)
setDirty
in interface TicketsEditor
protected abstract JTicketsBag getJTicketsBag()
protected abstract Component getSouthComponent()
protected abstract JComponent getCatComponent(boolean regenerate)
protected abstract Component getProdComponent()
public JComponent getComponent()
getComponent
in interface JPanelView
public void activate() throws BasicException
activate
in interface JPanelView
BasicException
public void refreshView()
refreshView
in interface JPanelView
refreshView
in interface TicketsEditor
public boolean deactivate()
deactivate
in interface JPanelView
public boolean userChanged(String newuser)
userChanged
in interface JPanelView
public void setActiveTicket(Ticket oTicket, Object oTicketExt)
setActiveTicket
in interface TicketsEditor
oTicket
- The ticket to be made the active ticket.oTicketExt
- Ticket extension, an object which is passed to the
script engine when printing the ticket.public Ticket getActiveTicket()
getActiveTicket
in interface TicketsEditor
public void setModifiers(TicketLine oLine)
setModifiers
in interface TicketsEditor
protected void addTicketLine(TicketLine oLine)
public Double getInputValue()
public void setFocus()
protected void buttonTransition(Product prod)
protected void catTransition(Category cat)
protected boolean invokePaymentSelect()
protected void hideDisplay()
public void printAuditTicket(TicketLine oLine, Ticket oTicket, String sAction, String sresourcename)
printAuditTicket
in interface TicketsEditor
oLine
- a ticketline or nulloTicket
- a ticket or nullsAction
- an action string will be passed to the templatesresourcename
- the template resource to be used for printingpublic void changeModifierAllLines(int oMask, ModifierAction action)
changeModifierAllLines
in interface TicketsEditor
Copyright © 2021. All rights reserved.