org.jgraph.plaf.basic

Class BasicGraphUI.ComponentHandler

public class BasicGraphUI.ComponentHandler extends ComponentAdapter implements ActionListener

Updates the preferred size when scrolling (if necessary).
Field Summary
protected JScrollBarscrollBar
ScrollBar that is being adjusted.
protected Timertimer
Timer used when inside a scrollpane and the scrollbar is adjusting.
Method Summary
voidactionPerformed(ActionEvent ae)
Public as a result of Timer.
voidcomponentMoved(ComponentEvent e)
protected JScrollPanegetScrollPane()
Returns the JScrollPane housing the JGraph, or null if one isn't found.
protected voidstartTimer()
Creates, if necessary, and starts a Timer to check if need to resize the bounds.

Field Detail

scrollBar

protected JScrollBar scrollBar
ScrollBar that is being adjusted.

timer

protected Timer timer
Timer used when inside a scrollpane and the scrollbar is adjusting.

Method Detail

actionPerformed

public void actionPerformed(ActionEvent ae)
Public as a result of Timer. If the scrollBar is null, or not adjusting, this stops the timer and updates the sizing.

componentMoved

public void componentMoved(ComponentEvent e)

getScrollPane

protected JScrollPane getScrollPane()
Returns the JScrollPane housing the JGraph, or null if one isn't found.

startTimer

protected void startTimer()
Creates, if necessary, and starts a Timer to check if need to resize the bounds.
Copyright (C) 2001-2009 JGraph Ltd. All rights reserved.