org.jgraph.plaf.basic

Class BasicGraphUI.ComponentHandler

Enclosing Class:
BasicGraphUI
Implemented Interfaces:
ActionListener

public class BasicGraphUI.ComponentHandler
extends ComponentAdapter
implements ActionListener

Updates the preferred size when scrolling (if necessary).

Field Summary

protected JScrollBar
scrollBar
ScrollBar that is being adjusted.
protected Timer
timer
Timer used when inside a scrollpane and the scrollbar is adjusting.

Method Summary

void
actionPerformed(ActionEvent ae)
Public as a result of Timer.
void
componentMoved(ComponentEvent e)
protected JScrollPane
getScrollPane()
Returns the JScrollPane housing the JGraph, or null if one isn't found.
protected void
startTimer()
Creates, if necessary, and starts a Timer to check if need to resize the bounds.

Field Details

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 Details

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-2008 Gaudenz Alder. All rights reserved.