palmed.edit
Class ModificationIndicator

java.lang.Object
  extended by palmed.edit.ModificationIndicator
All Implemented Interfaces:
ITextView, IComponent

public final class ModificationIndicator
extends java.lang.Object
implements ITextView, IComponent

This class implements a modification indicator watching a given text.

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

Constructor Summary
ModificationIndicator()
          Create a modification indicator.
 
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 modified(boolean status)
          Notify the modification flag has changed.
 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.
 void update(int columns, int lines)
          Notify the text bounding box has changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModificationIndicator

public ModificationIndicator()
Create a modification indicator.

Method Detail

resize

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

Specified by:
resize in interface IComponent
Parameters:
width - the new width
height - the new height

paint

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

Specified by:
paint in interface IComponent
Parameters:
g - the graphics

update

public void update(int columns,
                   int lines)
Notify the text bounding box has changed.

Specified by:
update in interface ITextView
Parameters:
columns - the number of columns
lines - the number of lines

modified

public void modified(boolean status)
Notify the modification flag has changed.

Specified by:
modified in interface ITextView
Parameters:
status - the new modification status

getLayout

public int getLayout()
Retrieve the layout.

Supported layouts are :

Specified by:
getLayout in interface IComponent
Returns:
a combination of layout flags

getWidth

public int getWidth()
Retrieve the current width.

Specified by:
getWidth in interface IComponent
Returns:
the width in pixels

getHeight

public int getHeight()
Retrieve the current height.

Specified by:
getHeight in interface IComponent
Returns:
the height in pixels

click

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

Specified by:
click in interface IComponent
Parameters:
x - the pointer abscissa
y - the pointer ordinate
Returns:
whether the component claims focus or not

drag

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

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

Specified by:
drag in interface IComponent
Parameters:
x - the pointer abscissa
y - the pointer ordinate

unclick

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

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

Specified by:
unclick in interface IComponent
Parameters:
x - the pointer abscissa
y - the pointer ordinate


Copyright © 2004-2006 PalmEd. All Rights Reserved.