JTextPane custom views keyboard problem

Hi,
I am trying to implement a custom view in the JTextPane. The view is appearing fine but the keyboard cursor movements are not working. The cursor no longer moves from line to line as it used to when using the arrow keys. However Iam able to move from the end of 1 line to the start of next line. This is when I override section view with my custom view.
In another case, when I override paragraph view, then the cursor size is equal to the paragraph height and I get a tall cursor the size of the paragraph. I can no longer navigate the lines in the paragraph.
Could someone tell me why this is happening.
cheers,
Hugo
My views are setup as follows:
     class XmlViewFactory implements ViewFactory {
          // Creates the XML View.
          public View create(Element elem) {
                 String kind = elem.getName();
            if (kind.equals(AbstractDocument.ContentElementName)) {
                             return new LabelView(elem);
                     else if (kind.equals(AbstractDocument.ParagraphElementName)) {                     
                               return new ParagraphView(elem);
                     } else if (kind.equals(AbstractDocument.SectionElementName)) {
                          return new ResponseView(elem);                         //  <-------     my custom view
          //                return new BoxView(elem, View.Y_AXIS);
                     } else if (kind.equals(StyleConstants.ComponentElementName)) {
                         return new ComponentView(elem);
                     } else if (kind.equals(StyleConstants.IconElementName)) {
                         return new IconView(elem);
                return new LabelView(elem);             

Hi,
Here's an update to my earlier question.
The problem happend to be not with any custom views as earlier mentioned. The following usage doesn't work.
  if (kind.equals(AbstractDocument.ContentElementName)) {
                  return new LabelView(context, elem);
              else
              if (kind.equals(AbstractDocument.ParagraphElementName)) {
                        return new ParagraphView(elem);
              } else if (kind.equals(AbstractDocument.SectionElementName)) {
                   return new BoxView(elem, View.Y_AXIS);
              } else if (kind.equals(StyleConstants.ComponentElementName)) {
                  return new ComponentView(elem);
              } else if (kind.equals(StyleConstants.IconElementName)) {
                  return new IconView(elem);
           return new LabelView( context, elem);even when no custom view is involved. I get a blank JTextPane.
cheers
OV

Similar Messages

  • Custom view with NSProgressIndicator in NSMenuItem

    I have a couple problems with custom view in NSMenuItem.
    First - view is 'blocking' mouse and keyboard events for NSMenuItem.
    I've found code for mouse events:
    - (void)mouseUp:(NSEvent*)event {
    NSMenuItem* mitem = [self enclosingMenuItem];
    NSMenu* m = [mitem menu];
    [m cancelTracking];
    [m performActionForItemAtIndex:[m indexOfItem:mitem]];
    It works just fine. What about keyboard events?
    I've tried - (void)keyUp:(NSEvent *)theEvent and - (void)keyDown:(NSEvent *)theEvent but these methods seem to be never called.
    Or is there a method to 'forward' all events to view's parent?
    Second - setHidden on NSMenuItem doesn't hide my custom view. setHidden on both - NSMenuItem and it's view make them invisible, but there is blank space left (other NSMenuItems hide 'normal') - what to do with it?
    Third - on custom view there is NSProgressIndicator. If it's animation is starting when menu is open - everything is fine, it's animating. But when menu is closed and than opened again there is no animation. I've read in documentation, that method - (void)viewDidMoveToWindow is perfect place to start animation, but when I do something like - (void)viewDidMoveToWindow {
    [progress startAnimation:self];
    } the method is called, but there is no animation. How to get the animation started every time the view is visible?

    ok. I dont't know why (most likely because of my crappy english ;]) but we can't understand each other ;]
    there is no problem with a shortcut. I haven't set and even think about a shortcut yet ;] forget about a shortcut
    what is my problem - when I higlight 'normal' menu item and press return/enter - metod attached to it is invoken, just like with mouse click. normal situation with navigating through normal menu using keyboard.
    No problem with that - creating NSMenuItem, connecting with IBAction - everything works great.
    BUT
    setting custom view for NSMenuItem = problems.
    mouse clicking - ok, find how to get this work
    enter/return click - no idea, not working.
    maybe this will clear a little bit my problem - sample project with instruction, just run it: http://cl.ly/0d2d844808be5f181934

  • Unable to populate the Custom Views on UI for the component BP_FACTSHEET

    Hi All,
    I am working on a requirement on Interaction Center 7.0 .In this i have enhanced the component BP_FACTSHEET and created new Custom views in it. But i am unable to bring those custom views on the UI. As, we know that in this component there is no concept of overview set also.
    So, if anyone has faced the same problem please share your inputs.
    Thanks in advance,
    Thanks and Regards,
    Sharad

    Hi Sarad,
                       First you have to enhance the component BP_FACTSHHET .After that configure ur coustom view in fachsheet id BP_ACCOUNT_FS in SPRO.After that go to component BSP_DLC_FS,where you have to configure the ur view in specfic tiles which is display in web ui for specific to business roll.here you can find the ur fachsheet id and custom view.this component is automatically call when you launch fachsheet in web ui for specific business partner under account tab.
    Thanks
    Vishwas Sahu

  • Create a Custom View in Project Server 2010 that is Visible in MS Project

    Hello All,
    We want our PMs to consistently report Physical % Complete, but couldn't find an existing "Status" or "EVM" view.  So, in Project Server 2010, using Server Settings > Look and Feel > Manage Views, I created a customized project
    view using existing fields (no customized fields, if that matters).  The problem is that I cannot find the view when I open MS Project.  Under Manage Views, in the Format View section, I have selected "Gantt Chart (Views)" for the Gantt
    Chart format field.  The view defaulted to "Timesheet" for the Grouping format field.  Under the Security Categories section, I have selected My Projects and My Tasks.  I have not applied a Filter.  Any ideas why I cannot find
    this new custom view in MS Project?  
    Was I supposed to create the new customized view directly in MS Project?  If so, where would I find the steps to do that?  Thank you!
    Julie

    Julie --
    Nice try, my friend.  Your only mistake was trying to create the Microsoft Project view in PWA.  You have to open the Enterprise Global for editing in Microsoft Project, and then create the custom view and table in the Enterprise Global. To
    open the Enterprise Global for editing, click File > Info > Manage Enterprise Global.  When you finish creating the custom view and table, then save, close, and check in the Enterprise Global file, and then exit Microsoft Project completely.
    The next time you or any of your PMs launch Microsoft Project and connect to Project Server, the custom view and table will be visible for every current and future project.  Hope this helps.
    Dale A. Howard [MVP]

  • SharePoint 2013 Community Site Discussion List Custom View Issue

    I need to create a custom view to show the discussions updated in the past 7 days and ordered by most replies.  I have created a custom view based on the subject view and included the following columns:
    Body
    Category
    Last Updated
    Modified By
    Replies
    Subject (linked to item
    the problem is that when you click on the subject link, it does not return that discussion.  We get the message that There are no items to show in this view.
    This happens even if I use the Flat or Threaded view option when creating a custom view.

    You haven't most probably set the "Folders" property when setting up the view. Go to Folders property and set Show this view: In the top-level folder. Also, in Sort property select Replies column and set it to Show items in descending
    order and in Filters property set Last Updated column "is less than or equal to" [Today]+7
    Nadeem Yousuf

  • Redirect editform.aspx to custom view instead of the default?

    Hello everyone!
    I'm another unfortunate admin who has been handed some developer tasks and I am struggling with what is probably a simple process that requires your help.
    I have a sharepoint list called "tickets".  On this list I have created multiple filtered/grouped views of the items in the list for separate groups of users (these views are linked to from their respective sharepoint sites elsewhere in the
    collection).
    My problem is that when a user edits one of these list items using the editform and SAVES the user is taken back to the default list view instead of the custom view I created for each group of users.
    I strongly suspect I can do something like this:
    http://site/lists/listname/editform.aspx?Source=http://site/list/listname/viewname.aspx
    ...but I cant figure out where to go in sharepoint (2010 server) or sharepoint designer to add the re-direct.
    Any help would be greatly appreciated!

    Hi Logan,
    Using out of box feature or share point designer this functionality is not possible so what you can do, write your custom edit form and on click of save button you can check logged in user and his or her presence in the group which you created for multiple
    views and redirect to associated view for those group. 
    Regards
    Soni K

  • Protected Flex field and Custom Views

    Hi,
    I have created some project variables in oracle bpm 11.1.1.6.0 project.After deployment, these variables are coming as Protected flex field but for some reason these are not visible when I define custom views.
    I also tried creating Protected flex field on BPm workspace, mapped these variables to human task payload, yet again when creating custom view i cannot see them.
    This problem is only happening with protected flex field and not public flex field.
    Please let me know how to add protected flex fields in custom view.
    Regards...

    why do you think it's an apps question?

  • Creating Customized Views in bpm/workspace

    Hi All,
    I'm going to create a customized view in http://<host>:<port>/bpm/workspace ..
    I was able to create one view for the first user and that Human task user are defined in the 'Organization' Lane Users.
    Then next user comes based on the output of the first user.
    Human task is created and and opened the <secondUser>.task file in bpm jdeveloper project and went to the 'Assignment' section and Edit the user as below,
    Type - Single
    Build a list of participants using - Names and Expressions
    Add the user variable using Expression ..
    Once I assigned to a task for a user(2nd Level) , I can see instance in his Inbox.
    But not in his view. (Customized view.. )
    Once I remove above configurations and assign the Lane Users it populates.
    What will be the Problem ???
    Where to assign the user and how can I populate tha customized view with this scenario??
    Thanks,
    nir
    Any suggestions PLEASE ....
    Edited by: Nir on May 14, 2013 9:38 PM

    Hi 814056
    Thanks for your reply..
    Yes. The problem is all these users are belongs to same group but they should not see each others tasks.
    i.e. Managing Directors of different subsidiaries in one organization.
    They should not see each others tasks, but they are having same interface. Having separate groups for each SBU is impossible since we are having more than 50 subsidiaries.
    Thanks,
    Nir

  • Custom View not visible in Overview page as AB unless "Reset to Default"

    Hi Experts,
    I am facing a strange issue here.
    I enhanced the component TPMOE and created a custom view ZTRADESPENDEXCEPTION in it.
    Now i have added this view as assignment block in all 6 configuration available for the overview page.
    I have redefined the DETACH_STATIC_OVW_VIEWS and REATTACH_STATIC_OVW_VIEWS.
    The issue i am facing is that my view assignment block is not visible to the user unless he/she goes to the personalization of the overview page and hits "Reset to Default". Once this is done, later on users can change there personalizations and everything works fine.
    Now i am not sure i can go and tell all end users to go to personalization of the TPMOE overview page and click on "Reset to Default".
    Is there any other way i can show my view to the end users?
    I have done this on the lines of overview page layout changing when you select product planning basis while creating Trade Promotions.
    Thanks and Regards
    Gaurav Kumar Raghav

    Hi Amar,
    My coding is given below.
    In DETACH_STATIC_OVW_VIEWS, the coding is:
    Call Super Method
    ls_viewid-view_id = '<My View Name>'.
    Append ls_viewid to rt_view_id
    In REATTACH_STATIC_OVW_VIEWS, the coding is:
    Call Super Method
    if <flag>  = 'X'.
    ls_viewid-view_id = '<My View Name>'.
    Append ls_viewid to rt_return.
    endif.
    In debug mode, the coding get executed correctly and my view is returned for attachement.
    For each user, the first time, i need to say "Reset to Default".
    After that it works fine, my view is displayed.
    Is the program "BSP_DLC_DELETE_PERSONALIZATION"  a good solution to my problem?
    Thanks and Regards
    Gaurav Kumar Raghav

  • Custom view metadata hidden from standard check in

    I created some views for custom profiles, my problem is that my custom metadata is being displayed on standard check-in also, is there any ways to have this custom metadata displayed only on my custom profile and not in standard check in as well? if i disable the field in user interface in the configuration manager then it'll disappear from both standard check in and my custom metadata.
    any ideas? thanks a lot

    When copying you can put any BSP name..normally the practice is to prefix the standard name with a Z.
    Secondly when you want to make changes to the individual classes and methods you need to right click and say enhance. Then the AZ class names etc would be generated. The view should appear in the component wherein you copied the original view from.
    I hope this helps.
    The cookbook should have details on this. Otherwise also its quite intuitive.
    Award points if it helps.
    Thanks.

  • 3D Render shows shadows/reflections in Custom View, but not in camera

    All vector content, extruded text and a simple ground plain to catch shadows, 50% reflective.
    The custom view shows all shadows & reflections correctly, but the camera will not show them.
    I've deleted / re-created cameras, lights, floor plains AND objects without solving the issue - it's the first time it's occurred in many similar projects.
    Win7 x64, 32Gb RAM (plenty), nVidia K5000 with 4GB handling previews & rendering. The problem persists even if switching to CPU rendering (which takes ages, obviously) so the driver is not to blame.
    Any ideas?

    If you start a new project, create a floor, add a 3D text layer, add a camera using one of the presets say 50mm lens, add a light and set up your extrusion and add shadows does it work? If not then reboot. If you can solve the problem with a new project then import your project that does not work and see if that works by copying and pasting layers one at a time into the comp that works to figure out where the differences lie. If that doesn't work try posting the project so we can take a look at it.

  • View Access Problem

    HI All,
    I have a requirement as explained below
    I have a couple of tables availabe in XXDYN schema and i have to grant select and insert access on these tables to different users p16 and p17.
    I also have to restrict the users p16 and p17 in the way such that p16 user can enter only p16 data and p17 user can only enter p17 data.
    So to acheive the above requirement i followed the below approach.
    I created the custom tables in XXDYN schema and granted select and insert permission to p16 and p17 users on these tables.
    As i have to restrict the user p16 and p17 from entering erroneous data (i.e p16 user entering p17 user data and p17 user entering p16 user data)
    I have created custom views on XXDYN tables with a where condition
    for ex:
    create or replace view p16.custom_table as
    select * from xxdyn.custom_table
    where column1_value='P16';
    so the above view is created in p16 user schema, so that the p16 can enter only p16 users data and not p17 users data.
    The problem is that now both the table and the view are visible to P16 user i.e P16.custom_table and xxdyn.custom_Table.
    is there any way to hide the xxdyn.custom_Table from p16 user? so that only p16.custom_table is availabe to p16 user.
    Thanks for your inputs.
    Regards,
    Nagesh Manda.

    Hi Nagesh Manda,
    Another approach would be deploy both views in the data schema, i.e.,
    XXDYN.p15_custom_table
    XXDYN.p16_custom_table
    And then grant privileges on only the views to p15 and p16
    Tom Kyte discusses this in the latest Oracle magazine
    http://www.oracle.com/technology/oramag/oracle/08-nov/o68asktom.html
    Your scenario looks exactly as the case for "further restrict access to data"
    Regards
    Peter

  • Fields in custom view is only populated when Edit button is clicked

    I have enhanced the component BT111H_OPPT. I added three custom views to it. I have enhanced CRMD_CUSTOMER_H with the required fields using EEWB. The context node BTCUSTOMERH is created  as a dependent node on BTADMINH. Below is the code for creating the context node.
    model = owner->create_model(
          class_name     = 'ZL_ZOPP_EXT_COMMERCIALOV_CN01'
          model_id       = 'BTCustomerH' ).                     "#EC NOTEXT
      BTCustomerH ?= model.
      CLEAR model.
    initial setting for depandant model node
      coll_wrapper =
        BTADMINH->get_collection_wrapper( ).
      TRY.
          entity ?= coll_wrapper->get_current( ).
        CATCH cx_sy_move_cast_error.
      ENDTRY.
      IF entity IS BOUND.
        BTCustomerH->on_new_focus(
                     focus_bo = entity ).
      ENDIF.
    My problem is when I open a opportunity these custom view fields are all blank (intial). If I click edit button on any of the views the values get populated. If I got out of the opportunity and come back again after clicking the edit button I get my custom views populated.
    A similar entry in SDN is there but is not clear. Can anybody advice?
    Custom field only populated on edit

    Hi Arun,
        Thank you for replying. I solved the problem. In my case I have bounded the context for BTCUSTOMERH with the component controller. And compoent controller does not hold values when its loaded. I removed the binding and it worked.
    Edited by: subhashis das on Mar 5, 2010 1:31 PM
    Edited by: subhashis das on Mar 5, 2010 2:10 PM

  • Safari 8.0 preferences such as homepage or customized view not saved or maintained.

    Cannot seem to maintain Safari 8.0 preferences such as homepage or customized view between sessions.

    Back up all data before proceeding.
    This procedure will unlock all your user files (not system files) and reset their ownership, permissions, and access controls to the default. If you've intentionally set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it, but you do need to follow the instructions below.
    Step 1
    If you have more than one user, and the one in question is not an administrator, then go to Step 2.
    Triple-click anywhere in the following line on this page to select it:
    sudo find ~ $TMPDIR.. -exec chflags -h nouchg,nouappnd,noschg,nosappnd {} + -exec chown -h $UID {} + -exec chmod +rw {} + -exec chmod -h -N {} + -type d -exec chmod -h +x {} + 2>&-
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    Paste into the Terminal window by pressing command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    You'll be prompted for your login password, which won't be displayed when you type it. Type carefully and then press return. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command may take several minutes to run, depending on how many files you have. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.
    Step 2 (optional)
    Take this step only if you have trouble with Step 1, if you prefer not to take it, or if it doesn't solve the problem.
    Start up in Recovery mode. When the OS X Utilities screen appears, select
              Utilities ▹ Terminal
    from the menu bar. A Terminal window will open. In that window, type this:
    resetp
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password window will open. You’re not going to reset a password.
    Select your startup volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
               ▹ Restart
    from the menu bar.

  • Numeric keyboard problems

    can anyone help with advice regarding my keyboard problem. Basically, I have tried two different apple keyboards and neither of them will work on the numeric keypad. Does anyone know what is wrong?

    If restarting the computer, logging in and out of a user account, trying a second
    user account to see if the problem exists computer-wide or only in one account,
    does not work, you could see if resetting PRAM/NVRAM or even PMU for that
    specific computer may flush the system, should it be a software error.
    There is an Apple Hardware Test on the bootable Installer disc DVD which
    came with your computer, and perhaps that could spot some error in the
    USB or keyboard, but it may not show a subtle issue, such as a bad cord
    or one port connector in the computer which may be bent, etc.
    User account issues are sometimes responsible for other problems, but there
    could be something a bit screwy with the port the computer keyboard is plugged
    into; so have you tried a different port? Does that part of the board work if the
    computer is started up in SafeBoot?
    Does Keyboard Viewer show any activity on the keyboard in that area even
    though the input does not show on the screen?
    On a portable computer, there is a way to turn off the Numeric Keyboard area,
    which is different than a full-size keyboard; you can make it 'ignore input' to
    the computer if the correct settings or other keys are selected to do so. And I
    wonder if this is possible with a regular full size external keyboard on an iMac.
    Some settings in Universal Access in a desktop computer may affect how
    the keyboard works; or what may be expected from pressing some keys
    may change due to settings accidentally chosen through this panel. A few
    can be activated by accident, if some check-boxes were default-chosen.
    With the portable computer, it takes a bit more effort to ignore numeric
    keyboard, since it is part of the main built-in keyboard. In a desktop
    Mac, the keyboard/mouse controls in System Preferences panel offer
    a few choices, and Universal Access offers others which can be turned
    on or off at times without a conscious effort; given pre-conditions in there.
    So, if the software and/or settings in the system are to be ruled out, any
    possibility of settings or a damaged OS X need to be weeded out. If
    the hardware is known good and that includes the logic board and or
    USB ports used to connect the USB standard or pro keyboard to the
    Mac are good, then further investigation is required. Patient, tedious.
    {If you use a powered USB hub, be sure to have the keyboard directly
    plugged into the computer. A mouse can be run from a powered USB
    hub, but some hubs don't work or work incorrectly in some cases with
    keyboard commands on startup. And having too many things attached
    in a string of USB devices (unpowered hubs, etc) can cause a brown-
    out or power failure; since USB can only support a limited number of
    items attached to the computer's internal powered ports. Be they USB
    or FireWire, there is a limit and rules apply; should peripherals be in
    a string attached to a computer, so demand won't exceed supply.}
    Good luck & happy computing!

Maybe you are looking for

  • Business Connector 4.8 :upgrade

    Dear all, I need to upgrade the SAP Business connector from version 4.7 to 4.8. I have already gone through the documents mentioned in service.sap.com/connectors, especially through the SAP BC migration guide. My concern is, customer does not wants t

  • BPMON Alert Inbox - role based custom query

    Hello experts, I have a requirement from my customer in BPMON alert inbox to build a custom queries and distribute them to end-users based on security access or other kind of assignment. Say for example, we have a monitoring object "purchase requisit

  • How can I eliminate "others" in capacity

    Hello, Can someone help in giving the proper steps to erase "others" in capacity for my iPhone 5? I have tried everything, from erasing text message, photos, music, videos, among other, but "others" remains. Certainly need help!

  • Design thoughs CTAS vs TRUNCATE / INSERT

    Would like to hear your thoughts on the speed / other pro's and con's of Create Table As Select * from table and truncate table insert into /*+ append */ select * from table; Consider at present we have force logging on.

  • OIM Password Policies

    Hello All I have a number of users setup in OIM and am using it for provisioning. I have the users in different organizations based on class of user and permissions to the portal. I have a need to have different password policies based on the organiz