moka.x
Class ScrollPane

java.lang.Object
  extended bymoka.lang.Object
      extended bymoka.event.EventListener
          extended bymoka.x.Component
              extended bymoka.x.Container
                  extended bymoka.x.ScrollPane

public class ScrollPane
extends Container

A ScollPanePanel is a scollable area.

Since:
MDK2.11

Field Summary
 boolean autoScroll
          A flag specifying if the Scroll Pane will scroll automatically to the next component instead of scrolling progressively.
 boolean hScrollVisible
          Is the horizontal scroll bar should be visible.
 Vector items
          A vector containing the items visible in the scrollable area.
 short sX
          The virtual x position in the scrollable area.
 short sY
          The virtual y position in the scrollable area.
 boolean vScrollVisible
          Is the vertical scroll bar should be visible.
 
Fields inherited from class moka.x.Container
child, tail
 
Fields inherited from class moka.x.Component
enabled, height, listen, mnemonic, next, parent, prev, visible, width, x, y
 
Constructor Summary
ScrollPane()
          Constructs a newly allocated ScrollPane.
 
Method Summary
 void finalize()
          Frees the memory of system ressources used by this ScrollPane object.
 void onPaint()
          Called when a PaintEvent occurs to paint the image of the container and stores it in its virtual memory.
 void paintChildren(moka.x.SCR_RECT_p clip)
          Paints the children of this container to the virtual screen.
 void paintForeground()
          Paints the foreground of the panel.
 void setHScrollVisible(boolean b)
          Sets if the horizontal scroll bar should be visible.
 void setSX(short sX)
          Sets the virtual X coordinate.
 void setSY(short sY)
          Sets the virtual Y coordinate.
 void setVScrollVisible(boolean b)
          Sets if the vertical scroll bar should be visible.
 void use()
          This method is invoked by the GEM when the user interacts with the container.
 
Methods inherited from class moka.x.Container
add, checkMnemonic, clean, empty, onRefresh, remove, repaintChildren, toFront
 
Methods inherited from class moka.x.Component
bottom, center, eventTriggered, isCursorOver, left, move, paint, right, setBounds, setEnabled, setHeight, setMnemonic, setVisible, setWidth, setX, setY, top
 
Methods inherited from class moka.event.EventListener
eventTriggered
 
Methods inherited from class moka.lang.Object
equals, getClassName, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sX

public short sX
The virtual x position in the scrollable area. Should be only read.


sY

public short sY
The virtual y position in the scrollable area. Should be only read.


autoScroll

public boolean autoScroll
A flag specifying if the Scroll Pane will scroll automatically to the next component instead of scrolling progressively. Set to false by default.


vScrollVisible

public boolean vScrollVisible
Is the vertical scroll bar should be visible. Should be only read.


hScrollVisible

public boolean hScrollVisible
Is the horizontal scroll bar should be visible. Should be only read.


items

public Vector items
A vector containing the items visible in the scrollable area. Should be only read.

Constructor Detail

ScrollPane

public ScrollPane()
Constructs a newly allocated ScrollPane.

Method Detail

finalize

public void finalize()
Frees the memory of system ressources used by this ScrollPane object.

Overrides:
finalize in class Component

setVScrollVisible

public void setVScrollVisible(boolean b)
Sets if the vertical scroll bar should be visible.

Parameters:
b - true to specify that the vertical scroll bar should be visible

setHScrollVisible

public void setHScrollVisible(boolean b)
Sets if the horizontal scroll bar should be visible.

Parameters:
b - the horizontal scroll bar should be visible

setSX

public void setSX(short sX)
Sets the virtual X coordinate.

Parameters:
sX - the virtual X coordinate

setSY

public void setSY(short sY)
Sets the virtual Y coordinate.

Parameters:
sY - the virtual Y coordinate

paintForeground

public void paintForeground()
Paints the foreground of the panel.

Overrides:
paintForeground in class Container

paintChildren

public void paintChildren(moka.x.SCR_RECT_p clip)
Paints the children of this container to the virtual screen. param clip The SCR_RECT clip

Overrides:
paintChildren in class Container

onPaint

public void onPaint()
Called when a PaintEvent occurs to paint the image of the container and stores it in its virtual memory. The container is painted, then all its children are and finally its foreground is. A PaintEvent occurs when the aspect of the container is altered or any of its children is.

Overrides:
onPaint in class Container

use

public void use()
This method is invoked by the GEM when the user interacts with the container.

Overrides:
use in class Container