[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.gef] Re: Slider using GEF and draw2D

I just thought adding code snippet of what I'm trying to do will be useful.

public class QualiaScrollBar extends Figure {
	private IFigure pane;
	public QualiaScrollBar(EditPart part) {
		ScrollPane scrollpane = new ScrollPane();
		pane = new FreeformLayer();
		pane.setLayoutManager(new FreeformLayout());
		Label label = new Label("Hello World");
		scrollpane.getHorizontalScrollBar().setVisible(true);
		pane.add(label);
		setLayoutManager(new StackLayout());
		
		add(scrollpane);
		scrollpane.setViewport(new FreeformViewport());
		scrollpane.setContents(pane);
		setBackgroundColor(ColorConstants.listBackground);
		setOpaque(true);
}
}