package org.osbl.client.wings;
import org.wings.*;
import org.wings.event.SViewportChangeListener;
import org.wings.io.Device;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import java.io.IOException;
import java.awt.*;
/**
* An SPanel, that implements the Scrollable interface. It can be used in conjunction with SScrollPane
* with a non paging layout as returned by the method asScrollPane.
*/
public class XScrollablePanel
extends SPanel
implements Scrollable
{
private SScrollPane scrollPane;
public XScrollablePanel() {
super.setLayout(new SBorderLayout());
}
public XScrollablePanel(SComponent comp) {
this();
add(comp, SBorderLayout.CENTER);
}
public XScrollablePanel(SComponent comp, SDimension preferredSize) {
this();
setPreferredSize(preferredSize);
add(comp, SBorderLayout.CENTER);
}
public Rectangle getScrollableViewportSize() {
return null;
}
public void setViewportSize(Rectangle d) {
}
public void addViewportChangeListener(SViewportChangeListener l) {
}
public void removeViewportChangeListener(SViewportChangeListener l) {
}
public Rectangle getViewportSize() {
return null;
}
public Dimension getPreferredExtent() {
return null;
}
public SScrollPane asScrollPane() {
if (scrollPane == null) {
scrollPane = new SScrollPane(this);
scrollPane.setPreferredSize(SDimension.FULLAREA);
scrollPane.setMode(SScrollPane.MODE_COMPLETE);
}
return scrollPane;
}
}
|