com.mindquarry.desktop.minutes.editor.action.NewConversationAction.java Source code

Java tutorial

Introduction

Here is the source code for com.mindquarry.desktop.minutes.editor.action.NewConversationAction.java

Source

/*
 * Copyright (C) 2006-2007 Mindquarry GmbH, All Rights Reserved
 * 
 * The contents of this file are subject to the Mozilla Public License
 * Version 1.1 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific language governing rights and limitations
 * under the License.
 */
package com.mindquarry.desktop.minutes.editor.action;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;

/**
 * Add summary documentation here.
 * 
 * @author <a href="mailto:alexander(dot)saar(at)mindquarry(dot)com">Alexander
 *         Saar</a>
 */
public class NewConversationAction extends ActionBase {
    private static final String TEXT = "Create new conversation";

    private static final Image IMAGE = new Image(Display.getCurrent(), NewConversationAction.class
            .getResourceAsStream("/org/tango-project/tango-icon-theme/22x22/actions/document-new.png")); //$NON-NLS-1$

    public NewConversationAction() {
        setText(TEXT);
        setImageDescriptor(ImageDescriptor.createFromImage(IMAGE));
    }

    /**
     * @see org.eclipse.jface.action.Action#getText()
     */
    @Override
    public String getText() {
        return TEXT;
    }
}