Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: /openetl/src/org/tigris/openetl/ui/

openetl
Discussion topic

Back to topic list

CVS update: /openetl/src/org/tigris/openetl/ui/

Reply

Author ernani_joppert
Full name Ernani Joppert Pontes Martins
Date 2004-08-05 15:37:08 PDT
Message User: ernani_joppert
Date: 04/08/05 15:37:08

Added:
 /openetl/src/org/tig​ris/openetl/ui/
  ToolBar.java

Log:
 Added ToolBar support to main ui.

File Changes:

Directory: /openetl/src/org/tig​ris/openetl/ui/
====================​====================​======

File [added]: ToolBar.java
Url: http://openetl.tigri​s.org/source/browse/​openetl/src/org/tigr​is/openetl/ui/ToolBa​r.java?rev=1.1&c​ontent-type=text/vnd​.viewcvs-markup
Added lines: 53
---------------
/*
 * Created on 27/07/2004
 */
package org.tigris.openetl.ui;

import javax.swing.JButton;
import javax.swing.JToolBar;

import org.tigris.openetl.u​i.constants.Applicat​ion;

/**
 * @author Ernani Joppert Pontes Martins
 */
public class ToolBar extends JToolBar {

    /**
     * Default Constructor.
     */
    public ToolBar(MainFrame frame) {

        super(JToolBar.HORIZONTAL);

        this.addButtons(this, frame);
        this.setFloatable(false);
        this.setRollover(true);
        this.setVisible(true);
    }

    /**
     * Add buttons to the toolbar.
     *
     * @param toolBar
     * The toolbar to add buttons.
     */
    protected void addButtons(JToolBar toolBar, MainFrame frame) {

        JButton button = null;

        // first button
        button = new JButton("New");
        button.setActionComm​and(Application.COMM​AND_NEW);
        button.setToolTipText("Opens a new internal frame");
        button.addActionList​ener(frame);
        toolBar.add(button);

        // second button
        button = new JButton("Open");
        button.setActionComm​and(Application.COMM​AND_OPEN);
        button.setToolTipText("Choose a File to Open");
        button.addActionList​ener(frame);
        toolBar.add(button);
    }
}




--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: cvs-unsubscribe@open​etl.tigris.org
For additional commands, e-mail: cvs-help at openetl dot tigris dot org

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: /openetl/src/org/tigris/openetl/ui/ ernani_joppert Ernani Joppert Pontes Martins 2004-08-05 15:37:08 PDT
Messages per page: