Java Doc for SubMenuCommand.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
   javax.microedition.lcdui.Command
      com.sun.midp.chameleon.SubMenuCommand

SubMenuCommand
public class SubMenuCommand extends Command (Code)
The SubMenuCommand is an extension of LCDUI's Command object. It represents a collection of Commands which should be made available as a type of "sub menu" under a single Command heading.


Field Summary
protected  CommandListenerlistener
     The CommandListener to notify when a sub command is selected.
protected  Command[]subCommands
     An array holding the Commands that are part of the "submenu".

Constructor Summary
public  SubMenuCommand(String label, int commandType, int priority)
     Creates a new command object with the given short label, type, and priority. The newly created command has no long label.
public  SubMenuCommand(String shortLabel, String longLabel, int commandType, int priority)
     Creates a new command object with the given labels, type, and priority.

The short label is required and must not be null.


Method Summary
public synchronized  voidaddSubCommand(Command cmd)
     Adds the given Command to the list of sub commands.
public synchronized  voidaddSubCommands(Command[] cmds)
     Adds the given set of Commands to the list of sub commands.
public synchronized  Command[]getSubCommands()
     Retrieves the set of subcommands from this SubMenuCommand. This method will return a copy of the internal array holding the set of sub menu Commands. an array holding the set of Commands to be shownon the "submenu" for this SubMenuCommand.
public synchronized  voidnotifyListener(Command c)
     Called to notify the CommandListener of this SubMenuCommand that a sub command has been selected.
public synchronized  voidremoveAll()
     Removes all commands that are currently in the list of sub commands.
public  voidsetListener(CommandListener listener)
     Sets the CommandListener of this SubMenuCommand to notify when one of the sub commands is selected.

Field Detail
listener
protected CommandListener listener(Code)
The CommandListener to notify when a sub command is selected.



subCommands
protected Command[] subCommands(Code)
An array holding the Commands that are part of the "submenu".




Constructor Detail
SubMenuCommand
public SubMenuCommand(String label, int commandType, int priority)(Code)
Creates a new command object with the given short label, type, and priority. The newly created command has no long label. This constructor is identical to Command(label, null, commandType, priority).
Parameters:
  label - the command's short label
Parameters:
  commandType - the command's type
Parameters:
  priority - the command's priority value
throws:
  NullPointerException - if label is null
throws:
  IllegalArgumentException - if the commandTypeis an invalid type
See Also:   SubMenuCommand.Command(String,String,int,int)



SubMenuCommand
public SubMenuCommand(String shortLabel, String longLabel, int commandType, int priority)(Code)
Creates a new command object with the given labels, type, and priority.

The short label is required and must not be null. The long label is optional and may be null if the command is to have no long label.


Parameters:
  shortLabel - the command's short label
Parameters:
  longLabel - the command's long label, or null if none
Parameters:
  commandType - the command's type
Parameters:
  priority - the command's priority value
throws:
  NullPointerException - if shortLabel isnull
throws:
  IllegalArgumentException - if the commandType is aninvalid type




Method Detail
addSubCommand
public synchronized void addSubCommand(Command cmd)(Code)
Adds the given Command to the list of sub commands.
Parameters:
  cmd - The Command to add to the current list of submenu commands
throws:
  IllegalArgumentException - if the given Command is null



addSubCommands
public synchronized void addSubCommands(Command[] cmds)(Code)
Adds the given set of Commands to the list of sub commands.
Parameters:
  cmds - An array of Commands to add to the current list of submenu commands
throws:
  IllegalArgumentException - if the given array is null



getSubCommands
public synchronized Command[] getSubCommands()(Code)
Retrieves the set of subcommands from this SubMenuCommand. This method will return a copy of the internal array holding the set of sub menu Commands. an array holding the set of Commands to be shownon the "submenu" for this SubMenuCommand. 'null'means this SubMenuCommand has no sub commands.



notifyListener
public synchronized void notifyListener(Command c)(Code)
Called to notify the CommandListener of this SubMenuCommand that a sub command has been selected.
Parameters:
  c - the Command that was selected



removeAll
public synchronized void removeAll()(Code)
Removes all commands that are currently in the list of sub commands.



setListener
public void setListener(CommandListener listener)(Code)
Sets the CommandListener of this SubMenuCommand to notify when one of the sub commands is selected.
Parameters:
  listener - the CommandListener to notify when a sub command isselected



Fields inherited from javax.microedition.lcdui.Command
final public static int BACK(Code)(Java Doc)
final public static int CANCEL(Code)(Java Doc)
final public static int EXIT(Code)(Java Doc)
final public static int HELP(Code)(Java Doc)
final public static int ITEM(Code)(Java Doc)
final public static int OK(Code)(Java Doc)
final public static int SCREEN(Code)(Java Doc)
final public static int STOP(Code)(Java Doc)

Methods inherited from javax.microedition.lcdui.Command
public int getCommandType()(Code)(Java Doc)
public String getLabel()(Code)(Java Doc)
public String getLongLabel()(Code)(Java Doc)
public int getPriority()(Code)(Java Doc)

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.