001    /*
002    Copyright (c) 1996-2011, Damon Hart-Davis
003    All rights reserved.
004    
005    Redistribution and use in source and binary forms, with or without
006    modification, are permitted provided that the following conditions are
007    met:
008    
009      * Redistributions of source code must retain the above copyright
010        notice, this list of conditions and the following disclaimer.
011    
012      * Redistributions in binary form must reproduce the above copyright
013        notice, this list of conditions and the following disclaimer in the
014        documentation and/or other materials provided with the
015        distribution.
016    
017    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
018    IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
019    TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
020    PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
021    OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
022    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
023    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
024    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
025    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
026    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
027    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
028    */
029    
030    package org.hd.d.pg2k.clApp.uploader;
031    
032    import javax.swing.Action;
033    
034    /**Represents the Upload Action.
035     */
036    class SelectAction extends JLFAbstractAction {
037        private static final long serialVersionUID = 1113806192613730802L;
038        private static final String ACTION_COMMAND_KEY_UPLOAD= "select-command";
039        private static final String NAME_UPLOAD = "Select...";
040    //    private static final String SMALL_ICON_UPLOAD = "About16.gif";
041    //    private static final String LARGE_ICON_UPLOAD = "About24.gif";
042        private static final String SHORT_DESCRIPTION_UPLOAD = "Select a file to upload";
043        private static final String LONG_DESCRIPTION_UPLOAD = "Select a file to upload to the DHD Multimedia Gallery";
044        private static final int MNEMONIC_KEY_UPLOAD = 'S';
045    
046        public SelectAction() {
047            putValue(Action.NAME, NAME_UPLOAD);
048    //        putValue(Action.SMALL_ICON, getIcon(SMALL_ICON_UPLOAD));
049    //        putValue(LARGE_ICON, getIcon(LARGE_ICON_UPLOAD));
050            putValue(Action.SHORT_DESCRIPTION, SHORT_DESCRIPTION_UPLOAD);
051            putValue(Action.LONG_DESCRIPTION, LONG_DESCRIPTION_UPLOAD);
052            putValue(Action.MNEMONIC_KEY, Integer.valueOf(MNEMONIC_KEY_UPLOAD));
053            putValue(Action.ACTION_COMMAND_KEY, ACTION_COMMAND_KEY_UPLOAD);
054        }
055    
056    }