TreeField and navigationClick for expand/collapse?

I'm doing a MSN Messenger or Google Chat interface on blackberry. One of the functions they have is a TreeField that when a parent is clicked above immediately develop or reduced the subtree.  By default, TreeField seems to open a menu where it actually have to highlight, and then click to expand or collapse.

Is the best way to implement a single click to open/close using the method of the TreeField navigationClick?

Anyone with the code example?

Thank you.

NavigationClick using should work fine. This should be close:

protected boolean navigationClick(int status, int time) {
  // we'll only override unvarnished navigation click behavior
  if ((status & KeypadListener.STATUS_ALT) == 0 &&
      (status & KeypadListener.STATUS_SHIFT) == 0)
  {
    int node = getCurrentNode();
    if (getFirstChild(node) != -1) {
      // node is an internal node
      setExpanded(node, !getExpanded(node));
      return true;
    } else {
      // click is on a leaf node. Do some default action or else fall through
    }
  }
  return super.navigationClick(status, time);
}

It can also function as a method on a form that contains only a single TreeField (after that change of all TreeField method calls while they are called on a variable of TreeField rather than on this).

Tags: BlackBerry Developers

Similar Questions

  • Expand collapse folders in my documents is not and jumps down and so I have to move the folders I want to actually see this all the time is there a default to always develop?

    Expand collapse folders in my documents is not and jumps down and so I have to move the folders I want to actually see this all the time is there a default to always develop?

    Also I have to move the colum line to the right all the time to see the date size etc. is there a default value or why not microsoft built in a value by default do not cut off the name of the file that I always have to make more time to see the full file name

    Thank you

    Greg

    Hello

    Unfortunately, you cannot save the settings for the fall down in my documents. As this is normal.
    If you want to suggest changes in the design here is the link you can make reference to: Microsoft Connect - back products and bug reports. Microsoft.
    https://connect.Microsoft.com/dashboard/Info/

    To resize the size of the column:
    1. you can resize the column by pointing the mouse on the name of the category.
    2. Once you can drag the slider to the right, double click it to get the optimal size.

    Thank you, and in what concerns:
    Swati Keni-Microsoft Support Engineer

  • Expand/collapse PanelBox behave differently on wls integrated and stand-alone wls

    12.1.3 jdev

    WebLogic 12.1.3

    I have a test page which Expand/Collapse PanelBox according to a logic managed bean when a button is clicked. User can also manually click on the small triangle to open/close the group box.

    If I run my integrated weblogic Server page of jdev, everything works fine. PanelBox develops or reduced depending on the result of my bean managed after that I click on a button. After that I have manually expand/collapse it, by clicking the button again can expand or collapse the group box.

    But when I deploy my test on stand-alone weblogic server, by clicking on the button can expand/collapse the box. But if I manually expand/collapse the box for once, while clicking on the button after will not not expand/collapse the box not more.

    I check all the associated adf jars on integrated wls and wls autonomous. I have not noticed any difference.

    No idea why the same code behaves differently on different servers? Any suggestions that pot I should double check?

    Thank you.

    The difference has something to do with the doctors that we have configured on wls. We did the following and now the panelbox open/close correctly.

    1 Add a class to extend ComponentChangeFilter.

    SerializableAttribute public class RejectPanelComponentChangeFilter extends ComponentChangeFilter {}

    @SuppressWarnings("compatibility:-4979717484313581204")

    private public static final long serialVersionUID =-3565272558295489717 L;

    public RejectPanelComponentChangeFilter() {}

    Super();

    }

    Public ComponentChangeFilter.Result accept (ComponentChange, componentChange, UIComponent uIComponent) {}

    If (RichPanelBox instanceof uIComponent & "disclosed".equals (((AttributeComponentChange) componentChange) .getAttributeName ()) ") {}

    Return ComponentChangeFilter.Result.REJECT;

    }

    else {}

    Return ComponentChangeFilter.Result.ACCEPT;

    }

    }

    }

    2 and in the bean of backup of the page with panelBox on the PanelBox setter, follow these steps:

    {} public void setFinderCriteriaPanelBox (RichPanelBox finderCriteriaPanelBox)

    this.finderCriteriaPanelBox = finderCriteriaPanelBox;

    int filterCount = ((UIXComponentBase) finderCriteriaPanelBox) .getComponentChangeFilters () .length;

    If (filterCount == 0) {}

    finderCriteriaPanelBox.addComponentChangeFilter (new RejectPanelComponentChangeFilter());

    }

    }

  • Hide icons to expand/collapse for Table of contents (ToC)?

    Hello

    I have a project that requires the summary function that comes with the table of contents turning. However I do not want a visible knock on it.
    I went to overlay, set it to collapse all and the alpha value to 0%, which pretty much done the work, but I find myself with the arrows to expand/collapse on my slides.
    I read that you can replace these transparent png files and I want to do, but don't know where to find the icons to replace them.
    Can anyone tell me what their file names or folder in which they are stored in please?

    Simply use the navigation buttons to select your transparent png

  • Hide icons to expand/collapse tree/TreeTable ADF

    JDev Version: 11.1.1.6

    How to hide ADF tree/TreeTable expand/collapse icons and ToolTips? I tried using the adf tree / selectors treeTable, can still see the ToolTips and icon container box.

    Thank you

    Kala

    Hello

    Hide the icon using css container,

    give, display: none for the container icon in css

    John

  • problem installing windows 7 finishing installation scope and freeze for hours please help

    problem installing windows 7 finishing installation scope and freeze for hours please help

    my pc req:
    2 GB of ram
    NVIDIA geforce 210 1 GB
    180 GB
    Pentium 4 3.40
    Help, please

    Turn off the computer.

    try to start safe mode, start your PC, just before the system loads the Windows operating system. Press the [F8] key function 8 on your keyboard which will launch the menu Advanced Boot Options. Select Safe Mode.

    Log, click Start, type Device Manager, press ENTER.

    Expand graphics cards

    Right-click your video card, click on uninstall.

    Restart your system

    Log, click Start, type Device Manager, press ENTER.

    Expand graphics cards
    Right-click your video card

    Driver update software; then click search automatically for updated driver.

  • RoboHelp can produce a decent online help 508 compliant? When I try, TOC, IX and search for bad air.

    I have Windows 7 and RoboHelp 9. I take a long Word document and convert it to help online. The OCD, IX and search for bad air. I contacted Adobe Support and up to now, they say it's just what assistance 508 compliant is supposed to look like, even if I keep coming back to try to get different opinions. Specifically, the table of contents entries are not expandable and collapsible, it shows just the whole thing. They show no legs. The index produces numbers like 2_1_1_Add_a_New_Outcome.htm entries. Research shows the symbols and numbers, starting by! 1 2 3 4 5 6 7 8 9 10 11, and has no search box to enter a Word to search for. Anyone know if it's really only 508 compliant I can get of RoboHelp, please help?

    Hi Tom

    Sorry, I've had an incredibly taxing a few days and I forgot your last question, ask questions about WebWorks.

    Unfortunately, I have no idea how WebWorks. In addition, I'm not any kind of expert on Section 508 compliance. I heard "collegial" of it but none to support than real life. And because the way I didn't stay in a Holiday Inn Express last night, I can't pretend to be an expert.

    Maybe someone else here knows about WebWorks and maybe speak to that. Or, you could ask another meeting place. Maybe WebWorks has their own forums? Or you could try asking on TECHWR-L or HATT.

    http://www.techwr-l.com/archives/

    http://groups.Yahoo.com/group/Hatt/

    See you soon... Rick

    Useful and practical links

    Wish to RoboHelp form/Bug report form

    Begin to learn RoboHelp HTML 7, 8 or 9 in the day!

    Adobe Certified RoboHelp HTML Training

    SorcerStone blog

    RoboHelp EBooks

  • How expand/collapse a HGrid controller programmatically?

    Hi all

    How expand/collapse a HGrid controller programmatically?

    I saw that what follows does not work in ProcessFormRequest: "setAutoExpansionMaxLevels" (throws the following error: bean Web properties cannot be changed in the method of processFormData or processFormRequest controller.)

    My requirement is when I click on a button, the expand, should all work, some features and collapse again return.

    Pls let me know if any ideas.

    Thank you
    Rudra

    Hello

    -Initially wht it shows... ? is it works. B4, click the button.

    Try below:

    If (webBean! = null)
    {
    pageContext.writeDiagnostics (this, "Webean if id", 1);
    webBean.setExpandAllEnabled (false);
    }

    -Let me know it prints the log message or nt... ?

    Concerning
    Meher Irk

    Published by: Meher Irk January 7, 2011 20:25

  • Expand/collapse all regions

    I have 5 show/hide regions on a page. is it possible to expand/collapse all regions by clicking on a button or link ' show/hide all. any ideas are appreciated.

    Thank you
    Surya

    Hi Surya,

    Yes it is possible. Add later somewhere at the bottom of the page (I tend to create a new HTML box on the point before header and put this kind of thing in the Source):

    <script type="text/javascript">
    showHideAll('block');
    </script>
    

    Once in place, whenever the page is loaded, the function showHideAll() is called immediately, and areas are open. Note that this will occur whenever the page is reloaded - is that ok?

    Andy

  • I opened my phone i plwss send me password and id for Flavia

    I opened my phone i plwss send me password and id for Flavia

    open id is my

  • Why not the preferences of the general calendar for "the day ends at:" only offers the possibility of 'am' and not 'pm '? And alerts for an event from 14:00 activate at the right time, but it's at 02:00.

    The "day starts at:" options correctly offer options of "midnight" through time "am" to "noon". Thus the "day ends at:" should have options starting with "midi" and moments of "pm" to "midnight", but instead, they are all time 'am '.

    And alerts for an event from 14:00 activate at the right time, but it's at 02:00. Maybe it's a consequence of the above.

    ???

  • Cannot delete items in documents and data for each application

    I want to delete unnecessary files in several applications under general > use storage and iCloud > manage storage, but the section documents and data for the respective applications will not operate.

    I have it several times but it doesn't work.

    Can someone help me?

    Thanks in advance

    Omari says:

    I want to delete unnecessary files in several applications under general > use storage and iCloud > manage storage, but the section documents and data for the respective applications will not operate.

    I have it several times but it doesn't work.

    Explain what you do and what happens when you try to delete the data.

  • Is there a way to automatically fill bookmarks and folders of bookmarks in the toolbar and menu for a consistent view?

    The separate group of bookmarks in Firefox in the toolbar, Menu and does not sort, I always found it cumbersome to use and manage. The search for bookmarks often means I have to open each one to find a specific bookmark. I am aware of the show all bookmarks in bookmarks option > drop-down Menu (but isn't in the bookmarks bar). I know how to copy the bookmarks and folders etc. but it is hard to do every time I have bookmark. And if I add a new bookmark folder and want a consistent view, I need to copy this folder in the Menu or eitherToolbar and copy the new bookmarks in the toolbar or the Menu as well.

    Is there an add-on or option or other alterative that exists to provide that kind of capability?

    If not, maybe an adding future functionality to Firefox to eventually change the vision presented in the bookmarks bar and Bookmarks Menu so that they match and can be activated by a new option of FireFox "change the bookmark view show merged Bookmarks Toolbar + Bookmarks Menu bookmarks and folders of bookmarks in the toolbar and menu.

    Thank you very much!

    After a few edits, I found a way to accomplish what I want, and fortunately, it can be done in the application of Firefox without needing an add-on.

    I simply copy the bookmarks unordered top-level in the top-level bookmarks toolbar and the bookmarks Menu of top-level. This, combined with the convention to add all new bookmarks in the folders under Unsorted Bookmarks or Unsorted Bookmarks, provides the unified content bookmark I want across all views bookmark 3 (Unsorted, Menu, Toolbar).

    From the library page (grown by selecting from the menu of Firefox bookmarks bar > show all bookmarks), if I select Unsorted Bookmarks, copy and paste into the bookmarks toolbar and paste in the Menu bookmarks, this is what I want. I actually created a symbolic/reference/shortcut link to Unsorted Bookmarks the other two favorite places can be found.

    With Unsorted Bookmarks in the bookmarks toolbars and bookmarks Menu, any add/remove bookmarks or add/delete records or restructuring of the bookmarks under Unsorted Bookmarks directory tree is also immediately reflected in all 3 of the possible locations of bookmark (Unsorted, toolbar, Menu).

    The design and implementation of bookmarks supports this simple solution, so Bravo for designers and coders for built-in extensibility / generality which support this approach. And thanks for the posters for giving me some background and history on the bookmarks in Firefox, motivation me digging to find this solution which is quite simple and elegant.

    Thank you!

  • Why have I been asked and respected for download 39.0 at least 7 times. My version is still 38.0.5

    Why have I been asked and respected for download 39.0 at least 7 times. My version is 38.0.5
    It does not appear to update.
    In addition, why in the last twelve months lost my cursor when I am in half top of the screen. I went to Apple. The problem only occurs in my Firefox browser.
    Dedicated Firefox user
    Hugs, bad
    Malcolm Mckay

    If he has problems with the update or with the permissions then best is to download the full version and trash the version currently installed to do a fresh install of the new version.

    Download a new copy of the Firefox application and save the file to disk on the desktop image

    Your personal data are stored in the Firefox profile folder, so you will not lose your bookmarks and other data to personal when you uninstall and (re) install or update Firefox.

  • How can I get IWorks or Pages and Numbers for my MACBOOK PRO running Mavricks?

    How can I get IWorks or Pages and Numbers for my MACBOOK PRO running Mavricks?

    They are available in the Mac App Store.

Maybe you are looking for