Package org.tn5250j

Class SessionPanel

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      class  SessionPanel.TNRubberBand
      RubberBanding end code
      • Nested classes/interfaces inherited from class javax.swing.JPanel

        javax.swing.JPanel.AccessibleJPanel
      • Nested classes/interfaces inherited from class javax.swing.JComponent

        javax.swing.JComponent.AccessibleJComponent
      • Nested classes/interfaces inherited from class java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected KeyboardHandler keyHandler  
      protected SessionPanel.TNRubberBand rubberband  
      protected SessionConfig sesConfig  
      protected Session5250 session  
      • 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
    • Method Summary

      Modifier and Type Method Description
      void actionAttributes()
      Show the session attributes screen for modification of the attribute/ settings of the session.
      void actionCopy()
      Copy and Paste start code
      void actionSpool()  
      void addEmulatorActionListener​(EmulatorActionListener listener)
      Add a EmulatorActionListener to the listener list.
      void addSessionJumpListener​(SessionJumpListener listener)
      Add a SessionJumpListener to the listener list.
      void addSessionListener​(SessionListener listener)
      Add a SessionListener to the listener list.
      void areaBounded​(RubberBand band, int x1, int y1, int x2, int y2)  
      boolean canDrawRubberBand​(RubberBand b)  
      void closeDown()  
      boolean confirmCloseSession​(boolean reallyclose)  
      void connect()  
      void crossHair()
      coming up: Change to be mnemonic key.
      void disconnect()  
      void doKeyBoundArea​(java.awt.event.KeyEvent ke, java.lang.String last)
      This routine allows areas to be bounded by using the keyboard
      void executeMacro​(java.awt.event.ActionEvent ae)  
      void executeMacro​(java.lang.String macro)  
      protected void fireEmulatorAction​(int action)
      Notify all registered listeners of the onEmulatorAction event.
      java.lang.String getAllocDeviceName()  
      Rect getBoundingArea()  
      void getBoundingArea​(java.awt.Rectangle bounds)  
      java.awt.Rectangle getDrawingBounds()  
      java.awt.Graphics getDrawingGraphics()
      Returns a pointer to the graphics area that we can draw on
      void getFocusForMe()  
      java.lang.String getHostName()  
      int getPosFromView​(int x, int y)  
      Screen5250 getScreen()  
      Session5250 getSession()  
      java.lang.String getSessionName()  
      tnvt getVT()  
      boolean isConnected()  
      boolean isFocusTraversable()  
      boolean isHotSpots()  
      boolean isMacroRunning()  
      boolean isManagingFocus()  
      boolean isOnSignOnScreen()  
      boolean isSessionRecording()  
      boolean isStopMacroRequested()  
      void nextSession()  
      void onConfigChanged​(SessionConfigEvent configEvent)
      Update the configuration settings
      void onSessionChanged​(SessionChangeEvent changeEvent)  
      protected void paintComponent​(java.awt.Graphics g)  
      void prevSession()  
      void printMe()
      This routine is responsible for setting up a PrinterJob on this component and initiating the print session.
      void processKeyEvent​(java.awt.event.KeyEvent evt)  
      void removeEmulatorActionListener​(EmulatorActionListener listener)
      Remove a EmulatorActionListener from the listener list.
      void removeSessionJumpListener​(SessionJumpListener listener)
      Remove a SessionJumpListener from the listener list.
      void removeSessionListener​(SessionListener listener)
      Remove a SessionListener from the listener list.
      void sendScreenEMail()  
      void setMacroRunning​(boolean mr)  
      protected void setRubberBand​(SessionPanel.TNRubberBand newValue)  
      void setRunningHeadless​(boolean headless)  
      void setSession​(Session5250 session)  
      void setStopMacroRequested()  
      void startDuplicateSession()  
      void startNewSession()  
      protected void startRecordingMe()  
      protected void stopRecordingMe()  
      protected java.util.Vector<java.lang.Double> sumThem​(boolean which)
      Sum them
      void toggleConnection()
      Toggles connection (connect or disconnect)
      void toggleDebug()  
      void toggleHotSpots()  
      java.awt.Point translateEnd​(java.awt.Point end)  
      java.awt.Point translateStart​(java.awt.Point start)  
      void update​(java.awt.Graphics g)  
      • 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, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, 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
      • 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, 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, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • SessionPanel

        public SessionPanel​(Session5250 session)
    • Method Detail

      • setRunningHeadless

        public void setRunningHeadless​(boolean headless)
      • processKeyEvent

        public void processKeyEvent​(java.awt.event.KeyEvent evt)
        Overrides:
        processKeyEvent in class javax.swing.JComponent
      • sendScreenEMail

        public void sendScreenEMail()
      • doKeyBoundArea

        public void doKeyBoundArea​(java.awt.event.KeyEvent ke,
                                   java.lang.String last)
        This routine allows areas to be bounded by using the keyboard
        Parameters:
        ke - key event
        last - last
      • confirmCloseSession

        public boolean confirmCloseSession​(boolean reallyclose)
        Parameters:
        reallyclose - TRUE if session/tab should be closed; FALSE, if only ask for confirmation
        Returns:
        True if closed; False if still open
      • getFocusForMe

        public void getFocusForMe()
      • isFocusTraversable

        public boolean isFocusTraversable()
        Overrides:
        isFocusTraversable in class java.awt.Component
      • isManagingFocus

        public boolean isManagingFocus()
        Overrides:
        isManagingFocus in class javax.swing.JComponent
      • getVT

        public tnvt getVT()
      • toggleDebug

        public void toggleDebug()
      • startNewSession

        public void startNewSession()
      • startDuplicateSession

        public void startDuplicateSession()
      • toggleConnection

        public void toggleConnection()
        Toggles connection (connect or disconnect)
      • nextSession

        public void nextSession()
      • prevSession

        public void prevSession()
      • fireEmulatorAction

        protected void fireEmulatorAction​(int action)
        Notify all registered listeners of the onEmulatorAction event.
        Parameters:
        action - The action to be performed.
      • isMacroRunning

        public boolean isMacroRunning()
      • isStopMacroRequested

        public boolean isStopMacroRequested()
      • isSessionRecording

        public boolean isSessionRecording()
      • setMacroRunning

        public void setMacroRunning​(boolean mr)
      • setStopMacroRequested

        public void setStopMacroRequested()
      • closeDown

        public void closeDown()
      • actionAttributes

        public void actionAttributes()
        Show the session attributes screen for modification of the attribute/ settings of the session.
      • actionSpool

        public void actionSpool()
      • executeMacro

        public void executeMacro​(java.awt.event.ActionEvent ae)
      • executeMacro

        public void executeMacro​(java.lang.String macro)
      • stopRecordingMe

        protected void stopRecordingMe()
      • startRecordingMe

        protected void startRecordingMe()
      • getDrawingBounds

        public java.awt.Rectangle getDrawingBounds()
      • paintComponent

        protected void paintComponent​(java.awt.Graphics g)
        Overrides:
        paintComponent in class javax.swing.JComponent
      • update

        public void update​(java.awt.Graphics g)
        Overrides:
        update in class javax.swing.JComponent
      • isHotSpots

        public boolean isHotSpots()
      • toggleHotSpots

        public void toggleHotSpots()
      • crossHair

        public void crossHair()
        coming up: Change to be mnemonic key. This toggles the ruler line.
      • actionCopy

        public final void actionCopy()
        Copy and Paste start code
      • sumThem

        protected final java.util.Vector<java.lang.Double> sumThem​(boolean which)
        Sum them
        Parameters:
        which - formatting option to use
        Returns:
        vector string of numeric values
      • printMe

        public final void printMe()
        This routine is responsible for setting up a PrinterJob on this component and initiating the print session.
      • addSessionJumpListener

        public void addSessionJumpListener​(SessionJumpListener listener)
        Add a SessionJumpListener to the listener list.
        Parameters:
        listener - The SessionListener to be added
      • removeSessionJumpListener

        public void removeSessionJumpListener​(SessionJumpListener listener)
        Remove a SessionJumpListener from the listener list.
        Parameters:
        listener - The SessionJumpListener to be removed
      • addEmulatorActionListener

        public void addEmulatorActionListener​(EmulatorActionListener listener)
        Add a EmulatorActionListener to the listener list.
        Parameters:
        listener - The EmulatorActionListener to be added
      • removeEmulatorActionListener

        public void removeEmulatorActionListener​(EmulatorActionListener listener)
        Remove a EmulatorActionListener from the listener list.
        Parameters:
        listener - The EmulatorActionListener to be removed
      • getDrawingGraphics

        public java.awt.Graphics getDrawingGraphics()
        Returns a pointer to the graphics area that we can draw on
        Specified by:
        getDrawingGraphics in interface RubberBandCanvasIF
      • getBoundingArea

        public Rect getBoundingArea()
      • getPosFromView

        public int getPosFromView​(int x,
                                  int y)
      • getBoundingArea

        public void getBoundingArea​(java.awt.Rectangle bounds)
      • setSession

        public void setSession​(Session5250 session)
      • isConnected

        public boolean isConnected()
      • isOnSignOnScreen

        public boolean isOnSignOnScreen()
      • getAllocDeviceName

        public java.lang.String getAllocDeviceName()
      • getHostName

        public java.lang.String getHostName()
      • connect

        public void connect()
      • disconnect

        public void disconnect()
      • addSessionListener

        public void addSessionListener​(SessionListener listener)
        Add a SessionListener to the listener list.
        Parameters:
        listener - The SessionListener to be added
      • removeSessionListener

        public void removeSessionListener​(SessionListener listener)
        Remove a SessionListener from the listener list.
        Parameters:
        listener - The SessionListener to be removed