Package com.samskivert.swing.event

Examples of com.samskivert.swing.event.CommandEvent


            return new ActionEvent(CommandButton.this,
                                   ActionEvent.ACTION_PERFORMED, actionCommand,
                                   proto.getWhen(), proto.getModifiers());
        } else {
            // if we found an arg somewhere, create a CommandEvent
            return new CommandEvent(CommandButton.this, actionCommand, arg,
                                    proto.getWhen(), proto.getModifiers());
        }
    }
View Full Code Here


     */
    public static void postAction (
        Component source, String command, Object argument)
    {
        // slip things onto the event queue for later
        CommandEvent event = new CommandEvent(source, command, argument);
        EventQueue.invokeLater(new ActionInvoker(event));
    }
View Full Code Here

     * @return true if the controller knew how to handle the action, false
     * otherwise.
     */
    public boolean handleAction (Component source, String command, Object arg)
    {
        return handleAction(new CommandEvent(source, command, arg));
    }
View Full Code Here

            if (_activeItem.command != null) {
                Object itemArg = _activeItem.argument;
                Object arg = (itemArg == null) ? _argument : itemArg;

                // notify our listeners that the action is posted
                final CommandEvent evt = new CommandEvent(
                    _host.getComponent(), _activeItem.command, arg);
                _actlist.apply(new ObserverList.ObserverOp<ActionListener>() {
                    public boolean apply (ActionListener obs) {
                        obs.actionPerformed(evt);
                        return true;
View Full Code Here

TOP

Related Classes of com.samskivert.swing.event.CommandEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.