palmed.ui
Interface IComponent

All Known Implementing Classes:
Component, HorizontalScrollbar, ModificationIndicator, TextArea, Toolbar, VerticalScrollbar

public interface IComponent

This interface defines a gui component.

Version:
$Revision$ $Date$
Author:
Mathieu Champlon

Method Summary
 boolean click(int x, int y)
          Handle a click event.
 void drag(int x, int y)
          Handle a drag event.
 int getHeight()
          Retrieve the current height.
 int getLayout()
          Retrieve the layout.
 int getWidth()
          Retrieve the current width.
 void paint(javax.microedition.lcdui.Graphics g)
          Paint the component.
 void resize(int width, int height)
          Request a component resize.
 void unclick(int x, int y)
          Handle an unclick event.
 

Method Detail

paint

void paint(javax.microedition.lcdui.Graphics g)
Paint the component.

Parameters:
g - the graphics

resize

void resize(int width,
            int height)
Request a component resize.

Parameters:
width - the new width
height - the new height

getLayout

int getLayout()
Retrieve the layout.

Supported layouts are :

Returns:
a combination of layout flags

getWidth

int getWidth()
Retrieve the current width.

Returns:
the width in pixels

getHeight

int getHeight()
Retrieve the current height.

Returns:
the height in pixels

click

boolean click(int x,
              int y)
Handle a click event.

Parameters:
x - the pointer abscissa
y - the pointer ordinate
Returns:
whether the component claims focus or not

drag

void drag(int x,
          int y)
Handle a drag event.

The component must have claimed focus upon click in order to receive this event.

Parameters:
x - the pointer abscissa
y - the pointer ordinate

unclick

void unclick(int x,
             int y)
Handle an unclick event.

The component must have claimed focus upon click ini order to receive this event.

Parameters:
x - the pointer abscissa
y - the pointer ordinate


Copyright © 2004-2006 PalmEd. All Rights Reserved.