|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.opengl.gui.Component
com.threerings.opengl.gui.Container
com.threerings.opengl.gui.ScrollPane.Viewport
protected static class ScrollPane.Viewport
Does all the heavy lifting for the ScrollPane.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.threerings.opengl.gui.Container |
|---|
Container.ChildOp |
| Field Summary | |
|---|---|
protected BoundedRangeModel |
_hmodel
|
protected int |
_oldH
|
protected int |
_oldV
|
protected Rectangle |
_srect
|
protected Component |
_target
|
protected BoundedRangeModel |
_vmodel
|
protected MouseWheelListener |
_wheelListener
|
| Fields inherited from class com.threerings.opengl.gui.Container |
|---|
_children, _layout |
| Fields inherited from class com.threerings.opengl.gui.Component |
|---|
_alpha, _backgrounds, _borders, _colors, _ctx, _cursor, _enabled, _height, _hover, _hoverable, _insets, _listeners, _parent, _preferredSize, _properties, _rect, _styleConfigs, _tipmouse, _tiptext, _tooltipStyle, _transferHandler, _valid, _visible, _width, _x, _y, DEFAULT, DISABLED, HOVER, STATE_COUNT, STATE_PCLASSES |
| Constructor Summary | |
|---|---|
ScrollPane.Viewport(GlContext ctx,
Component target,
boolean vert,
boolean horiz,
int snap)
|
|
| Method Summary | |
|---|---|
protected Dimension |
computePreferredSize(int whint,
int hhint)
Computes and returns a preferred size for this component. |
int |
getAbsoluteX()
Returns the x position of this component in absolute screen coordinates. |
int |
getAbsoluteY()
Returns the y position of this component in absolute screen coordinates. |
protected String |
getDefaultStyleConfig()
Returns the name of the default config to be used for all instances of this component. |
Component |
getHitComponent(int mx,
int my)
Returns the component "hit" by the specified mouse coordinates which might be this component or any of its children. |
BoundedRangeModel |
getHModel()
Returns the range model defined by this viewport's size and the preferred size of its target component. |
Component |
getTarget()
Returns a reference to the target of this viewport. |
BoundedRangeModel |
getVModel()
Returns the range model defined by this viewport's size and the preferred size of its target component. |
protected int |
getXOffset()
|
protected int |
getYOffset()
|
void |
layout()
Instructs this component to lay itself out. |
protected int |
positionAdjustment(int parentExtent,
int childExtent,
int childPos)
Helper for scrollRectToVisible, pretty much copied from JViewport.java. |
protected void |
renderComponent(Renderer renderer)
Renders any custom bits for this component. |
void |
scrollRectToVisible(int x,
int y,
int w,
int h)
Request to have the specified rectangle, in this component's coordinate space, scrolled into view. |
void |
storeOldH()
Stores our current horizontal bound value. |
void |
storeOldV()
Stores our current vertical bound value. |
protected void |
wasAdded()
This method is called when we are added to a hierarchy that is connected to a top-level window (at which point we can rely on having a look and feel and can set ourselves up). |
protected void |
wasRemoved()
This method is called when we are removed from a hierarchy that is connected to a top-level window. |
| Methods inherited from class com.threerings.opengl.gui.Container |
|---|
add, add, add, add, applyOperation, getComponent, getComponentCount, getComponentIndex, getFirstDescendantFocus, getLastDescendantFocus, getLayoutManager, getNextFocus, getPreviousFocus, remove, remove, removeAll, replace, setAlpha, setEnabled, setHoverable, setLayoutManager, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected BoundedRangeModel _vmodel
protected BoundedRangeModel _hmodel
protected Component _target
protected MouseWheelListener _wheelListener
protected Rectangle _srect
protected int _oldV
protected int _oldH
| Constructor Detail |
|---|
public ScrollPane.Viewport(GlContext ctx,
Component target,
boolean vert,
boolean horiz,
int snap)
| Method Detail |
|---|
public Component getTarget()
public BoundedRangeModel getVModel()
public BoundedRangeModel getHModel()
public void storeOldV()
public void storeOldH()
public void layout()
Component
layout in class Containerpublic int getAbsoluteX()
Component
getAbsoluteX in class Componentpublic int getAbsoluteY()
Component
getAbsoluteY in class Component
public Component getHitComponent(int mx,
int my)
Component
getHitComponent in class Container
public void scrollRectToVisible(int x,
int y,
int w,
int h)
Component
scrollRectToVisible in class Component
protected int positionAdjustment(int parentExtent,
int childExtent,
int childPos)
protected void wasAdded()
Component
wasAdded in class Containerprotected void wasRemoved()
ComponentComponent.wasAdded(), this is a fine place
to do so.
wasRemoved in class Containerprotected String getDefaultStyleConfig()
Component
getDefaultStyleConfig in class Container
protected Dimension computePreferredSize(int whint,
int hhint)
Component
computePreferredSize in class Containerprotected void renderComponent(Renderer renderer)
Component
renderComponent in class Containerprotected final int getYOffset()
protected final int getXOffset()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||