public class GlimpseVerticallyScrollableLayout extends GlimpseLayout
setVerticalOffset(int)
method.
For an example of controlling the vertical-offset using a Swing scrollbar, see
VerticallyScrollableLayoutExample
.
In typical usage, when this layout's container is taller than minContentHeight,
the child-layouts will not be scrollable -- this layout will size its child-
layouts to fit the container.
However, when this layout's container is shorter than minContentHeight, it will
set child-layout heights to minContentHeight -- and verticalOffset then affects
what portion of the content fits inside the container's bounds.Constructor and Description |
---|
GlimpseVerticallyScrollableLayout(int minContentHeight) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(boolean runImmediately,
Runnable listener) |
static Runnable |
attachScrollableToScrollbar(GlimpseVerticallyScrollableLayout layout,
GlimpseTargetStack stack,
JScrollBar scrollbar)
Returns a Runnable that, if called, will detach the layout from the scrollbar,
removing all of the listeners put in place by the attach call.
|
GlimpseBounds |
getCurrentBounds(GlimpseTargetStack stack) |
int |
getMinContentHeight() |
int |
getVerticalOffset() |
GlimpseBounds |
layoutTo(GlimpseTargetStack stack) |
void |
removeListener(Runnable listener) |
void |
setMinContentHeight(int minContentHeight) |
void |
setVerticalOffset(int verticalOffset) |
addGlimpseMouseAllListener, addGlimpseMouseListener, addGlimpseMouseMotionListener, addGlimpseMouseWheelListener, addLayout, addLayout, addLayout, addLayout, addPainter, addPainter, addPainter, addPainter, dispose, getGlimpseMouseListeners, getGlimpseMouseMotionListeners, getGlimpseMouseWheelListeners, getLayoutManager, getLock, getName, getTargetBounds, getTargetChildren, invalidateLayout, isDisposed, isEventConsumer, isEventGenerator, isVisible, layoutTo, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, paintTo, removeAll, removeAllGlimpseListeners, removeAllLayouts, removeGlimpseMouseAllListener, removeGlimpseMouseListener, removeGlimpseMouseMotionListener, removeGlimpseMouseWheelListener, removeLayout, removePainter, setEventConsumer, setEventGenerator, setLayoutData, setLayoutManager, setLookAndFeel, setName, setVisible, setZOrder, setZOrder, toString
public GlimpseVerticallyScrollableLayout(int minContentHeight)
public static Runnable attachScrollableToScrollbar(GlimpseVerticallyScrollableLayout layout, GlimpseTargetStack stack, JScrollBar scrollbar)
public void addListener(boolean runImmediately, Runnable listener)
public void removeListener(Runnable listener)
public GlimpseBounds layoutTo(GlimpseTargetStack stack)
layoutTo
in class GlimpseLayout
public int getVerticalOffset()
public void setVerticalOffset(int verticalOffset)
public int getMinContentHeight()
public void setMinContentHeight(int minContentHeight)
public GlimpseBounds getCurrentBounds(GlimpseTargetStack stack)
Copyright © 2016 Metron, Inc.. All rights reserved.