com.jmex.bui
Class BScrollingList.BViewport

java.lang.Object
  extended by com.jmex.bui.BComponent
      extended by com.jmex.bui.BContainer
          extended by com.jmex.bui.BScrollingList.BViewport
All Implemented Interfaces:
ChangeListener
Enclosing class:
BScrollingList<V,C extends BComponent>

protected class BScrollingList.BViewport
extends BContainer
implements ChangeListener


Nested Class Summary
 
Nested classes/interfaces inherited from class com.jmex.bui.BContainer
BContainer.ChildOp
 
Field Summary
protected  int _offset
           
protected  boolean _snap
           
protected  Rectangle _srect
           
 
Fields inherited from class com.jmex.bui.BContainer
_children, _layout
 
Fields inherited from class com.jmex.bui.BComponent
_alpha, _backgrounds, _bbuf, _borders, _colors, _cursor, _enabled, _height, _hover, _insets, _listeners, _parent, _preferredSize, _properties, _styleClass, _tipmouse, _tipStyle, _tiptext, _valid, _visible, _width, _x, _y, DEFAULT, DISABLED, HOVER, STATE_COUNT, STATE_PCLASSES
 
Constructor Summary
BScrollingList.BViewport()
           
 
Method Summary
 BComponent getHitComponent(int mx, int my)
          Returns the component "hit" by the specified mouse coordinates which might be this component or any of its children.
 BScrollBar getVerticalScrollBar()
           
 void invalidate()
          Marks this component as invalid and needing a relayout.
 void invalidateAndSnap()
          Recomputes our layout and snaps to the bottom if we were at the bottom previously.
 void layout()
          Instructs this component to lay itself out.
protected  void renderComponent(com.jme.renderer.Renderer renderer)
          Renders any custom bits for this component.
 void stateChanged(ChangeEvent event)
          Indicates that the underlying model has changed.
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.jmex.bui.BContainer
add, add, add, add, applyOperation, computePreferredSize, getComponent, getComponentCount, getComponentIndex, getDefaultStyleClass, getLayoutManager, getNextFocus, getPreviousFocus, remove, remove, removeAll, replace, setAlpha, setEnabled, setLayoutManager, setVisible, validate
 
Methods inherited from class com.jmex.bui.BComponent
acceptsFocus, addListener, addListeners, applyDefaultStates, boundsToString, changeCursor, configureStyle, createTooltipComponent, dispatchEvent, emitEvent, getAbsoluteX, getAbsoluteY, getAlpha, getBackground, getBorder, getBounds, getColor, getCursor, getFocusTarget, getHeight, getInsets, getLocation, getName, getNextFocus, getParent, getPreferredSize, getPreviousFocus, getProperty, getState, getStateCount, getStatePseudoClass, getStyleClass, getTooltipText, getWidth, getWindow, getX, getY, hasFocus, intersectScissorBox, isAdded, isConsumeMouseEvents, isEnabled, isHoverEnabled, isShowing, isTooltipRelativeToMouse, isValid, isVisible, removeAllListeners, removeListener, render, renderBackground, renderBorder, requestFocus, restoreScissorState, setBackground, setBounds, setConsumeMouseEvents, setCursor, setHoverEnabled, setLocation, setName, setParent, setPreferredSize, setPreferredSize, setProperty, setSize, setStyleClass, setTooltipRelativeToMouse, setTooltipText, stateDidChange, updateCursor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_offset

protected int _offset

_snap

protected boolean _snap

_srect

protected Rectangle _srect
Constructor Detail

BScrollingList.BViewport

public BScrollingList.BViewport()
Method Detail

getVerticalScrollBar

public BScrollBar getVerticalScrollBar()

invalidateAndSnap

public void invalidateAndSnap()
Recomputes our layout and snaps to the bottom if we were at the bottom previously.


wasAdded

protected void wasAdded()
Description copied from class: BComponent
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).

Overrides:
wasAdded in class BContainer

wasRemoved

protected void wasRemoved()
Description copied from class: BComponent
This method is called when we are removed from a hierarchy that is connected to a top-level window. If we wish to clean up after things done in BComponent.wasAdded(), this is a fine place to do so.

Overrides:
wasRemoved in class BContainer

stateChanged

public void stateChanged(ChangeEvent event)
Description copied from interface: ChangeListener
Indicates that the underlying model has changed.

Specified by:
stateChanged in interface ChangeListener

invalidate

public void invalidate()
Description copied from class: BComponent
Marks this component as invalid and needing a relayout. If the component is valid, its parent will also be marked as invalid.

Overrides:
invalidate in class BComponent

layout

public void layout()
Description copied from class: BComponent
Instructs this component to lay itself out. This is called as a result of the component changing size.

Overrides:
layout in class BContainer

renderComponent

protected void renderComponent(com.jme.renderer.Renderer renderer)
Description copied from class: BComponent
Renders any custom bits for this component. This is called with the graphics context translated to (0, 0) relative to this component.

Overrides:
renderComponent in class BContainer

getHitComponent

public BComponent getHitComponent(int mx,
                                  int my)
Description copied from class: BComponent
Returns the component "hit" by the specified mouse coordinates which might be this component or any of its children. This method should return null if the supplied mouse coordinates are outside the bounds of this component.

Overrides:
getHitComponent in class BContainer


Copyright © 2011 Michael Bayne. All Rights Reserved.