ScrollPaneOverview example

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

ScrollPaneOverview example

Postby Maurice » Tue Mar 22, 2011 10:05 am

Hi,

I would like to create a panel with a JTable and a permanent ScrollPaneOverview on the side of the table. I am having some problems and could not find an example on the DEMO examples.

I am trying to do the following:

Code: Select all
        JideScrollPane scrollpane = new JideScrollPane();
        scrollpane.setViewportView(table);
        scrollpane.setHorizontalScrollBarCoversWholeWidth(true);
        scrollpane.setVerticalScrollBarCoversWholeHeight(true);
       
        JPanel panel = new JPanel();
        final ScrollPaneOverview scrollPaneOverview = new ScrollPaneOverview(scrollpane, panel);
        scrollPaneOverview.setPreferredSize(new Dimension(100, 100));
        panel.setPreferredSize(new Dimension(100, 100));
        panel.add(scrollPaneOverview);
       
        add(scrollpane, BorderLayout.CENTER);
        add(panel, BorderLayout.WEST);
   scrollPaneOverview.display();


Any tips or even an example would be appreciated.

Many Thanks.
Maurice
 
Posts: 62
Joined: Tue Sep 14, 2010 3:36 am

Re: ScrollPaneOverview example

Postby JIDE Support » Tue Mar 22, 2011 10:35 am

Can you please elaborate the issue you are having? Basically we would recommend you use a JButton as ScrollPaneOverview's owner and call display() on action listener of the button.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: ScrollPaneOverview example

Postby Maurice » Wed Mar 23, 2011 2:14 am

I am trying to add the overview to a JPanel which will sit next to the table being viewed.

The problem I am having is that I would like to have a permanent view of the table in an overview panel, which users can then use to move themselves around what is a large data set.

I don't want the user to have to click a button to do this. However, when I use the code below nothing is displayed.

Many Thanks
Maurice
 
Posts: 62
Joined: Tue Sep 14, 2010 3:36 am

Re: ScrollPaneOverview example

Postby JIDE Support » Wed Mar 23, 2011 11:32 am

I'm afraid ScrollPaneOverview does not fit your request very well. As you can see from the source code, on displaying, it will show a popup. The reason you didn't see any is that, the popup is hidden on focus change later on. You may have to create your own component to achieve your goal.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: No registered users and 57 guests