|
PrefuseJScrollPane demo
|
|
16-08-2008, 11:22 AM
Post: #1
|
|||
|
|||
|
PrefuseJScrollPane demo
Ever wanted prefuse to have scrollbars?
I thought: dragging with mouse is so cool, I don“t need that. But as soon as I embedded prefuse with my swing gui I thought: hm scrollbars would be nice. So here is my first version of a "scrollpane emulator" for prefuse. If you find bugs feel free to contact me or correct them (where I would appreciate it if you would post that here). You can create the pane like that: Code: m_scrollPane = new PrefuseJScrollPane(m_display);![]() PrefuseJScrollPane.java (Size: 19.31 KB / Downloads: 222)
|
|||
|
18-08-2008, 02:40 PM
Post: #2
|
|||
|
|||
|
RE: PrefuseJScrollPane demo
I made some smaller changes
- Rounding could lead to flickering scrollbars when zooming and graph fits on screen - Somehow the scrollbars started to show wrong behavior when dragging graph out of the pane PrefuseJScrollPane.java (Size: 19.62 KB / Downloads: 251)
|
|||
|
14-01-2010, 04:36 PM
Post: #3
|
|||
|
|||
|
RE: PrefuseJScrollPane demo
Nice ! Thank you.
Using BorderLayout instead of GridbagLayout makes the PrefuseJScrollPane fill the entire space available for it, which is not the case with GridbadLayout. Apart for the initialize() method where one obviously needs to replace setLayout(new GridBagLayout()) by setLayout(new BorderLayout()), only the addDisplay(Display display) method must be changed into this : Code: public void addDisplay(Display display) { |
|||
|
« Next Oldest | Next Newest »
|


Search
Help



