Native Canvas Painting and Refresh

Hi,
I have a project where I get live video from a firewire camera, and paint it to an awt Canvas natively using JNI. I need additional items painted on the canvas (on top of the video), like a pair of crosshairs and rulers to measure certain widths, etc. The software tracks an object moving across the screen, so the crosshairs need to be moved around and refreshed often.
I am getting a strange problem - the natively painted video is working just fine, but the painted objects are not refreshing properly. For example, instead of getting a crosshair that moves around the screen, I get a trail of crosshairs. And underneath the crosshairs, the video is refreshing just fine. What's going on? I'm using libXv, an X-windows extension to paint YUV4:2:2 camera buffers directly to the screen.
Here are relevant class snippets:
public class NativeCanvas extends Canvas{
    public void update(Graphics g)                 <-- overridden to eliminate flicker
        paint(g);
    public native void paint(Graphics g);         <-- here's the native video drawing function
public class CanvasWithOverlays extends NativeCanvas
    public void paint(Graphics g)
           super.paint();
           Graphics2D g2 = (Graphics2D)g;
           //(paint crosshairs, etc)
} Any help will be greatly appreciated. Thanks very much!
--Ismail Degani
High Energy Synchrotron Source
Cornell University

Hi,
I'm not sure how the crosshairs can be out of sync with the video stream - the canvas paint routines paint the video frame natively, and then paint the crosshairs. It's all sequential -
super.paint();    // goes into a native function XvPutImage that quickly blits the frame on screen
Graphics2D g2 = (Graphics2D)g;          
//(paint crosshairs, etc) This should work properly with the Event Queue, to the best of my knowledge. I schedule a TimerTask that continually calls the repaint() method to refresh the video:
public class LiveVideoPainter extends TimerTask
    static Logger logger = Logger.getLogger(LiveVideoPainter.class.getName());
    NativeCanvas nc;
    VideoDataSource vs;
    public LiveVideoPainter(NativeCanvas nc, VideoDataSource vs)
        if(nc == null)  {
            logger.error("The Native Canvas is null!");
            return;
        if(vs == null)  {
            logger.error("The Video Data Source is null!");
            return;
        this.nc = nc;
        this.vs = vs;
    public void run()
        vs.getFrame(nc.buffer);
        nc.repaint();
} I actually had this same problem when designing this application with C++ using the Qt windowing toolkit a year ago. Basically, if I called XvPutimage, and then called regular X drawing routines like XDrawLine etc in a loop, it would draw successfully, but never refresh properly:
while(true)
get_decompressed_frame(buf);
xv_image=XvCreateImage(display,info[0].base_id, XV_UYVY, (char*)buf, 1024, 768);
XvPutImage(display, info[0].base_id, window, gc, xv_image,
                   0,0,1024,768,
                   0,0, 1024,768);
if(crossHairDisplayed)
// Draw Horizontal CrossHair                                                                                                                                                           
            XDrawLine(display, window, gc,
                      0,   (int)(DataSource::pixPerMicron*DataSource :: crossY + DataSource::zcenY),
                      1024,(int)(DataSource::pixPerMicron*DataSource :: crossY + DataSource::zcenY));
            // Draw Vertical CrossHair                                                                                                                                                             
            XDrawLine(display, window, gc,
                      (int)(DataSource::pixPerMicron*DataSource :: crossX + DataSource::zcenX), 0,
                      (int)(DataSource::pixPerMicron*DataSource :: crossX + DataSource::zcenX) , 768);
}In this code bit, the crosshairs should move when the DataSource object changes member variables, line CrossX. But, the old crosshairs would not go away until the window was moved or resized. I'd get two crosshairs on the screen. I had to use a hack from the xwindows utility xrefresh everytime the crosshairs changed. It essentially simulated an x-window that opened over the Qt window, and then immediately closed. This worked well, but I thought I'd be free of that hack when I moved to java and JNI. Isn't this bizarre? Why would the window hold on to the old crosshair even when the varialbes change and there isn't any code that repaints it there after the video frame gets blitted?
hack adapted from xrefresh.c:
      if(newCrossHair)
                          Visual visual;
                  XSetWindowAttributes xswa;
                  Display *dpy;
                  unsigned long mask = 0;
                  int screen;
                  Window win;
                  if ((dpy = XOpenDisplay(NULL)) == NULL) {
                    fprintf (stderr, "unable to open display\n");
                    return;
                  screen = DefaultScreen (dpy);
                  xswa.background_pixmap = ParentRelative;
                  mask |= CWBackPixmap;
                  xswa.override_redirect = True;
                  xswa.backing_store = NotUseful;
                  xswa.save_under = False;
                  mask |= (CWOverrideRedirect | CWBackingStore | CWSaveUnder);
                  visual.visualid = CopyFromParent;
                  win = XCreateWindow(dpy, DefaultRootWindow(dpy), 400, 600, 1, 1,
                                      0, DefaultDepth(dpy, screen), InputOutput, &visual, mask, &xswa);
                  XMapWindow (dpy, win);
                  /* the following will free the color that we might have allocateded */
                  XCloseDisplay (dpy);
                  newCrossHair = false;
      } Any ideas? There's probably just some type of refresh call I need to use.
--Ismail                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Canvas, paint(), and FlowLayout/BoxLayout

    Has anyone encountered an error of paint() not being called when placed in a Container with a FlowLayout or a BoxLayout? This has been a recurring issue for me.
    {=^)                                                                                                                                                                                                                                                                                                                                               

    Anyone?
    {=^)                                                                                                                                                                                                                                                   

  • My back button and refresh button and my yahoo tool bar are dimmed a lot when I open up firefox. So as a result, I cannot use the back button nor my refresh button AND my yahoo toolbar disappears a lot. I have tried to get on your chat session but it is a

    <blockquote>Locked by Moderator as a duplicate/re-post.
    Please continue the discussion in this thread: [/forum/1/688252]
    Thanks - c</blockquote>
    == Issue
    ==
    I have another kind of problem with Firefox
    == Description
    ==
    My back button and refresh button and my yahoo tool bar are dimmed a lot when I open up firefox. So as a result, I cannot use the back button nor my refresh button AND my yahoo toolbar disappears a lot. I have tried to get on your chat session but it is always closed. I need one on one help. Please reply with resolution.
    == This happened
    ==
    Every time Firefox opened
    == two or three months ago
    ==
    == Firefox version
    ==
    3.6.3
    == Operating system
    ==
    Windows XP
    == User Agent
    ==
    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 (BT-canvas) Firefox/3.6.3 GTB7.0 (.NET CLR 3.5.30729)
    == Plugins installed
    ==
    *-npdnu
    *npdnupdater2
    *Coupons, Inc. Coupon Printer DLL
    *Coupons, Inc. Coupon Printer Plugin
    *The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.
    *6.0.12.448
    *RealPlayer(tm) LiveConnect-Enabled Plug-In
    *RealJukebox Netscape Plugin
    *Default Plug-in
    *Adobe PDF Plug-In For Firefox and Netscape "9.3.2"
    *BrowserPlus -- Improve your browser! -- http://browserplus.yahoo.com/
    *Shockwave Flash 10.0 r45
    *Yahoo Application State Plugin version 1.0.0.7
    *3.0.50106.0
    *My Web Search Plugin Stub for 32-bit Windows
    *Google Updater pluginhttp://pack.google.com/
    *Google Update
    *Next Generation Java Plug-in 1.6.0_20 for Mozilla browsers
    *Npdsplay dll

    * If the menu bar is hidden then press and hold the Alt key down, that should make the Menu bar appear (Firefox 3.6 on Windows) (see [[Menu bar is missing]]).
    * Make sure that you have the ''Navigation Toolbar'' and other toolbars visible: View > Toolbars .
    * If items are missing then see if you can find them in the View > Toolbars > Customize window.
    * If you see the item in the Customize window then drag it back from the Customize window to the Navigation toolbar.
    * If you do not see that item then click the Restore Default Set button in the View > Toolbars > Customize window.
    See also [[Back and forward or other toolbar buttons are missing]] and [[Navigation Toolbar items]]
    See http://kb.mozillazine.org/Toolbar_customization

  • HT4972 i am not getting notification on most of my apps, e.g twitter and facebook...except i go to the app and refreshed manually. its an iphone 4 and running on ios5...i have gone through everything and its still the same..help please........I seem to be

    i am not getting notification on most of my apps, e.g twitter and facebook...except i go to the app and refreshed manually. its an iphone 4 and running on ios5...i have gone through everything and its still the same..help please........
    I seem to be having the same problem on my brand new iPhone 4S. Everything was working fine on the phone until I updated to iOS 5.1.1, but now I no longer receive push notifications for the native Mail app, Instagram, or the Facebook app. I still seem to be receiving SMS texts and iMessages via push, but the aforementioned apps need to be opened before I can receive missed notifications (having them open in the background seems to make no difference).
    Thanks for any help that you may provide!

    did you try notifications under settings? You can customize it as per your requirement, for each application.
    check this out: http://www.gottabemobile.com/2011/10/12/ios-5-how-to-use-notification-center/ or http://reviews.cnet.com/8301-19512_7-20120625-233/ios-5-notifications-a-deeper-l ook/

  • Same EPM Excel Report takes time to open and refresh on 1 system while it opens and refreshes faster on other system

    Hi All ,
    I am facing an issue where the EPM Excel Templates on SERVER ROOT FOLDER take time to open on 1 system . It also takes great amount of time to REFRESH . While on an another system the same Report opens rather quickly and refreshes also quickly .
    Regards,
    SHUBHAM

    Hi Shubham,
    Now day excel problems are due to some MS update.  Not sure but  have a look at below note.
    2107965 - Issues in EPM Add-in after installing Microsoft updates

  • I am forced to hold shift and refresh the page on 99% of the sites I visit. How do I fix this from happening? If I don't the pages are missing style sheets and etc.

    When ever I go to sites they half load or are missing style sheets. If I view the source for the page and click on a style sheet link I get the following error:
    Content Encoding Error
    The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.
    If I hold shift and refresh the page loads as normal.
    It's happening on 99% of the sites I visit. I have disabled my plugins and add-ons.
    I do have some add-ons or plugins that I would like to remove completely but there is no uninstall or remove option, neither in regular or safe mode.

    '''I'm NOT buying a backup Computer till, Firefox will Run on Windows 8 !'''

  • Mavericks VPN dropouts with native VPN client and Cisco IPSec

    Since update to Maverics I am experiencing VPN dropouts with native VPN client and Cisco IPSec
    I am connecting via a WIFI router to a remote VPN server
    The conenction is good for a while but eventually it drops out.
    I had Zero issues in mountain lion and only have issues since the update to 10.9
    I had similar issues in teh past with an unrelaibel wifi router but i am using a Verizon Fios router and it has worked impecably until mavericks
    My thoughts are:
    1 -issue with mavericks  ( maybe the app sleep funciton affecting eithe VPN or WIFI daemons)
    2- Issue with  cisco router compaitibility or timing with Cisco IPSEC
    3- Issue with WIFI itself on mavericks - some sort of WIFI software bug
    Any thousuggestions?

    Since update to Maverics I am experiencing VPN dropouts with native VPN client and Cisco IPSec
    I am connecting via a WIFI router to a remote VPN server
    The conenction is good for a while but eventually it drops out.
    I had Zero issues in mountain lion and only have issues since the update to 10.9
    I had similar issues in teh past with an unrelaibel wifi router but i am using a Verizon Fios router and it has worked impecably until mavericks
    My thoughts are:
    1 -issue with mavericks  ( maybe the app sleep funciton affecting eithe VPN or WIFI daemons)
    2- Issue with  cisco router compaitibility or timing with Cisco IPSEC
    3- Issue with WIFI itself on mavericks - some sort of WIFI software bug
    Any thousuggestions?

  • Pages slow to load or do not load, then time out, sometimes stopping page from loading will reveal it or stopping and refreshing it, though not always.

    pages will not always load or take forever, if i stop it from loading and refresh it it may load right away though not always. It is like the old days @ 33K, never used to happen, basically have all the same plugins have always had.
    has been doing this for several months now, finally can't take it any more, all malware, virus, scans are clean, settings are the same for last ? years.
    do get script problems from time to time but not very often.
    loading say New egg, will take forever or will not completely load page, have backed up all bookmarks, etc: removed and reinstalled but no change.
    any Ideas would be of great help. I have been using Firefox, since it's inception and don't want to switch browsers.
    Thank You,
    Mark

    A possible cause is security software (firewall) that blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.
    Remove all rules for Firefox and the plugin-container from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox and the plugin-container process and the updater process.
    See:
    *https://support.mozilla.org/kb/Server+not+found
    *https://support.mozilla.org/kb/Firewalls

  • I just got the new itunes and I can open itunes and see my music but whenI try and go to the itunes store it just loads to a white page. I try and refresh and go to the home page and nothing happens. I can sign into my account and the tabs for the itunes

    I just got the new itunes and I can open itunes and see my music but whenI try and go to the itunes store it just loads to a white page. I try and refresh and go to the home page and nothing happens. I can sign into my account and the tabs for the itunes store pop up like they normally would when browsing the itunes store but when I click on one of them, it is a blank page. Is there a setting I need to change? Does it just take an extremely long time to load? Please help!!

    Bucktr09:
    I'm having the exact same problem.  I upgraded to the newest version of iTunes on my iMac and ever since I did the store is a blank white screen.  I can get my library content but the store is a no go.  Is there any one out there with a solution?

  • I have Photoshop CS6 Extended Students and Teachers Edition.  When I go into the Filter/Oil paint and try to use Oil paint a notice comes up "This feature requires graphics processor acceleration.  Please check Performance Preferences and verify that "Use

    I have Photoshop CS6 Extended Students and Teachers Edition.  when I go into the Filter/Oil paint and try to use Oil Paint a notice comes up "This feature requires graphics processor acceleration.  Please Check Performance Preferences and verify that "Use Graphics Processor" is enabled.  When I go into Performance Preferences I get a notice "No GPU available with Photoshop Standard.  Is there any way I can add this feature to my Photoshop either by purchasing an addition or downloading something?

    Does you display adapter have a supported  GPU with at least 512MB of Vram? And do you have the latest device drivers install with Open GL support.  Use CS6 menu Help>System Info... use its copy button and paste the information in here.

  • Looking for suggestions for a new display: What size, resolution and refresh is recommended?

    I've been using my laptop display, 15.6" and its just too small. I figured I'd purchase a display to plug into the laptop. I'd like suggestion on specs. I figured a 20 to 23 inch would work ok but I've seen some folks with dual screens. Lastly, I have no understanding of resoution, refresh rates to look for or brands to either look at or stay away from.
    Any help would be great.
    Thanks.

    The good news is that you don't need to worry too much about the specs -- just about any monitor you purchase will be OK.  First choose a size that fits in you work area, then pick the monitor from that range of products that has the highest resolution and refresh rates -- the monitors will all have very similar specs.
    I've been using PCConnection
    http://www.pcconnection.com/
    as my primary source for computer purchases for over 12 years and highly recommend it.  They have user's comments for most of their products, so you can get a feel for the satisfaction level of the products.
    I've never understood the value of having dual monitors, unless one needs to have a couple of real-time monitoring apps open at the same time for instant feedback about the data....
    Ken

  • ALV OO and refreshing the ALV grid

    Hi,
    i have some problems with my ALV 00 program.
    On screen 1 i have to fill in a material number.
    For that material i'm getting some data and show in screen 2 in a ALV grid.
    Via BACK-button i'm getting back to screen 1 and can fill in another material number.
    But the 2nd (and 3rd, etc) time i fill a material, the ALV grid data from material 1 is shown. Even if the internal table I_ALV where the data is, is changed.
    What should i do ?
    I have initialized the customer container and the grid, but that didn't solved the problem.
    regards,
    Hans

    Hi,
    Try clearing and refreshing the alv grid data table in screen 2.
    Check with this code. this code is working fine. If we go back and change the input, it is showing the output corresponding to the second input only.
    Have you use this method?
    <b> GR_ALVGRID->REFRESH_TABLE_DISPLAY</b>
    TYPE-POOLS : SLIS.
    * Tables                                                              *
    TABLES:
      VBRK,
      VBRP.
    * Parameters and select options OR SELECTION SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS:
                S_VBELN FOR VBRK-VBELN.
    SELECTION-SCREEN END OF BLOCK B1.
    * Internal Tables                                                     *
    * work areas
    DATA: BEGIN OF IT_VBRP OCCURS 0,
           VBELN LIKE VBRK-VBELN,
           POSNR LIKE VBRP-POSNR,
           UEPOS LIKE VBRP-UEPOS,
           FKIMG LIKE VBRP-FKIMG,
           NETWR LIKE VBRP-NETWR,
           MEINS LIKE VBRP-MEINS.
    DATA : END OF IT_VBRP.
    * Variables                                                           *
    DATA : GR_ALVGRID TYPE REF TO CL_GUI_ALV_GRID,
           GC_CUSTOM_CONTROL_NAME TYPE SCRFNAME VALUE 'CC_ALV',
           GR_CCONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
           GT_FIELDCAT TYPE LVC_T_FCAT,
           GS_LAYOUT TYPE LVC_S_LAYO,
           V_FLAG VALUE 'X'.
    * Start of Program                                                    *
    *       INITIALIZATION.                                               *
    INITIALIZATION.
      S_VBELN-LOW = 1.
      S_VBELN-HIGH = 1000000000.
      S_VBELN-OPTION = 'EQ'.
      S_VBELN-SIGN = 'I'.
      APPEND S_VBELN.
    *       SELECTION-SCREEN                                              *
    AT SELECTION-SCREEN.
      PERFORM VALIDATION.
    *       START-OF-SELECTION                                            *
    START-OF-SELECTION.
      PERFORM GET_DATA.
      CALL SCREEN 0100.
    *       END-OF-SELECTION                                              *
    END-OF-SELECTION.
    *       TOP-OF-PAGE                                                   *
    TOP-OF-PAGE.
    *       END-OF-PAGE                                                   *
    END-OF-PAGE.
    *       AT USER-COMMAND                                               *
    *&      Form  VALIDATION
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM VALIDATION .
      SELECT SINGLE VBELN
      FROM VBRK
      INTO VBRK-VBELN
      WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'no billing documents found'.
      ENDIF.
    ENDFORM.                    " VALIDATION
    *&      Form  GET_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM GET_DATA .
      SELECT VBELN
             POSNR
             UEPOS
             FKIMG
             NETWR
             MEINS
      FROM VBRP
      INTO TABLE IT_VBRP
      WHERE VBELN IN S_VBELN.
    ENDFORM.                    " GET_DATA
    *&      Module  DISPLAY_ALV  OUTPUT
    *       text
    MODULE DISPLAY_ALV OUTPUT.
      IF V_FLAG = 'X'.
        PERFORM DISPLAY_ALV.
        PERFORM PREPARE_FIELD_CATALOG CHANGING GT_FIELDCAT.
        PERFORM PREPARE_LAYOUT CHANGING GS_LAYOUT.
       CALL METHOD GR_ALVGRID->SET_TABLE_FOR_FIRST_DISPLAY
            EXPORTING
    *      I_BUFFER_ACTIVE               =
    *      I_BYPASSING_BUFFER            =
    *      I_CONSISTENCY_CHECK           =
    *      I_STRUCTURE_NAME              = 'VBRP'
    *      IS_VARIANT                    =
    *      I_SAVE                        =
    *      I_DEFAULT                     = 'X'
              IS_LAYOUT                     = GS_LAYOUT
    *      IS_PRINT                      =
    *      IT_SPECIAL_GROUPS             =
    *      IT_TOOLBAR_EXCLUDING          =
    *      IT_HYPERLINK                  =
    *      IT_ALV_GRAPHICS               =
    *      IT_EXCEPT_QINFO               =
            CHANGING
              IT_OUTTAB                     = IT_VBRP[]
              IT_FIELDCATALOG               = GT_FIELDCAT
    *      IT_SORT                       =
    *      IT_FILTER                     =
            EXCEPTIONS
              INVALID_PARAMETER_COMBINATION = 1
              PROGRAM_ERROR                 = 2
              TOO_MANY_LINES                = 3
              OTHERS                        = 4
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          CALL METHOD GR_ALVGRID->SET_READY_FOR_INPUT
            EXPORTING
              I_READY_FOR_INPUT = 1.
        ELSE.
          <b>CALL METHOD GR_ALVGRID->REFRESH_TABLE_DISPLAY
    *    EXPORTING
    *      IS_STABLE      =
    *      I_SOFT_REFRESH =
            EXCEPTIONS
              FINISHED       = 1
              OTHERS         = 2
          IF SY-SUBRC <> 0.
            MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                       WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.</b>
        ENDIF.
        CLEAR V_FLAG.
      ENDIF.
    ENDMODULE.                 " DISPLAY_ALV  OUTPUT
    *&      Form  DISPLAY_ALV
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM DISPLAY_ALV .
      IF GR_ALVGRID IS INITIAL.
        CREATE OBJECT GR_ALVGRID
          EXPORTING
    *    I_SHELLSTYLE      = 0
    *    I_LIFETIME        =
            I_PARENT          = GR_CCONTAINER
    *    I_APPL_EVENTS     = space
    *    I_PARENTDBG       =
    *    I_APPLOGPARENT    =
    *    I_GRAPHICSPARENT  =
    *    I_NAME            =
          EXCEPTIONS
            ERROR_CNTL_CREATE = 1
            ERROR_CNTL_INIT   = 2
            ERROR_CNTL_LINK   = 3
            ERROR_DP_CREATE   = 4
            OTHERS            = 5
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
    ENDFORM.                    " DISPLAY_ALV
    *&      Form  PREPARE_FIELD_CATALOG
    *       text
    *      <--P_GT_FIELDCAT  text
    FORM PREPARE_FIELD_CATALOG  CHANGING P_GT_FIELDCAT TYPE LVC_T_FCAT.
      DATA : LS_FCAT TYPE LVC_S_FCAT,
             L_POS TYPE I.
      L_POS = L_POS + 1.
      LS_FCAT-FIELDNAME = 'VBELN'.
      LS_FCAT-TABNAME = 'IT_VBRP'.
      LS_FCAT-COL_POS = L_POS.
      LS_FCAT-SCRTEXT_M = 'Billing Document'.
      LS_FCAT-OUTPUTLEN = '10'.
      APPEND LS_FCAT TO P_GT_FIELDCAT.
      CLEAR LS_FCAT.
      L_POS = L_POS + 1.
      LS_FCAT-FIELDNAME = 'POSNR'.
      LS_FCAT-TABNAME = 'IT_VBRP'.
      LS_FCAT-COL_POS = L_POS.
      LS_FCAT-SCRTEXT_M = 'Billing Item'.
      LS_FCAT-OUTPUTLEN = '6'.
      APPEND LS_FCAT TO P_GT_FIELDCAT.
      CLEAR LS_FCAT.
      L_POS = L_POS + 1.
      LS_FCAT-FIELDNAME = 'UEPOS'.
      LS_FCAT-TABNAME = 'IT_VBRP'.
      LS_FCAT-COL_POS = L_POS.
      LS_FCAT-SCRTEXT_M = 'Higher Level Item'.
      LS_FCAT-OUTPUTLEN = '6'.
      APPEND LS_FCAT TO P_GT_FIELDCAT.
      CLEAR LS_FCAT.
      L_POS = L_POS + 1.
      LS_FCAT-FIELDNAME = 'FKIMG'.
      LS_FCAT-TABNAME = 'IT_VBRP'.
      LS_FCAT-COL_POS = L_POS.
      LS_FCAT-SCRTEXT_M = 'Invoice Quantity'.
      LS_FCAT-OUTPUTLEN = '13'.
      APPEND LS_FCAT TO P_GT_FIELDCAT.
      CLEAR LS_FCAT.
      L_POS = L_POS + 1.
      LS_FCAT-FIELDNAME = 'NETWR'.
      LS_FCAT-TABNAME = 'IT_VBRP'.
      LS_FCAT-COL_POS = L_POS.
      LS_FCAT-SCRTEXT_M = 'Net Value'.
      LS_FCAT-OUTPUTLEN = '15'.
      APPEND LS_FCAT TO P_GT_FIELDCAT.
      CLEAR LS_FCAT.
      L_POS = L_POS + 1.
      LS_FCAT-FIELDNAME = 'MEINS'.
      LS_FCAT-TABNAME = 'IT_VBRP'.
      LS_FCAT-COL_POS = L_POS.
      LS_FCAT-SCRTEXT_M = 'Unit of Measure'.
      LS_FCAT-OUTPUTLEN = '3'.
      APPEND LS_FCAT TO P_GT_FIELDCAT.
      CLEAR LS_FCAT.
      L_POS = L_POS + 1.
    ENDFORM.                    " PREPARE_FIELD_CATALOG
    *&      Form  PREPARE_LAYOUT
    *       text
    *      <--P_GS_LAYOUT  text
    FORM PREPARE_LAYOUT  CHANGING P_GS_LAYOUT TYPE LVC_S_LAYO.
      P_GS_LAYOUT-ZEBRA = 'X'.
      P_GS_LAYOUT-GRID_TITLE = 'INVOICE DETAILS'.
      P_GS_LAYOUT-SMALLTITLE = 'X'.
      P_GS_LAYOUT-EDIT = 'X'.
    ENDFORM.                    " PREPARE_LAYOUT
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'CANCEL'.
    *  SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'CANCEL'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          CALL TRANSACTION 'SE38'.
        WHEN 'CHANGE'.
          IF GR_ALVGRID->IS_READY_FOR_INPUT( ) = 0.
            CALL METHOD GR_ALVGRID->SET_READY_FOR_INPUT
              EXPORTING
                I_READY_FOR_INPUT = 1.
          ELSE.
            CALL METHOD GR_ALVGRID->SET_READY_FOR_INPUT
              EXPORTING
                I_READY_FOR_INPUT = 0.
          ENDIF.
      ENDCASE.
    Regards,
    Aswin

  • When I click on a link the address does not display in the location bar in the new tab. Which makes the back/forward button and refresh buttons unable to be used

    When opening a link any link from firefox address does not display in the location bar. Even when navigating forward from there the address does not show back/forward button and refresh all rendered unable to be used

    Do you have that problem when running in the Firefox SafeMode? <br />
    [http://support.mozilla.com/en-US/kb/Safe+Mode] <br />
    ''Don't select anything right now, just use "Continue in SafeMode."''
    If not, see this: <br />
    [http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes]

  • Download and refresh button in Dashboard

    Hi,
    I have a chart report and table report in the same section of a dashboard. How to have a common Download and Refresh button at the end for both the reports. If I use the report links in both the "reports link" of teh report I get two sets and one is in the middle of the section. If I use the one in the end, it downloads only the second report. Is it possible to do both with one refresh and download, and how can it be done.
    Thanks for your time and help.

    If the table report and the chart report are completely different, then I don't know how you would do that (except for using the dashboard refresh button and the very bottom left of the dashboard page).
    But if they are of the same columns, you can create a pivot table to mimic a regular table and check the "chart pivoted results" to have a chart of that data. Then you will have only one refresh and download for both table and chart.

  • Blobs and refreshing the schema

    Hi all,
    I have two questions about Kodo 3.3.3.
    1) About blobs. A blob is the serialization fof an object. Does Kodo store
    the hashCode of the class (ir the serialVersionUID of the class) that was
    used to serialize the object ? Will I have a problem if I want to get back
    that blob with a recompiled version of that class, with a different
    serialVersionUID ?
    2) About the XML descriptors of the schema. I configured my mappingtool to
    write the XML descriptor of the my schema in the base, it works very fine.
    I can get these descriptor, class by class, with the command mappingtool
    -a export -f dump.xml package.jdo, it's very handy. From the
    documentation, I red that one can export this XML, edit it, import it back
    in the base, and refresh the schema
    (http://www.solarmetric.com/jdo/Documentation/3.3.3/docs/ref_guide_mapping_factory.html).
    My problem is : I cant find the command to perform this refresh, the
    schema is just not "synchronized" with the XML. Any hint ? :)
    Btw, I came across a bug using SQL Server : a field named "index"
    generated a column named "index", SQL Server was quite angry at that.
    Sorry if this one is know already.
    Thanks for your answers,
    Jos__

    1) About blobs. A blob is the serialization fof an object. Does Kodo store
    the hashCode of the class (ir the serialVersionUID of the class) that was
    used to serialize the object ? Will I have a problem if I want to get back
    that blob with a recompiled version of that class, with a different
    serialVersionUID ?Kodo just serializes the field value to a byte array using standard Java
    serialization. So yes, you will have problems if the serialVersionUID of the
    class changes. If you want more control over this process, you can create a
    custom DBDictionary that overrides the serialize() method. Or you can use a
    field of type byte[] and a byte-array mapping rather than a blob mapping, so
    that Kodo doesn't do any serialization.
    My problem is : I cant find the command to perform this refresh, the
    schema is just not "synchronized" with the XML. Any hint ? :)Use the schema tool to synchronize the schema with the XML. See:
    http://www.solarmetric.com/Software/Documentation/latest/docs/ref_guide_schema_schematool.html
    Btw, I came across a bug using SQL Server : a field named "index"
    generated a column named "index", SQL Server was quite angry at that.
    Sorry if this one is know already.Thanks. We'll make sure this is fixed in Kodo 3.3.4.

Maybe you are looking for