Class AdjustableViewScrollPane

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class AdjustableViewScrollPane extends JPanel
A ViewPane is an alternative to JScrollPane when you need to scroll an infinite area given in floating-point coordinates.

In opposite to JScrollPane, we don't scroll a view given by a JComponent but it's Viewport. For this reason the view component must implement the AdjustableView interface.

Version:
$Revision$ $Date$
See Also:
  • Constructor Details

    • AdjustableViewScrollPane

      public AdjustableViewScrollPane()
      Constructs a new view pane with an empty view component.
    • AdjustableViewScrollPane

      public AdjustableViewScrollPane(JComponent viewComponent)
      Constructs a new view pane with the given view viewComponent
      Parameters:
      viewComponent - the view viewComponent. If not null, it must implement AdjustableView.
  • Method Details

    • getAdjustableView

      public AdjustableView getAdjustableView()
    • getViewComponent

      public JComponent getViewComponent()
    • setViewComponent

      public void setViewComponent(JComponent viewComponent)
      Constructs a new view pane with the given view which must implement the AdjustableView interface.
      Parameters:
      viewComponent - a view component implement AdjustableView.
    • getCornerComponent

      public JComponent getCornerComponent()
    • setCornerComponent

      public void setCornerComponent(JComponent cornerComponent)
    • doLayout

      public void doLayout()
      Overrides:
      doLayout in class Container
    • addImpl

      protected void addImpl(Component comp, Object constraints, int index)
      Overrides:
      addImpl in class Container
    • createHorizontalScrollbar

      protected JScrollBar createHorizontalScrollbar()
      Returns:
      new JScrollBar(JScrollBar.HORIZONTAL)
    • createVerticalScrollBar

      protected JScrollBar createVerticalScrollBar()
      Returns:
      new JScrollBar(JScrollBar.VERTICAL)
    • createCornerComponent

      protected JPanel createCornerComponent()
      Returns:
      new JPanel()