Java Doc for Displayable.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.Displayable

All known Subclasses:   javax.microedition.lcdui.Canvas,  javax.microedition.lcdui.Screen,
Displayable
abstract public class Displayable (Code)
An object that has the capability of being placed on the display. A Displayable object may have a title, a ticker, zero or more commands and a listener associated with it. The contents displayed and their interaction with the user are defined by subclasses.

The title string may contain line breaks. The display of the title string must break accordingly. For example, if only a single line is available for a title and the string contains a line break then only the characters up to the line break are displayed.

Unless otherwise specified by a subclass, the default state of newly created Displayable objects is as follows:

  • it is not visible on the Display;
  • there is no Ticker associated with this Displayable;
  • the title is null;
  • there are no Commands present; and
  • there is no CommandListener present.

since:
   MIDP 1.0


Field Summary
 Commandcommands
    
 DisplayableLFdisplayableLF
    
 booleanisInFullScreenMode
    
 booleanisRotated
    
 CommandListenerlistener
    
 intnumCommands
    
 Tickerticker
    
 Stringtitle
    

Constructor Summary
 Displayable()
    
 Displayable(String title)
    

Method Summary
public  voidaddCommand(Command cmd)
     Adds a command to the Displayable.
 intaddCommandImpl(Command cmd)
    
public  intgetHeight()
     Gets the height in pixels of the displayable area available to the application.
 DisplayableLFgetLF()
     Gets look&feel for this Displayable object This method is implemented in the subclasses.
public  TickergetTicker()
     Gets the ticker used by this Displayable.
public  StringgetTitle()
     Gets the title of the Displayable.
public  intgetWidth()
     Gets the width in pixels of the displayable area available to the application.
public  booleanisShown()
     Checks if the Displayable is actually visible on the display.
 voiditemStateChanged(Item src)
     Called to schedule a call to itemStateChanged() due to a change in the given Item.
public  voidremoveCommand(Command cmd)
     Removes a command from the Displayable.
 intremoveCommandImpl(Command cmd)
    
public  voidsetCommandListener(CommandListener l)
     Sets a listener for Command Commands to this Displayable, replacing any previous CommandListener.
public  voidsetTicker(Ticker ticker)
     Sets a ticker for use with this Displayable, replacing any previous ticker. If null, removes the ticker object from this Displayable.
public  voidsetTitle(String s)
     Sets the title of the Displayable.
protected  voidsizeChanged(int w, int h)
     The implementation calls this method when the available area of the Displayable has been changed.
 voiduCallItemStateChanged(Item src)
     Called by the event handler to notify any ItemStateListener of a change in the given Item.

Field Detail
commands
Command commands(Code)
An array of Commands added to this Displayable



displayableLF
DisplayableLF displayableLF(Code)
The Look &s; Feel object associated with this Displayable



isInFullScreenMode
boolean isInFullScreenMode(Code)
True, if this Displayable is in full screen mode



isRotated
boolean isRotated(Code)
True, if this Displayable is rotated



listener
CommandListener listener(Code)
The CommandListener for Commands added to this Displayable



numCommands
int numCommands(Code)
The number of Commands added to this Displayable



ticker
Ticker ticker(Code)
The ticker that may be set for this Displayable



title
String title(Code)
The title for this Displayable




Constructor Detail
Displayable
Displayable()(Code)
Create a new Displayable



Displayable
Displayable(String title)(Code)
Create a new Displayable with a passed in title
Parameters:
  title - the Displayable's title, or null for no title




Method Detail
addCommand
public void addCommand(Command cmd)(Code)
Adds a command to the Displayable. The implementation may choose, for example, to add the command to any of the available soft buttons or place it in a menu. If the added command is already in the screen (tested by comparing the object references), the method has no effect. If the Displayable is actually visible on the display, and this call affects the set of visible commands, the implementation should update the display as soon as it is feasible to do so.
Parameters:
  cmd - the command to be added
throws:
  NullPointerException - if cmd isnull



addCommandImpl
int addCommandImpl(Command cmd)(Code)
Add a Command to this Displayable
Parameters:
  cmd - The Command to add to this Displayable command index



getHeight
public int getHeight()(Code)
Gets the height in pixels of the displayable area available to the application. The value returned is appropriate for the particular Displayable subclass. This value may depend on how the device uses the display and may be affected by the presence of a title, a ticker, or commands. This method returns the proper result at all times, even if the Displayable object has not yet been shown. height of the area available to the application



getLF
DisplayableLF getLF()(Code)
Gets look&feel for this Displayable object This method is implemented in the subclasses. - DisplayableLF for this Displayable object



getTicker
public Ticker getTicker()(Code)
Gets the ticker used by this Displayable. ticker object used, or null if noticker is present
See Also:   Displayable.setTicker



getTitle
public String getTitle()(Code)
Gets the title of the Displayable. Returns null if there is no title. the title of the instance, or null if no title
See Also:   Displayable.setTitle



getWidth
public int getWidth()(Code)
Gets the width in pixels of the displayable area available to the application. The value returned is appropriate for the particular Displayable subclass. This value may depend on how the device uses the display and may be affected by the presence of a title, a ticker, or commands. This method returns the proper result at all times, even if the Displayable object has not yet been shown. width of the area available to the application



isShown
public boolean isShown()(Code)
Checks if the Displayable is actually visible on the display. In order for a Displayable to be visible, all of the following must be true: the Display's MIDlet must be running in the foreground, the Displayable must be the Display's current screen, and the Displayable must not be obscured by a system screen. true if theDisplayable is currently visible



itemStateChanged
void itemStateChanged(Item src)(Code)
Called to schedule a call to itemStateChanged() due to a change in the given Item.
Parameters:
  src - the Item which has changed



removeCommand
public void removeCommand(Command cmd)(Code)
Removes a command from the Displayable. If the command is not in the Displayable (tested by comparing the object references), the method has no effect. If the Displayable is actually visible on the display, and this call affects the set of visible commands, the implementation should update the display as soon as it is feasible to do so. If cmd is null, this method does nothing.
Parameters:
  cmd - the command to be removed



removeCommandImpl
int removeCommandImpl(Command cmd)(Code)
Remove a Command from this Displayable
Parameters:
  cmd - The Command to remove from this Displayable command index



setCommandListener
public void setCommandListener(CommandListener l)(Code)
Sets a listener for Command Commands to this Displayable, replacing any previous CommandListener. A null reference is allowed and has the effect of removing any existing listener.
Parameters:
  l - the new listener, or null.



setTicker
public void setTicker(Ticker ticker)(Code)
Sets a ticker for use with this Displayable, replacing any previous ticker. If null, removes the ticker object from this Displayable. The same ticker may be shared by several Displayable objects within an application. This is done by calling setTicker() with the same Ticker object on several different Displayable objects. If the Displayable is actually visible on the display, the implementation should update the display as soon as it is feasible to do so.

The existence of a ticker may affect the size of the area available for Displayable's contents. Addition, removal, or the setting of the ticker at runtime may dynamically change the size of the content area. This is most important to be aware of when using the Canvas class. If the available area does change, the application will be notified via a call to Displayable.sizeChanged(int,int) sizeChanged() .


Parameters:
  ticker - the ticker object used on this screen
See Also:   Displayable.getTicker



setTitle
public void setTitle(String s)(Code)
Sets the title of the Displayable. If null is given, removes the title.

If the Displayable is actually visible on the display, the implementation should update the display as soon as it is feasible to do so.

The existence of a title may affect the size of the area available for Displayable content. Addition, removal, or the setting of the title text at runtime may dynamically change the size of the content area. This is most important to be aware of when using the Canvas class. If the available area does change, the application will be notified via a call to Displayable.sizeChanged(int,int) sizeChanged() .


Parameters:
  s - the new title, or null for no title
See Also:   Displayable.getTitle



sizeChanged
protected void sizeChanged(int w, int h)(Code)
The implementation calls this method when the available area of the Displayable has been changed. The "available area" is the area of the display that may be occupied by the application's contents, such as Items in a Form or graphics within a Canvas. It does not include space occupied by a title, a ticker, command labels, scroll bars, system status area, etc. A size change can occur as a result of the addition, removal, or changed contents of any of these display features.

This method is called at least once before the Displayable is shown for the first time. If the size of a Displayable changes while it is visible, sizeChanged will be called. If the size of a Displayable changes while it is not visible, calls to sizeChanged may be deferred. If the size had changed while the Displayable was not visible, sizeChanged will be called at least once at the time the Displayable becomes visible once again.

The default implementation of this method in Displayable and its subclasses defined in this specification must be empty. This method is intended solely for being overridden by the application. This method is defined on Displayable even though applications are prohibited from creating direct subclasses of Displayable. It is defined here so that applications can override it in subclasses of Canvas and Form. This is useful for Canvas subclasses to tailor their graphics and for Forms to modify Item sizes and layout directives in order to fit their contents within the the available display area.


Parameters:
  w - the new width in pixels of the available area
Parameters:
  h - the new height in pixels of the available area



uCallItemStateChanged
void uCallItemStateChanged(Item src)(Code)
Called by the event handler to notify any ItemStateListener of a change in the given Item. The default implementation of this function does nothing.
Parameters:
  src - The Item which has changed



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.