Class DefaultActionHandler

java.lang.Object
org.jpedal.objects.acroforms.actions.DefaultActionHandler
All Implemented Interfaces:
ActionHandler

public class DefaultActionHandler extends Object implements ActionHandler
  • Field Summary

    Fields inherited from interface org.jpedal.objects.acroforms.actions.ActionHandler

    FOCUS_EVENT, MOUSECLICKED, MOUSEENTERED, MOUSEEXITED, MOUSEPRESSED, MOUSERELEASED, NOMESSAGE, REJECTKEY, STOPPROCESSING, TODO, VALUESCHANGED
  • Constructor Summary

    Constructors
    Constructor
    Description
    DefaultActionHandler(org.jpedal.examples.viewer.gui.SwingGUI viewerGUI)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    A(Object raw, FormObject formObj, int eventType)
    A action when pressed in active area ?some others should now be ignored?
    void
    Bl(Object e, FormObject formObj)
    Bl action when input focus lost, blur
    void
    C(FormObject formObj)
    C action when another field changes (recalculate this field) [javascript]
    NOT actually called as called from other other objects but here for completeness
    void
    changeTo(String file, int page, Object location, Integer type, boolean storeView)
    this calls the PdfDecoder to open a new page and change to the correct page and location on page, is any value is null, it means leave as is.
    void
    D(Object e, FormObject formObj)
    D action when cursor button pressed inside active area
    void
    E(Object e, FormObject formObj)
    E action when cursor enters active area
    void
    F(FormObject formObj)
    F the display formatting of the field (e.g 2 decimal places) [javascript]
    void
    Fo(Object e, FormObject formObj)
    Fo action on input focus
    org.jpedal.objects.layers.PdfLayerList
     
     
    int
    gotoDest(org.jpedal.objects.raw.PdfObject aData, int eventType, int command)
    public as also called from Viewer to reset
    void
    init(PdfDecoderInt decode_pdf, org.jpedal.objects.Javascript javascript, org.jpedal.objects.acroforms.AcroRenderer acrorend)
     
    int
    K(Object ex, FormObject formObj, int actionID)
    when user types a keystroke K action on - [javascript] keystroke in textfield or combobox modifys the list box selection (can access the keystroke for validity and reject or modify)
    void
    O(org.jpedal.objects.raw.PdfObject pdfObject, int type)
    O called when a page is opened
    void
    PC(org.jpedal.objects.raw.PdfObject pdfObject, int type)
    PC action when page is closed, action C from pages AA dic follows this
    void
    PI(org.jpedal.objects.raw.PdfObject pdfObject, int type)
    PI action when page no longer visible in viewer
    void
    PO(org.jpedal.objects.raw.PdfObject pdfObject, int type)
    PO action when page containing is opened, actions O of pages AA dic, and OpenAction in document catalog should be done first
    void
    PV(org.jpedal.objects.raw.PdfObject pdfObject, int type)
    PV action on viewing containing page
    setup hand cursor when hovering and reset, on exiting
    void
    U(Object e, FormObject formObj)
    U action when cursor button released inside active area
    void
    V(Object ex, FormObject formObj, int actionID)
    V action when fields value is changed [javascript], validate
    void
    X(Object e, FormObject formObj)
    X action when cursor exits active area

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DefaultActionHandler

      public DefaultActionHandler(org.jpedal.examples.viewer.gui.SwingGUI viewerGUI)
  • Method Details

    • init

      public void init(PdfDecoderInt decode_pdf, org.jpedal.objects.Javascript javascript, org.jpedal.objects.acroforms.AcroRenderer acrorend)
      Specified by:
      init in interface ActionHandler
    • setHoverCursor

      public Object setHoverCursor()
      Description copied from interface: ActionHandler
      setup hand cursor when hovering and reset, on exiting
      Specified by:
      setHoverCursor in interface ActionHandler
      Returns:
      hand cursor
    • A

      public void A(Object raw, FormObject formObj, int eventType)
      A action when pressed in active area ?some others should now be ignored?
      Specified by:
      A in interface ActionHandler
      Parameters:
      raw - Object contained by the action
      formObj - - Actual formObject containing data
      eventType - - type of event (Keystroke, focus)
    • gotoDest

      public int gotoDest(org.jpedal.objects.raw.PdfObject aData, int eventType, int command)
      public as also called from Viewer to reset

      new page or -1 returned

      Specified by:
      gotoDest in interface ActionHandler
      Parameters:
      aData - a data object carrying pdf details
      eventType - the type of event being executed
      command - the command being executed
      Returns:
      a new page if available else -1
    • changeTo

      public void changeTo(String file, int page, Object location, Integer type, boolean storeView)
      this calls the PdfDecoder to open a new page and change to the correct page and location on page, is any value is null, it means leave as is.
      Specified by:
      changeTo in interface ActionHandler
      Parameters:
      type - - the type of action
    • getPDFDecoder

      public PdfDecoderInt getPDFDecoder()
      Specified by:
      getPDFDecoder in interface ActionHandler
    • E

      public void E(Object e, FormObject formObj)
      E action when cursor enters active area
      Specified by:
      E in interface ActionHandler
      Parameters:
      e - Object contained by the action
      formObj - - Actual formObject containing data
    • X

      public void X(Object e, FormObject formObj)
      X action when cursor exits active area
      Specified by:
      X in interface ActionHandler
      Parameters:
      e - Object contained by the action
      formObj - - Actual formObject containing data
    • D

      public void D(Object e, FormObject formObj)
      D action when cursor button pressed inside active area
      Specified by:
      D in interface ActionHandler
      Parameters:
      e - Object contained by the action
      formObj - - Actual formObject containing data
    • U

      public void U(Object e, FormObject formObj)
      U action when cursor button released inside active area
      Specified by:
      U in interface ActionHandler
      Parameters:
      e - Object contained by the action
      formObj - - Actual formObject containing data
    • Fo

      public void Fo(Object e, FormObject formObj)
      Fo action on input focus
      Specified by:
      Fo in interface ActionHandler
      Parameters:
      e - Object contained by the action
      formObj - - Actual formObject containing data
    • Bl

      public void Bl(Object e, FormObject formObj)
      Bl action when input focus lost, blur
      Specified by:
      Bl in interface ActionHandler
      Parameters:
      e - Object contained by the action
      formObj - - Actual formObject containing data
    • O

      public void O(org.jpedal.objects.raw.PdfObject pdfObject, int type)
      O called when a page is opened
      Specified by:
      O in interface ActionHandler
      Parameters:
      pdfObject - - of the opening page
      type - - the type of action
    • PO

      public void PO(org.jpedal.objects.raw.PdfObject pdfObject, int type)
      PO action when page containing is opened, actions O of pages AA dic, and OpenAction in document catalog should be done first
      Specified by:
      PO in interface ActionHandler
      Parameters:
      pdfObject - - of the opening page
      type - - the type of action
    • PC

      public void PC(org.jpedal.objects.raw.PdfObject pdfObject, int type)
      PC action when page is closed, action C from pages AA dic follows this
      Specified by:
      PC in interface ActionHandler
      Parameters:
      pdfObject - - of the opening page
      type - - the type of action
    • PV

      public void PV(org.jpedal.objects.raw.PdfObject pdfObject, int type)
      PV action on viewing containing page
      Specified by:
      PV in interface ActionHandler
      Parameters:
      pdfObject - - of the opening page
      type - - the type of action
    • PI

      public void PI(org.jpedal.objects.raw.PdfObject pdfObject, int type)
      PI action when page no longer visible in viewer
      Specified by:
      PI in interface ActionHandler
      Parameters:
      pdfObject - - of the opening page
      type - - the type of action
    • K

      public int K(Object ex, FormObject formObj, int actionID)
      when user types a keystroke K action on - [javascript] keystroke in textfield or combobox modifys the list box selection (can access the keystroke for validity and reject or modify)
      Specified by:
      K in interface ActionHandler
      Parameters:
      ex - - Object contained by the action
      formObj - - Actual formObject containing data
      actionID - - integer value of the actionID
      Returns:
      the action
    • F

      public void F(FormObject formObj)
      F the display formatting of the field (e.g 2 decimal places) [javascript]
      Specified by:
      F in interface ActionHandler
      Parameters:
      formObj - - Actual formObject containing data
    • V

      public void V(Object ex, FormObject formObj, int actionID)
      V action when fields value is changed [javascript], validate
      Specified by:
      V in interface ActionHandler
      Parameters:
      ex - - Object contained by the action
      formObj - - Actual formObject containing data
      actionID - - integer value of the actionID
    • C

      public void C(FormObject formObj)
      C action when another field changes (recalculate this field) [javascript]
      NOT actually called as called from other other objects but here for completeness
      Specified by:
      C in interface ActionHandler
      Parameters:
      formObj - - Actual formObject containing data
    • getLayerHandler

      public org.jpedal.objects.layers.PdfLayerList getLayerHandler()
      Specified by:
      getLayerHandler in interface ActionHandler