alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

What this is

This file is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code

/*
 *                 Sun Public License Notice
 *
 * The contents of this file are subject to the Sun Public License
 * Version 1.0 (the "License"). You may not use this file except in
 * compliance with the License. A copy of the License is available at
 * http://www.sun.com/
 *
 * The Original Code is NetBeans. The Initial Developer of the Original
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
 * Microsystems, Inc. All Rights Reserved.
 */

package org.netbeans.api.project;

import java.beans.PropertyChangeListener;
import javax.swing.Icon;
import org.netbeans.api.project.Project;

/**
 * General information about a project.
 * Use {@link ProjectUtils#getInformation} as a client.
 * Use {@link Project#getLookup} as a provider.
 * @author Jesse Glick
 */
public interface ProjectInformation {

    /** Property name fired when the code name changes. */
    String PROP_NAME = "name"; // NOI18N
    
    /** Property name fired when the display name changes. */
    String PROP_DISPLAY_NAME = "displayName"; // NOI18N
    
    /** Property name fired when the icon changes. */
    String PROP_ICON = "icon"; // NOI18N
    
    /**
     * Get a programmatic code name suitable for use in build scripts or other
     * references.
     * 

* Project names should typically be distinctive enough to distinguish * between different projects with some kind of relationships, but * any usage of this name must take into account that they are not forced * to be unique. *

* Should not contain odd characters; should be usable as a directory name * on disk, as (part of) an Ant property name, etc. * XXX precise format - at least conforms to XML NMTOKEN or ID * @return a code name * @see PropertyUtils.getUsablePropertyName */ String getName(); /** * Get a human-readable display name for the project. * May contain spaces, international characters, etc. * XXX precise format - probably XML PCDATA * @return a display name for the project */ String getDisplayName(); /** * Gets icon for given project. * Usually determined by the project type. * @return icon of the project. */ Icon getIcon(); /** * Get the associated project. * @return the project for which information is being provided */ Project getProject(); /** * Add a listener to property changes. * Only {@link #PROP_NAME}, {@link #PROP_DISPLAY_NAME}, and {@link #PROP_ICON} may be fired. * Since the event source is the info object, you may use {@link #getProject}. * @param listener a listener to add */ void addPropertyChangeListener(PropertyChangeListener listener); /** * Remove a listener to property changes. * @param listener a listener to remove */ void removePropertyChangeListener(PropertyChangeListener listener); }

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.