: Download: FAQ: Licensing: Support: Contact ME
LwVCL Home
Introduction
Overview
Screen Shots
On-line Demos
Requirements
Further Plans
Docs
Tutorial
How-to (PDF)
API
FAQ
Download
Latest version

Home > J2SE > API

Overview  Package   Class  Tree  Deprecated  Index  Help 

org.zaval.misc
Interface ScrollObj

All Known Implementing Classes:
LwAList, LwTextField, LwScrollPan, LwTree, LwGrid

public interface ScrollObj

This interface is used to describe and control an object that can be scrolled. Principally, there are two ways to organize the scrolling for a light weight component:

  • By moving the component (changing the component location). For example, if we want to organize scrolling for java.awt.Component, we should use setLocation method to scroll the component inside a parent container.
  • By moving the component view. For example, if we want to create scrolling for java.awt.Component, we should override paint method of the component and move view inside the method basing on the scrolling offsets.
The interface helps to support both ways.


Method Summary
 java.awt.Point getSOLocation()
          Gets the scroll object location.
 java.awt.Dimension getSOSize()
          Gets the scroll object size.
 boolean moveContent()
          Tests if the scrolled component performs scrolling by changing its location or moving view.
 void setScrollMan(ScrollMan m)
          Sets the specified scroll manager for the scroll object.
 void setSOLocation(int x, int y)
          Sets the specified scroll object location.
 

Method Detail

getSOLocation

public java.awt.Point getSOLocation()
Gets the scroll object location.
Returns:
a scroll object location.

setSOLocation

public void setSOLocation(int x,
                          int y)
Sets the specified scroll object location. The method defines a mechanism that will be used to scrool the object.
Parameters:
x - the specified x coordinate.
y - the specified y coordinate.

getSOSize

public java.awt.Dimension getSOSize()
Gets the scroll object size. The size is a size that the scroll object wants to have.
Returns:
a scroll object size.

setScrollMan

public void setScrollMan(ScrollMan m)
Sets the specified scroll manager for the scroll object. The manager reference should be stored and used by the scrolled object to move itself inside the scrolled area.
Parameters:
m - the specified scroll manager.

moveContent

public boolean moveContent()
Tests if the scrolled component performs scrolling by changing its location or moving view.
Returns:
true if the scroll component organizes scrolling by moving its view; otherwise false.


: up