Java Doc for DisplayableLFImpl.java in  » 6.0-JDK-Modules » j2me » javax » microedition » lcdui » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » javax.microedition.lcdui 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.microedition.lcdui.DisplayableLFImpl

All known Subclasses:   javax.microedition.lcdui.AlertLFImpl,  javax.microedition.lcdui.ScreenLFImpl,  javax.microedition.lcdui.CanvasLFImpl,  javax.microedition.lcdui.FormLFImpl,
DisplayableLFImpl
abstract class DisplayableLFImpl implements DisplayableLF(Code)
The look and feel implementation of Displayable based on platform widget.


Field Summary
final static  intFROZEN
    
final static  intHEIGHT
     Used as an index into the viewport[], for the height.
final static  intHIDDEN
    
final static  intINVALID_NATIVE_ID
     Uninitialized native resource id value.
final static  intSHOWN
    
final static  intWIDTH
     Used as an index into the viewport[], for the width.
final static  intX
     Used as an index into the viewport[], for the x origin.
final static  intY
     Used as an index into the viewport[], for the y origin.
 DisplaycurrentDisplay
     The current Display object.
 booleandefferedSizeChange
     True, indicates that before being painted, this Displayable should be notified that its size has changed via uCallSizeChanged().
 intmodelVersion
     Version number of this LF's data model. Should be updated when public data model has changed and be passed to native peer if visible.
 intnativeId
     The MidpDisplayable* of this Displayable while visible.
 Displayableowner
     The owner of this view.
 booleanpendingInvalidate
    
 booleansawKeyPress
     True, if a key press is in progress.
 booleansawPointerPress
     True, if a pointer press is in progress.
 intstate
    
 intwidthheight
     Width and height available to the Displayable.

Constructor Summary
 DisplayableLFImpl(Displayable d)
     Creates DisplayableLF for the passed in Displayable.

Method Summary
abstract  voidcreateNativeResource()
     Create native resource.
 voiddeleteNativeResource()
     Delete native resource.
public  intgetVerticalScrollPosition()
     Get the current vertical scroll position.
public  intgetVerticalScrollProportion()
     Get the current vertical scroll proportion.
public  voidlAddCommand(Command cmd, int i)
     Notifies look & feel object of a command addition to the Displayable.
 voidlCallHide()
     Remove this Displayable from physical screen. The Displayable should unload any resource that was allocated.
 voidlCallShow()
     Prepare to show this LF on physical screen.
public  voidlCommitPendingInteraction()
     Called to commit any pending user interaction for the current item.
public  DisplaylGetCurrentDisplay()
     Return the Display instance in which the LF is currently shown. the Display instance in which the LF is shown.
public  DisplayablelGetDisplayable()
     Return the associated Displayable object.
public  intlGetHeight()
     Get the height in pixels this Displayable is using.
public  intlGetWidth()
     Get the width in pixels this Displayable is using.
public  booleanlIsShown()
     Implement public API isShown().
public  voidlRemoveCommand(Command cmd, int i)
     Notifies look &s; feel object of a command removal from the Displayable.
 voidlRequestInvalidate()
     Called to schedule an "invalidate" for this Displayable.
 voidlRequestPaint(int x, int y, int width, int height, Object target)
     Repaint this Displayable.
 voidlRequestPaint()
     Repaints this Displayable.
 voidlRequestPaintContents()
     Repaint the whole Displayable.
public  voidlSetDisplay(Display d)
     Set the display instance the Displayable is associated with.
public  voidlSetTicker(Ticker oldTicker, Ticker newTicker)
     Notifies Displayable's look & feel object of a ticker change.
public  voidlSetTitle(String oldTitle, String newTitle)
     Notifies Displayable's look & feel object of a title change.
 voidtickerTextChanged(Ticker t)
     Notification that the ticker has changed.
public  voiduCallFreeze()
     Some "system modal dialog" takes over physical screen buffer and user input now or foreground is lost.
public  voiduCallHide()
     Remove this Displayable from physical screen.
public  voiduCallInvalidate()
     Called by the event handler to perform an invalidation of this Displayable.
public  voiduCallKeyEvent(int type, int keyCode)
     Handle a raw key event from Display.
 voiduCallKeyPressed(int keyCode)
     Handle a key press.
 voiduCallKeyReleased(int keyCode)
     Handle a key release.
 voiduCallKeyRepeated(int keyCode)
     Handle a repeated key press.
public  voiduCallPaint(Graphics g, Object target)
     Display calls this method on it's current Displayable.
 voiduCallPointerDragged(int x, int y)
     Handle a pointer drag event.
public  voiduCallPointerEvent(int type, int x, int y)
     Called from the event delivery loop when a pointer event is seen.
 voiduCallPointerPressed(int x, int y)
     Handle a pointer press event.
 voiduCallPointerReleased(int x, int y)
     Handle a pointer release event.
public  voiduCallScrollContent(int scrollType, int thumbPosition)
    
public  voiduCallShow()
     Prepare to show this LF on physical screen.
public  voiduCallSizeChanged(int w, int h)
     Package private equivalent of sizeChanged().
public  intuGetKeyMask()
     Called to get the key mask of all the keys that were pressed.
public  booleanuIsScrollNative()
     This method is used in repaint, in order to determine the translation of the draw coordinates.
 voiduRequestPaint()
     Request to paint all of this Displayable (without holding a lock).
public  voiduSetFullScreenMode(boolean mode)
     Notifies look & feel object of a full screen mode change.
public  booleanuSetRotatedStatus(boolean newStatus)
    
public  voidupdateCommandSet()
     Updates command set if this Displayable is visible.

Field Detail
FROZEN
final static int FROZEN(Code)
frozen state of DisplayableLF



HEIGHT
final static int HEIGHT(Code)
Used as an index into the viewport[], for the height.



HIDDEN
final static int HIDDEN(Code)
hidden state of DisplayableLF



INVALID_NATIVE_ID
final static int INVALID_NATIVE_ID(Code)
Uninitialized native resource id value.



SHOWN
final static int SHOWN(Code)
shown state of DisplayableLF



WIDTH
final static int WIDTH(Code)
Used as an index into the viewport[], for the width.



X
final static int X(Code)
Used as an index into the viewport[], for the x origin.



Y
final static int Y(Code)
Used as an index into the viewport[], for the y origin.



currentDisplay
Display currentDisplay(Code)
The current Display object.



defferedSizeChange
boolean defferedSizeChange(Code)
True, indicates that before being painted, this Displayable should be notified that its size has changed via uCallSizeChanged().



modelVersion
int modelVersion(Code)
Version number of this LF's data model. Should be updated when public data model has changed and be passed to native peer if visible. Native peer tags all its native events with this version to prevent user actions on obsolete copy of the data in native.



nativeId
int nativeId(Code)
The MidpDisplayable* of this Displayable while visible. INVALID_NATIVE_ID if no native resource has been created.



owner
Displayable owner(Code)
The owner of this view.



pendingInvalidate
boolean pendingInvalidate(Code)
Used to indicate the invalidate is needed



sawKeyPress
boolean sawKeyPress(Code)
True, if a key press is in progress.



sawPointerPress
boolean sawPointerPress(Code)
True, if a pointer press is in progress.



state
int state(Code)
current state of DisplayableLF (HIDDEN, SHOWN, or FROZEN)



widthheight
int widthheight(Code)
Width and height available to the Displayable.




Constructor Detail
DisplayableLFImpl
DisplayableLFImpl(Displayable d)(Code)
Creates DisplayableLF for the passed in Displayable.
Parameters:
  d - the Displayable object associated with this look & feel.




Method Detail
createNativeResource
abstract void createNativeResource()(Code)
Create native resource. Instance variable DisplayableLFImpl.nativeId nativeId must be set to the id of the new resource.



deleteNativeResource
void deleteNativeResource()(Code)
Delete native resource. Instance variable DisplayableLFImpl.nativeId nativeId is reset to DisplayableLFImpl.INVALID_NATIVE_ID INVALID_NATIVE_ID .



getVerticalScrollPosition
public int getVerticalScrollPosition()(Code)
Get the current vertical scroll position. int The vertical scroll position on a scale of 0-100



getVerticalScrollProportion
public int getVerticalScrollProportion()(Code)
Get the current vertical scroll proportion. ing The vertical scroll proportion on a scale of 0-100



lAddCommand
public void lAddCommand(Command cmd, int i)(Code)
Notifies look & feel object of a command addition to the Displayable. SYNC NOTE: The caller of this method handles synchronization.
Parameters:
  cmd - the command that was added
Parameters:
  i - the index of the added command in Displayable.commands[] array



lCallHide
void lCallHide()(Code)
Remove this Displayable from physical screen. The Displayable should unload any resource that was allocated. It is not required to clean the physical screen before this function returns.



lCallShow
void lCallShow()(Code)
Prepare to show this LF on physical screen. This is the internal version of showNotify() function as defined in MIDP spec. It is called immediately prior to this LF being made visible on the display. The LF should load any resource that is needed, layout. App's paint() should NOT be called in this function. Instead, it should be in the uCallPaint() that will be called on this LF shortly after. This function sets this DisplayableLF to SHOWN state.



lCommitPendingInteraction
public void lCommitPendingInteraction()(Code)
Called to commit any pending user interaction for the current item.



lGetCurrentDisplay
public Display lGetCurrentDisplay()(Code)
Return the Display instance in which the LF is currently shown. the Display instance in which the LF is shown. Null if not shown.



lGetDisplayable
public Displayable lGetDisplayable()(Code)
Return the associated Displayable object. SYNC NOTE: Since the Displayable and DisplayableLFImpl has 1-to-1 mapping, this function can be called from in or outside of LCDUILock. the public model object this LF is associated with.



lGetHeight
public int lGetHeight()(Code)
Get the height in pixels this Displayable is using. height of the area available to the application



lGetWidth
public int lGetWidth()(Code)
Get the width in pixels this Displayable is using. width of the area available to the application



lIsShown
public boolean lIsShown()(Code)
Implement public API isShown(). true if current DisplayableLF is interactive with user.



lRemoveCommand
public void lRemoveCommand(Command cmd, int i)(Code)
Notifies look &s; feel object of a command removal from the Displayable. SYNC NOTE: The caller of this method handles synchronization.
Parameters:
  cmd - the command that was removed
Parameters:
  i - the index of the removed command in Displayable.commands[] array



lRequestInvalidate
void lRequestInvalidate()(Code)
Called to schedule an "invalidate" for this Displayable. Invalidation is caused by things like size changes, content changes, or spontaneous traversal within the Item. SYNC NOTE: Caller must hold LCDUILock around this call.



lRequestPaint
void lRequestPaint(int x, int y, int width, int height, Object target)(Code)
Repaint this Displayable.
Parameters:
  x - The x coordinate of the region to repaint
Parameters:
  y - The y coordinate of the region to repaint
Parameters:
  width - The width of the region to repaint
Parameters:
  height - The height of the region to repaint
Parameters:
  target - an optional paint target to receive the paint requestwhen it returns via uCallPaint()



lRequestPaint
void lRequestPaint()(Code)
Repaints this Displayable. This is the same as calling repaint(0, 0, width, height, null)



lRequestPaintContents
void lRequestPaintContents()(Code)
Repaint the whole Displayable.



lSetDisplay
public void lSetDisplay(Display d)(Code)
Set the display instance the Displayable is associated with. Caller should hold LCDUILock around this call.
Parameters:
  d - Display instance in which this DisplayableLF is visible.null if this DisplayableLF is no longer visible.



lSetTicker
public void lSetTicker(Ticker oldTicker, Ticker newTicker)(Code)
Notifies Displayable's look & feel object of a ticker change. SYNC NOTE: The caller of this method handles synchronization.
Parameters:
  oldTicker - the old ticker, or null for no ticker
Parameters:
  newTicker - the new ticker, or null for no ticker



lSetTitle
public void lSetTitle(String oldTitle, String newTitle)(Code)
Notifies Displayable's look & feel object of a title change. SYNC NOTE: The caller of this method handles synchronization.
Parameters:
  oldTitle - the old title, or null for no title
Parameters:
  newTitle - the new title, or null for no title



tickerTextChanged
void tickerTextChanged(Ticker t)(Code)
Notification that the ticker has changed. This method is called from TickerLFImpl.
Parameters:
  t - the ticker associated with the TickerLFImpl



uCallFreeze
public void uCallFreeze()(Code)
Some "system modal dialog" takes over physical screen buffer and user input now or foreground is lost. This function calls lCallHide after holding LCDUILock and sets this DisplayableLF to FROZEN state.



uCallHide
public void uCallHide()(Code)
Remove this Displayable from physical screen. This function calls lCallHide after holding LCDUILock and sets this DisplayableLF to HIDDEN state.



uCallInvalidate
public void uCallInvalidate()(Code)
Called by the event handler to perform an invalidation of this Displayable. Subclass should override to perform re-layout. Default implementation does nothing.



uCallKeyEvent
public void uCallKeyEvent(int type, int keyCode)(Code)
Handle a raw key event from Display.
Parameters:
  type - type of event, defined in EventConstants
Parameters:
  keyCode - code of the key event



uCallKeyPressed
void uCallKeyPressed(int keyCode)(Code)
Handle a key press.
Parameters:
  keyCode - The key that was pressed



uCallKeyReleased
void uCallKeyReleased(int keyCode)(Code)
Handle a key release.
Parameters:
  keyCode - The key that was released



uCallKeyRepeated
void uCallKeyRepeated(int keyCode)(Code)
Handle a repeated key press.
Parameters:
  keyCode - The key that was pressed



uCallPaint
public void uCallPaint(Graphics g, Object target)(Code)
Display calls this method on it's current Displayable. Displayable uses this opportunity to do necessary stuff on the graphics context, this includes, paint Ticker, paint Title and translate as necessary.

The target Object of this repaint may be some Object initially set by this Displayable when the repaint was requested - allowing this Displayable to know exactly which Object it needs to call to service this repaint, rather than potentially querying all of its Objects to determine the one(s) which need painting. SYNC NOTE: The caller of this method handles synchronization.
Parameters:
  g - the graphics context to paint into.
Parameters:
  target - the target Object of this repaint




uCallPointerDragged
void uCallPointerDragged(int x, int y)(Code)
Handle a pointer drag event.
Parameters:
  x - The x coordinate of the drag
Parameters:
  y - The y coordinate of the drag



uCallPointerEvent
public void uCallPointerEvent(int type, int x, int y)(Code)
Called from the event delivery loop when a pointer event is seen.
Parameters:
  type - kind of pointer event
Parameters:
  x - x-coordinate of pointer event
Parameters:
  y - y-coordinate of pointer event



uCallPointerPressed
void uCallPointerPressed(int x, int y)(Code)
Handle a pointer press event.
Parameters:
  x - The x coordinate of the press
Parameters:
  y - The y coordinate of the press



uCallPointerReleased
void uCallPointerReleased(int x, int y)(Code)
Handle a pointer release event.
Parameters:
  x - The x coordinate of the release
Parameters:
  y - The y coordinate of the release



uCallScrollContent
public void uCallScrollContent(int scrollType, int thumbPosition)(Code)
This method notify displayable to scroll its content
Parameters:
  scrollType - scrollType
Parameters:
  thumbPosition -



uCallShow
public void uCallShow()(Code)
Prepare to show this LF on physical screen. This function will set correct screen mode screen mode then call lCallShow.



uCallSizeChanged
public void uCallSizeChanged(int w, int h)(Code)
Package private equivalent of sizeChanged().
Parameters:
  w - the new width
Parameters:
  h - the new height



uGetKeyMask
public int uGetKeyMask()(Code)
Called to get the key mask of all the keys that were pressed. Implement an interface function for CanvasLF only. keyMask The key mask of all the keys that were pressed.



uIsScrollNative
public boolean uIsScrollNative()(Code)
This method is used in repaint, in order to determine the translation of the draw coordinates. true, if the scroll responsibility is on the native platform.false, if the scroll is done at Java level.



uRequestPaint
void uRequestPaint()(Code)
Request to paint all of this Displayable (without holding a lock).



uSetFullScreenMode
public void uSetFullScreenMode(boolean mode)(Code)
Notifies look & feel object of a full screen mode change.
Parameters:
  mode - true, if canvas should be displayed without title, ticker, etc.; false otherwise



uSetRotatedStatus
public boolean uSetRotatedStatus(boolean newStatus)(Code)
Set status of screen rotation
Parameters:
  newStatus -



updateCommandSet
public void updateCommandSet()(Code)
Updates command set if this Displayable is visible. SYNC NOTE: Caller must hold LCDUILock around this call.



Methods inherited from java.lang.Object
public boolean equals(Object obj)(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.