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


com.sun.midp.chameleon.layers.PopupLayer
   javax.microedition.lcdui.DateEditor

All known Subclasses:   javax.microedition.lcdui.MiniDateEditor,
DateEditor
class DateEditor extends PopupLayer implements CommandListener(Code)
A utility class for editing date/time components for a DateField.


Field Summary
final protected static  intAM_PM
     Constant indicating the am/pm indicators, used in the process of current focus tracking inside the date editor.
final protected static  intCALENDAR
     Constant indicating the calendar, used in the process of current focus tracking inside the date editor.
protected static  int[]HOURS
     Static array holding the hour values.
final protected static  intHOURS_POPUP
     Constant indicating the hour popup, used in the process of current focus tracking inside the date editor.
protected static  int[]MINUTES
     Static array holding the minute values.
final protected static  intMINUTES_POPUP
     Constant indicating the minutes popup, used in the process of current focus tracking inside the date editor.
protected static  String[]MONTHS
     Static array holding the localized equivalent of month names.
final protected static  intMONTH_POPUP
     Constant indicating the month popup, used in the process of current focus tracking inside the date editor.
final  intPRESS_OUT_OF_BOUNDS
    
final protected static  intTRIG_TABLE
     Table of trigonometric functions, in 16.16 fixed point.
protected static  String[]YEARS
     Static array holding the year values.
final protected static  intYEAR_POPUP
     Constant indicating the year popup, used in the process of current focus tracking inside the date editor.
protected  booleanamHilighted
     Indicates whether am or pm is currently highlighted.
protected  booleanamSelected
     Indicates whether am or pm is currently selected.
protected  intcalendarBottomLimit
     Indicates calendar's bottom limit, used in traversal calculations.
protected  intcalendarRightLimit
     Indicates calendar's right limit, used in traversal calculations.
protected  intcalendarTopLimit
     Indicates calendar's top limit, used in traversal calculations.
protected  Commandcancel
     Special command to cancel any changes and close the date editor without any impact on the datefield that triggered this editor.
protected  Command[]commands
     The command array that holds both the commands associated with the date editor.
protected  intdateHilightX
     Indicates x co-ordinate of previously highlighted date, used in traversal calculations.
protected  intdateHilightY
     Indicates y co-ordinate of previously highlighted date, used in traversal calculations.
protected  intdayOffset
     The day offset.
protected  CalendareditDate
     The date currently being edited.
protected  intelementHeight
     Height of the element within the popup in its closed state.
protected  intelementWidth
     Width of the element within the popup in its closed state.
protected  intfocusOn
     Keeps track of the currently focused item inside the date editor.
protected  inthilightedDate
     Currently highlighted date in the calendar.
protected  DEPopupLayerhoursPopup
     The sub-popup layer used to select hour value.
protected  booleaninitialized
     Whether date field that triggered this date editor was initialized or not.
protected  intlastDay
     The last day of the month.
protected  DateFieldLFImpllf
     The DateFieldLFImpl that triggered this date editor.
protected  DEPopupLayerminutesPopup
     The sub-popup layer used to select minutes value.
protected  intmode
     The mode of the date field, that triggered this date editor.
protected  DEPopupLayermonthPopup
     The sub-popup layer used to select month value.
protected  intnextX
     The location x-coordinate, used to calculate where to draw the next component.
protected  intnextY
     The location y-coordinate, used to calculate where to draw the next component.
protected  intpopupHeight
     Height of a sub-popup in its closed state.
protected  intpopupWidth
     Width of a sub-popup in its closed state.
protected  intselectedDate
     Currently selected date in the calendar.
protected  Commandset
     Special command to set/save the changes done in the editor into the datefield that triggered this editor and close the editor.
protected  inttimeComponentsOffset
     The location offset to draw time components used for DateField.TIME and DateField.DATE_TIME modes.
protected  DEPopupLayeryearPopup
     The sub-popup layer used to select year value.

Constructor Summary
public  DateEditor(DateFieldLFImpl lf)
     Create a new DateEditor layer.

Method Summary
public  voidcallSizeChanged()
    
public  voidcommandAction(Command cmd, Displayable s)
     Handle a command action.
protected static  intcos(int angle)
     Utility method to return the cosine of an angle.
protected  intcreateYearStrings(int startYear)
     Recreates years string given a start year.
protected  intdaysInMonth(int month, int year)
     Utility method to calculate the number of days in a month.
protected  voiddrawDateComponents(Graphics g)
     Draw the date components.
protected  voiddrawHoursComponent(Graphics g)
     Draws hours popup content.
protected  voiddrawMinutesComponent(Graphics g)
     Draws minutes popup content.
protected  voiddrawMonthComponent(Graphics g)
     Draws month popup content.
protected  voiddrawTimeComponents(Graphics g)
     Draw the time components.
protected  voiddrawYearComonent(Graphics g)
     Draws year popup content.
 voidhideAllPopups()
     Hide all sub-popups triggered by this date editor.
public  voidinit()
    
public  booleanisPopupOpen()
    
public  booleanisSizeChanged()
    
public  booleankeyInput(int type, int code)
     Handles key input to the popup layer.
protected  voidpaintAmPm(Graphics g)
     Paint the am/pm indicators.
public  voidpaintBackground(Graphics g)
     Paints the background of the date editor layer.
public  voidpaintBody(Graphics g)
     Paints the body (open state) of the date editor layer.
protected  voidpaintCalendar(Graphics g)
     Paint the Calendar.
protected  voidpaintTime(Graphics g)
     Paint the clock.
public  booleanpointerInput(int type, int x, int y)
     Handles pointer input to the popup layer.
protected  voidpopulateDateComponents()
     Populate the date components.
protected  voidpopulateTimeComponents()
     Populate the time components.
protected  booleanselectFired()
     Called when select key is fired, to take further action on it, based on where the focus is on the date editor.
protected  voidsetDayOffset()
     Set the day offset.
protected  voidsetHoursPopupLocation()
     Set hours popup location using upper left corner coordinate of the DateEditor layer and relative coordinates of the popup anchor.
public  voidsetLocation(int x, int y)
     Sets the location of the popup layer.
protected  voidsetMinutesPopupLocation()
     Set minutes popup location using upper left corner coordinate of the DateEditor layer and relative coordinates of the popup anchor.
protected  voidsetMonthPopupLocation()
     Set month popup location using upper left corner coordinate of the DateEditor layer and relative coordinates of the popup anchor.
protected  voidsetPopupLocation(DEPopupLayer popup, Image image, int[] bounds)
    
public  voidsetPopupOpen(boolean popUpOpen)
    
public  voidsetSizeChanged()
    
protected  voidsetYearPopupLocation()
     Set year popup location using upper left corner coordinate of the DateEditor layer and relative coordinates of the popup anchor.
 voidshow()
     Show the date editor popup.
protected static  intsin(int angle)
     Utility method to return the sin of an angle.
protected  booleantraverseAmPm(int code)
     Handle internal traversal between the am/pm indicators.
protected  booleantraverseCalendar(int code)
     Handle internal traversal within the calendar.
protected  booleantraverseEditor(int code)
     Handles internal traversal within the date editor.

Field Detail
AM_PM
final protected static int AM_PM(Code)
Constant indicating the am/pm indicators, used in the process of current focus tracking inside the date editor.



CALENDAR
final protected static int CALENDAR(Code)
Constant indicating the calendar, used in the process of current focus tracking inside the date editor.



HOURS
protected static int[] HOURS(Code)
Static array holding the hour values.



HOURS_POPUP
final protected static int HOURS_POPUP(Code)
Constant indicating the hour popup, used in the process of current focus tracking inside the date editor.



MINUTES
protected static int[] MINUTES(Code)
Static array holding the minute values.



MINUTES_POPUP
final protected static int MINUTES_POPUP(Code)
Constant indicating the minutes popup, used in the process of current focus tracking inside the date editor.



MONTHS
protected static String[] MONTHS(Code)
Static array holding the localized equivalent of month names.



MONTH_POPUP
final protected static int MONTH_POPUP(Code)
Constant indicating the month popup, used in the process of current focus tracking inside the date editor.



PRESS_OUT_OF_BOUNDS
final int PRESS_OUT_OF_BOUNDS(Code)



TRIG_TABLE
final protected static int TRIG_TABLE(Code)
Table of trigonometric functions, in 16.16 fixed point.



YEARS
protected static String[] YEARS(Code)
Static array holding the year values.



YEAR_POPUP
final protected static int YEAR_POPUP(Code)
Constant indicating the year popup, used in the process of current focus tracking inside the date editor.



amHilighted
protected boolean amHilighted(Code)
Indicates whether am or pm is currently highlighted. True indicates "am" is highlighted and false indicates "pm" is highlighted.



amSelected
protected boolean amSelected(Code)
Indicates whether am or pm is currently selected. True indicates "am" is selected and false indicates "pm" is selected.



calendarBottomLimit
protected int calendarBottomLimit(Code)
Indicates calendar's bottom limit, used in traversal calculations.



calendarRightLimit
protected int calendarRightLimit(Code)
Indicates calendar's right limit, used in traversal calculations.



calendarTopLimit
protected int calendarTopLimit(Code)
Indicates calendar's top limit, used in traversal calculations.



cancel
protected Command cancel(Code)
Special command to cancel any changes and close the date editor without any impact on the datefield that triggered this editor.



commands
protected Command[] commands(Code)
The command array that holds both the commands associated with the date editor.



dateHilightX
protected int dateHilightX(Code)
Indicates x co-ordinate of previously highlighted date, used in traversal calculations.



dateHilightY
protected int dateHilightY(Code)
Indicates y co-ordinate of previously highlighted date, used in traversal calculations.



dayOffset
protected int dayOffset(Code)
The day offset.



editDate
protected Calendar editDate(Code)
The date currently being edited.



elementHeight
protected int elementHeight(Code)
Height of the element within the popup in its closed state.



elementWidth
protected int elementWidth(Code)
Width of the element within the popup in its closed state.



focusOn
protected int focusOn(Code)
Keeps track of the currently focused item inside the date editor.



hilightedDate
protected int hilightedDate(Code)
Currently highlighted date in the calendar.



hoursPopup
protected DEPopupLayer hoursPopup(Code)
The sub-popup layer used to select hour value.



initialized
protected boolean initialized(Code)
Whether date field that triggered this date editor was initialized or not.



lastDay
protected int lastDay(Code)
The last day of the month.



lf
protected DateFieldLFImpl lf(Code)
The DateFieldLFImpl that triggered this date editor.



minutesPopup
protected DEPopupLayer minutesPopup(Code)
The sub-popup layer used to select minutes value.



mode
protected int mode(Code)
The mode of the date field, that triggered this date editor.



monthPopup
protected DEPopupLayer monthPopup(Code)
The sub-popup layer used to select month value.



nextX
protected int nextX(Code)
The location x-coordinate, used to calculate where to draw the next component.



nextY
protected int nextY(Code)
The location y-coordinate, used to calculate where to draw the next component.



popupHeight
protected int popupHeight(Code)
Height of a sub-popup in its closed state.



popupWidth
protected int popupWidth(Code)
Width of a sub-popup in its closed state.



selectedDate
protected int selectedDate(Code)
Currently selected date in the calendar.



set
protected Command set(Code)
Special command to set/save the changes done in the editor into the datefield that triggered this editor and close the editor.



timeComponentsOffset
protected int timeComponentsOffset(Code)
The location offset to draw time components used for DateField.TIME and DateField.DATE_TIME modes.



yearPopup
protected DEPopupLayer yearPopup(Code)
The sub-popup layer used to select year value.




Constructor Detail
DateEditor
public DateEditor(DateFieldLFImpl lf)(Code)
Create a new DateEditor layer.
Parameters:
  lf - The DateFieldLFImpl that triggered this date editor




Method Detail
callSizeChanged
public void callSizeChanged()(Code)



commandAction
public void commandAction(Command cmd, Displayable s)(Code)
Handle a command action.
Parameters:
  cmd - The Command to handle
Parameters:
  s - The Displayable with the Command



cos
protected static int cos(int angle)(Code)
Utility method to return the cosine of an angle.
Parameters:
  angle - The angle to compute the cosine of int The cosine of the angle



createYearStrings
protected int createYearStrings(int startYear)(Code)
Recreates years string given a start year.
Parameters:
  startYear - the first year to be added to the YEARS array selected year in the newly created array



daysInMonth
protected int daysInMonth(int month, int year)(Code)
Utility method to calculate the number of days in a month.
Parameters:
  month - The month to use
Parameters:
  year - The year the month occurs in int The number of days in the month



drawDateComponents
protected void drawDateComponents(Graphics g)(Code)
Draw the date components.
Parameters:
  g - The Graphics object to paint to



drawHoursComponent
protected void drawHoursComponent(Graphics g)(Code)
Draws hours popup content.
Parameters:
  g - The Graphics object to paint to



drawMinutesComponent
protected void drawMinutesComponent(Graphics g)(Code)
Draws minutes popup content.
Parameters:
  g - The Graphics object to paint to



drawMonthComponent
protected void drawMonthComponent(Graphics g)(Code)
Draws month popup content.
Parameters:
  g - The Graphics object to paint to



drawTimeComponents
protected void drawTimeComponents(Graphics g)(Code)
Draw the time components.
Parameters:
  g - The Graphics object to paint to



drawYearComonent
protected void drawYearComonent(Graphics g)(Code)
Draws year popup content.
Parameters:
  g - The Graphics object to paint to



hideAllPopups
void hideAllPopups()(Code)
Hide all sub-popups triggered by this date editor.



init
public void init()(Code)
Initialize Date editor



isPopupOpen
public boolean isPopupOpen()(Code)
Return Popup layer flag true if popup Layer is shown



isSizeChanged
public boolean isSizeChanged()(Code)
Return sizeChanged flag true if size change iccurs



keyInput
public boolean keyInput(int type, int code)(Code)
Handles key input to the popup layer.
Parameters:
  type - the type of this key event (pressed, released)
Parameters:
  code - the code of this key event true always, since popupLayers swallow all key events



paintAmPm
protected void paintAmPm(Graphics g)(Code)
Paint the am/pm indicators.
Parameters:
  g - The graphics context to paint to



paintBackground
public void paintBackground(Graphics g)(Code)
Paints the background of the date editor layer.
Parameters:
  g - The graphics context to paint to



paintBody
public void paintBody(Graphics g)(Code)
Paints the body (open state) of the date editor layer.
Parameters:
  g - The graphics context to paint to



paintCalendar
protected void paintCalendar(Graphics g)(Code)
Paint the Calendar.
Parameters:
  g - The Graphics context to paint to



paintTime
protected void paintTime(Graphics g)(Code)
Paint the clock.
Parameters:
  g - The Graphics to paint to



pointerInput
public boolean pointerInput(int type, int x, int y)(Code)
Handles pointer input to the popup layer.
Parameters:
  type - the type of this key event (pressed, released)
Parameters:
  x - x coordinate of pointer
Parameters:
  y - y coordinate of pointer true always, since popupLayers swallow all pointer events



populateDateComponents
protected void populateDateComponents()(Code)
Populate the date components.



populateTimeComponents
protected void populateTimeComponents()(Code)
Populate the time components.



selectFired
protected boolean selectFired()(Code)
Called when select key is fired, to take further action on it, based on where the focus is on the date editor. true if key was handled, false otherwise



setDayOffset
protected void setDayOffset()(Code)
Set the day offset.



setHoursPopupLocation
protected void setHoursPopupLocation()(Code)
Set hours popup location using upper left corner coordinate of the DateEditor layer and relative coordinates of the popup anchor.



setLocation
public void setLocation(int x, int y)(Code)
Sets the location of the popup layer.
Parameters:
  x - the x-coordinate of the popup layer location
Parameters:
  y - the y-coordinate of the popup layer location



setMinutesPopupLocation
protected void setMinutesPopupLocation()(Code)
Set minutes popup location using upper left corner coordinate of the DateEditor layer and relative coordinates of the popup anchor.



setMonthPopupLocation
protected void setMonthPopupLocation()(Code)
Set month popup location using upper left corner coordinate of the DateEditor layer and relative coordinates of the popup anchor.



setPopupLocation
protected void setPopupLocation(DEPopupLayer popup, Image image, int[] bounds)(Code)
Set popup location and bounds
Parameters:
  popup - popup to relocate
Parameters:
  image - background image of popup
Parameters:
  bounds - relative bounds of the popup layer



setPopupOpen
public void setPopupOpen(boolean popUpOpen)(Code)
Set popup Layer flag
Parameters:
  popUpOpen - true if popup Layer is shown



setSizeChanged
public void setSizeChanged()(Code)
Set sizeChanged flag to true



setYearPopupLocation
protected void setYearPopupLocation()(Code)
Set year popup location using upper left corner coordinate of the DateEditor layer and relative coordinates of the popup anchor.



show
void show()(Code)
Show the date editor popup.



sin
protected static int sin(int angle)(Code)
Utility method to return the sin of an angle.
Parameters:
  angle - The angle to compute the sin of int The sin of the angle



traverseAmPm
protected boolean traverseAmPm(int code)(Code)
Handle internal traversal between the am/pm indicators.
Parameters:
  code - the code of this key event true if internal traversal occurred, false otherwise



traverseCalendar
protected boolean traverseCalendar(int code)(Code)
Handle internal traversal within the calendar.
Parameters:
  code - the code of this key event true if internal traversal occurred, false otherwise



traverseEditor
protected boolean traverseEditor(int code)(Code)
Handles internal traversal within the date editor.
Parameters:
  code - the code of this key event true always, since popup layers swallow all events



Fields inherited from com.sun.midp.chameleon.layers.PopupLayer
protected Command[] commands(Code)(Java Doc)
protected CommandListener listener(Code)(Java Doc)

Methods inherited from com.sun.midp.chameleon.layers.PopupLayer
public CommandListener getCommandListener()(Code)(Java Doc)
public Command[] getCommands()(Code)(Java Doc)
public boolean handlePoint(int x, int y)(Code)(Java Doc)
public void setCommandListener(CommandListener listener)(Code)(Java Doc)
public void setCommands(Command[] commands)(Code)(Java Doc)
public void setVisible(boolean visible)(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.