Java Doc for CWindow.java in  » 6.0-JDK-Modules » j2me » com » sun » midp » chameleon » 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 » com.sun.midp.chameleon 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.midp.chameleon.CWindow

All known Subclasses:   com.sun.midp.chameleon.MIDPWindow,
CWindow
abstract public class CWindow (Code)
This class is a top-level "window" in Chameleon. A window is a collection of other layers and serves to maintain a z-ordering of those layers. The window also contains the complex repaint logic to support semi-transparent windows, their dirty regions, and the rectangle logic to repaint other layers of the window when necessary.


Field Summary
final public static  intH
    
final public static  intW
    
final public static  intX
    
final public static  intY
    
protected  BackgroundLayerbgLayer
     Background layer of this window, should be the bottom most layer of the window, can be invisible for transparent windows.
protected  int[]bounds
     An array holding the bounds of this window.
protected  intcXcYcWcH
    
protected  intcolor
    
protected  booleandirty
    
protected  intdirtyCount
    
protected  CLayer[]dirtyLayers
    
protected  intdirtyMaxCount
    
protected  Fontfont
    
protected  CLayerListlayers
     Ordered bi-directional list with all the layers of this window.
protected  inttranXtranY
    

Constructor Summary
public  CWindow(Image bgImage, int bgColor)
     Construct a new CWindow given the background image and color. If the background image is null, the fill color will be used instead.

Method Summary
public  booleanaddLayer(CLayer layer)
     Add a new CLayer to the "deck" of layers associated with this CWindow.
public  booleanisDirty()
     Returns true if any layer of this window is in need of repainting.
public  booleankeyInput(int type, int keyCode)
     Allow this window to process key input.
public  booleanmethodInput(String str)
     Handle input from some type of device-dependent input method.
public  voidpaint(Graphics g, CGraphicsQ refreshQ)
     Paint this window.
public  booleanpointerInput(int type, int x, int y)
     Allow this window to process pointer input.
public  booleanrelocateLayer(CLayer layer, int x, int y, int w, int h)
    
public  booleanremoveLayer(CLayer layer)
     Remove a layer from this CWindow.
abstract public  voidrequestRepaint()
     Request a repaint.
public  voidresize()
    
public  voidsetAllDirty()
     Sets all visible layers to dirty state. The method is needed on system events like screen rotation, when generic layers system is not capabel to properly analyze layers changes, e.g.
synchronized  voidsetBackground(Image bgImage, int bgColor)
     Establish a background.
public  voidsetDirty()
     Mark this window as being dirty and requiring a repaint.
 CLayerElementsweepLayer(CLayer layer)
     Update dirty regions of all visible layers in the stack regarding the entire area of the given layer as being dirty.

Field Detail
H
final public static int H(Code)
Constant used to reference the '3' index of the bounds array



W
final public static int W(Code)
Constant used to reference the '2' index of the bounds array



X
final public static int X(Code)
Constant used to reference the '0' index of the bounds array



Y
final public static int Y(Code)
Constant used to reference the '1' index of the bounds array



bgLayer
protected BackgroundLayer bgLayer(Code)
Background layer of this window, should be the bottom most layer of the window, can be invisible for transparent windows.



bounds
protected int[] bounds(Code)
An array holding the bounds of this window. The indices are as follows: 0 = window's 'x' coordinate 1 = window's 'y' coordinate 2 = window's width 3 = window's height Note: The window's x and y coordinate can only be interpreted by some outside entity. For example, if some sort of manager was in charge of overseeing the placement of windows on the screen, it could do so by using the x and y coordinate values of this window's bounds.



cXcYcWcH
protected int cXcYcWcH(Code)
Cache values for the clip rectangle



color
protected int color(Code)
Cache value for the graphics foreground color



dirty
protected boolean dirty(Code)
Flag indicating that at least one layer belonging to this window is in need of repainting



dirtyCount
protected int dirtyCount(Code)
The number of dirty layers to repaint



dirtyLayers
protected CLayer[] dirtyLayers(Code)
Layers replication to not keep the lock on painting



dirtyMaxCount
protected int dirtyMaxCount(Code)
Initial maximal number of the dirty layers



font
protected Font font(Code)
Cache value for the graphics font



layers
protected CLayerList layers(Code)
Ordered bi-directional list with all the layers of this window.



tranXtranY
protected int tranXtranY(Code)
Cache values for the graphics translation




Constructor Detail
CWindow
public CWindow(Image bgImage, int bgColor)(Code)
Construct a new CWindow given the background image and color. If the background image is null, the fill color will be used instead. In the case null image and negative color are specified the window is considered to be transparent.
Parameters:
  bgImage - the background image to use for the window background
Parameters:
  bgColor - the background fill color in 0xrrggbbaa format to usefor the window background if the background image is null.




Method Detail
addLayer
public boolean addLayer(CLayer layer)(Code)
Add a new CLayer to the "deck" of layers associated with this CWindow. This method will sequentially add layers to the window, placing subsequently added layers on top of previously added layers.
Parameters:
  layer - the new layer to add to this window true if new layer was added, false otherwise



isDirty
public boolean isDirty()(Code)
Returns true if any layer of this window is in need of repainting. true if any layer of this window is marked as 'dirty' and needs repainting.



keyInput
public boolean keyInput(int type, int keyCode)(Code)
Allow this window to process key input. The type of key input will be press, release, repeat, etc. The key code will identify which key generated the event. This method will return true if the event was processed by this window or one of its layers, false otherwise.
Parameters:
  type - the type of key event (press, release, repeat)
Parameters:
  keyCode - the identifier of the key which generated the event true if this window or one of its layers processed the event



methodInput
public boolean methodInput(String str)(Code)
Handle input from some type of device-dependent input method. This could be input from something such as T9, or a phonebook lookup, etc.
Parameters:
  str - the text to handle as direct input true if this window or one of its layers processed the event



paint
public void paint(Graphics g, CGraphicsQ refreshQ)(Code)
Paint this window. This method should not generally be overridden by subclasses. This method carefully stores the clip, translation, and color before calling into subclasses. The graphics context should be translated such that it is in this window's coordinate space (0,0 is the top left corner of this window).
Parameters:
  g - The graphics object to use to paint this window.
Parameters:
  refreshQ - The custom queue which holds the set of refreshregions needing to be blitted to the screen



pointerInput
public boolean pointerInput(int type, int x, int y)(Code)
Allow this window to process pointer input. The type of pointer input will be press, release, drag, etc. The x and y coordinates will identify the point at which the pointer event occurred in the coordinate system of this window. This window will translate the coordinates appropriately for each layer contained in this window. This method will return true if the event was processed by this window or one of its layers, false otherwise.
Parameters:
  type - the type of pointer event (press, release, drag)
Parameters:
  x - the x coordinate of the location of the event
Parameters:
  y - the y coordinate of the location of the event true if this window or one of its layers processed the event



relocateLayer
public boolean relocateLayer(CLayer layer, int x, int y, int w, int h)(Code)
Move layer to anotger location
Parameters:
  newBounds - new bounds for this layer
Parameters:
  x - New 'x' coordinate of the layer's origin
Parameters:
  y - New 'y' coordinate of the layer's origin
Parameters:
  w - New width of the layer
Parameters:
  h - New height of the layer true if successful, false otherwise



removeLayer
public boolean removeLayer(CLayer layer)(Code)
Remove a layer from this CWindow. This method will remove the given layer from the "deck" of layers associated with this CWindow. If successfull, this method will return true, false otherwise (for example, if the layer does not belong to this window).
Parameters:
  layer - the layer to remove from this window true if successful, false otherwise



requestRepaint
abstract public void requestRepaint()(Code)
Request a repaint. This method MUST be overridden by subclasses to provide the implementation.



resize
public void resize()(Code)
Resize window and its background according to updated skin values



setAllDirty
public void setAllDirty()(Code)
Sets all visible layers to dirty state. The method is needed on system events like screen rotation, when generic layers system is not capabel to properly analyze layers changes, e.g. of move/resize kind. It could be fixed in the future and this method will be out of use.



setBackground
synchronized void setBackground(Image bgImage, int bgColor)(Code)
Establish a background. This method will evaluate the parameters and create a background which is appropriate. If the image is non-null, the image will be used to create the background. If the image is null, the values for the colors will be used and the background will be painted in fill color instead. If the image is null, and the background color is a negative value, this layer will become transparent and no background will be painted.
Parameters:
  bgImage - the image to use for the background tile (or null)
Parameters:
  bgColor - if the image is null, use this color as a backgroundfill color



setDirty
public void setDirty()(Code)
Mark this window as being dirty and requiring a repaint.



sweepLayer
CLayerElement sweepLayer(CLayer layer)(Code)
Update dirty regions of all visible layers in the stack regarding the entire area of the given layer as being dirty. The method is needed to perform layer move/resize/remove opertion, since other layers should be informed of changed area.
Parameters:
  layer - the layer whose area should be reported as dirty toother stack layers



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.