Services | Updates | Contact
Home | Ajax | BioInformatics | Dojo | EAI | EJB | Hibernate | J2ME | Java | Java Glossary | Java Servlets | JavaScript | Jboss | JDBC | JDO | Jmeter | JSF | JSP | JUnit | Maven | MySQL | Spring Framework | SQL | Struts | Technology | WAP | Web Services | XML
Search All Tutorials
Top Search: Loan Struts Open Source
WebLogic Server Tools for Eclipse 3.3
BEA WebLogic Server Tools is a set of plugins for the Eclipse IDE designed to help develop, deploy and debug application
 
Interview Questions - Large Number of Java Interview Questions
Here you will find Job Interview Questions for J2EE technologies.
 
More Tutorials...

Programming Tutorials: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML

 
 
Dojo
Comments
 
 

 

Dojo Toolbar

                           

In this section, you will learn about the toolbar and how to create a toolbar in dojo. 

Try Online: Tool Tips

Toolbar : This is a GUI (Graphical User Interface) that is either horizontal row or vertical column of the selected image "buttons" that gives user visible reminder and easy way to select certain application functions or desktop such as: backwards or forwards to pages and saving or printing pages or documents within a browser.

The dijit.Menu is a container for dijit.MenuItem's, so dijit.Toolbar is also container for buttons. In the toolbar contains button-based Dijit, including ComboButtons and DropdownButtons.

Here is the code of Program:

<html>
<title>Toolbar</title>
<head>
    <style type="text/css">
      @import "../resources/dojo.css";
      @import "../dijit/themes/tundra/tundra.css";
      
  </style>

    <script type="text/javascript" src="dojo.xd.js" djConfig="parseOnLoad: true"></script>

    <script type="text/javascript">
       dojo.require("dojo.parser");
       dojo.require("dijit.form.Button");
       dojo.require("dijit.Toolbar");
     function italic() { alert("Italic")}
       function bold() { alert("Bold!")}
       function cut() { alert("Cut!")}
       function copy() { alert("Copy!")}
       function paste() { alert("Paste!")}
       dojo.addOnLoad(function() {
     dojo.connect(dojo.byId("toolbar1.italic"),"onclick",italic);
           dojo.connect(dojo.byId("toolbar1.bold"),"onclick",bold);
           dojo.connect(dojo.byId("toolbar1.cut"),"onclick",cut);
           dojo.connect(dojo.byId("toolbar1.copy"),"onclick",copy);
           dojo.connect(dojo.byId("toolbar1.paste"),"onclick",paste);
       });
     </script>

</head>
<body class="tundra">
    <!-- Tags end on line afterwards to eliminate any whitespace -->
    <div id="toolbar1" dojoType="dijit.Toolbar">

    <div dojoType="dijit.form.Button" id="toolbar1.cut" 
iconClass="dijitEditorIcon dijitEditorIconCut" showLabel="false">Cut</div>
    <div dojoType="dijit.form.Button" id="toolbar1.copy" 
iconClass="dijitEditorIcon dijitEditorIconCopy" showLabel="false">Copy</div>
    <div dojoType="dijit.form.Button" id="toolbar1.paste" 
iconClass="dijitEditorIcon dijitEditorIconPaste" showLabel="false">Paste</div>
      
      <!-- The following adds a line between toolbar sections-->
      <span dojoType="dijit.ToolbarSeparator"></span>

      <div dojoType="dijit.form.ToggleButton" id="toolbar1.bold" 
iconClass="dijitEditorIcon dijitEditorIconBold" showLabel="false">Bold</div>
      <div dojoType="dijit.form.ToggleButton" id="toolbar1.italic" 
iconClass="dijitEditorIcon dijitEditorIconItalic" showLabel="false">Italic</div>
   </div>
</body>
</html>

Output of the Program:

 

                          

Facing Programming Problem?
Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

0 comments so far (post your own) View All Comments Latest 10 Comments:

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

  EAI Articles
  Java Certification
Tell A Friend
Your Friend Name
Search Tutorials

 

 
 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2007. All rights reserved.